Default Need advice

So i started getting this weird issue lately: as battery gets low (<~15%) and if i am using gsm connection phone randomly turns off (no shutting down message, it just goes dark). After that if i turn on the phone i can still use it for qute a while. Now the most interesting part is that if i'm using 3g connection there are no issues. Also cpu heavy apps don't crash phone either. And the same thing happens whether i'm using sense roms or cyanogenmod. So i'm wondering whether anyone experienced something like this? Is this hardware issue and do you think warranty will cover it?