Just to add a bit more info to this thread:
I've had the severe battery drain bug occur two or three times in the 18 months I've been using CM. It wasn't related to a particular rom version or kernel, since I could reflash the same rom and not have the problem, rather it always seemed to be something to do with the flashing process itself.
On 6.1, I've had it occur 3 times, always overnight, I would turn the phone off and then turn it face-down, then in the morning it would be completely drained and off. Last night I left it face up and this morning the battery was only 4% less than when I switched it off last night. My suspicion is that when I place it face down, the trackball is depressed and this is causing the phone not to sleep. I can't say I've proved this conclusively yet, but it's something to bear in mind if you're having a battery issue. Clearing caches also helps for the full-on battery bug (by which I mean when the battery drains completely in about 30 mins and the back of the phone gets very hot to the touch, not the "I was on a full charge and now only 4 hours later I'm on 10%" issue).
bavo, on 17 December 2010 - 11:47 AM, said:
In the last versions (since 5.something) i've had a lot of battery drain some times, and other times none.
It never seemed to have anything to do with a particular version.
However I did notice something: the battery draining issues only seem to occur when i'm flashing while the phone is still connected to the computer.
It might be a coincidence, but when you are having battery issues you might want to try to reflash your phone while it's not connected to a computer or power supply.
That's because during the boot process the phone doesn't charge until fairly late-on, not long before the home screen appears. This is why you need to be sure you have sufficient battery before flashing, not so much for flashing the rom, but it's critical if you're flashing spl, radio or recovery.