Skip to contentSkip to conversation

Laptop mode causing writes to wrong sectors?

DISCUSSION Bradley Chapman 4 participants 8 messages Nov 17, 2005 – Nov 21, 2005

lore
Share & tools
lore
#0 lore raw

I too have been experiencing some problems with laptop-mode that may be similar to what was recently reported here.

I have a Centrino machine (Sager NP3760, aka Clevo M375E) with a 60GB Hitachi TravelStar hard disk running in UDMA5 and 512MB RAM, and on occassions I've had random files on my /usr partition overwritten and both my /usr and /var filesystems quite thoroughly trashed - with these events usually occuring right after I'd been on battery power and my hard disk had been spinning up and down regularly.

All my filesystems are ext3 with journaling active, and none of them have been messed with (i.e. resized).

Brad
--
SCREW THE ADS! http://adblock.mozdev.org/

#1 lore raw

Bradley, Jan,

Quoted 10 lines · Bradley Chapman

I too have been experiencing some problems with laptop-mode that may be similar to what was recently reported here.

I have a Centrino machine (Sager NP3760, aka Clevo M375E) with a 60GB Hitachi TravelStar hard disk running in UDMA5 and 512MB RAM, and on occassions I've had random files on my /usr partition overwritten and both my /usr and /var filesystems quite thoroughly trashed - with these events usually occuring right after I'd been on battery power and my hard disk had been spinning up and down regularly.

Quoted 2 lines

All my filesystems are ext3 with journaling active, and none of them have been messed with (i.e. resized).

OK, that's the second report then. I'm beginning to worry. :/

Are you seeing any DMA timeout messages in your kernel log?

Also, both reports are on ext3, which might point to an ext3 problem with long commit intervals.

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

--Bart

#2 lore raw
Quoted 1 line · Bart Samwel

OK, that's the second report then. I'm beginning to worry. :/

And I'm not feeling so lonely any more ;-)

Quoted 2 lines

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

I didn't notice these problems before 2.6.14. As these corruptions are not happening very often, and as I usually do not run the notebook on battery power, the problem may have existed for a while, though.

Today I did a simple test: I activated laptop mode with a 10s idle timeout, and made a script write files with uniqe identifiers, followed by a sync, every 60 seconds. After nearly an hour, I didn't see any corruption, though at least some of these writes have triggered a spin-up. When I have some spare time I'll do more intensive testing.

Additionally, I mounted more than half of the partitions on this notebook read only, and made a 1:1 copy of these partitions to an external hard drive. Therefore, I can check later if something accidentally did write to these areas.

If you have any suggestions for additional test, please tell me.

The random filesystem corruption had one positive effect: I never had such a good backup of my data before. ;-)

Jan

#3 lore raw
Quoted 11 lines · Jan Niehusmann
Quoted 1 line

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

I didn't notice these problems before 2.6.14. As these corruptions are not happening very often, and as I usually do not run the notebook on battery power, the problem may have existed for a while, though.

Today I did a simple test: I activated laptop mode with a 10s idle timeout, and made a script write files with uniqe identifiers, followed by a sync, every 60 seconds. After nearly an hour, I didn't see any corruption, though at least some of these writes have triggered a spin-up. When I have some spare time I'll do more intensive testing.

Well, the syncs should trigger a spinup every time. Laptop mode does not influence syncs, really.

Quoted 4 lines

Additionally, I mounted more than half of the partitions on this notebook read only, and made a 1:1 copy of these partitions to an external hard drive. Therefore, I can check later if something accidentally did write to these areas.

"more than half"? Exactly how many partitions *are* there on this notebook? ;)

Quoted 1 line

If you have any suggestions for additional test, please tell me.

Perhaps you could enable /proc/sys/vm/block_dump. This makes the kernel output all disk activity, including block numbers. By looking up the corrupted block numbers in your logs you can check later if the corrupting write was done by the kernel (i.e., software fault) or not (hardware fault).

Note that the output of block_dump may not go into your logs by default, because it's output with KERN_DEBUG. You may need to change your log settings.

You can add extra context on ext3's state by enabling JBD debugging (CONFIG_JBD_DEBUG, IIRC).

Quoted 2 lines

The random filesystem corruption had one positive effect: I never had such a good backup of my data before. ;-)

It made me rethink my backup strategy as well. :)

--Bart

#4 lore raw
In reply to Bart Samwel

Mr. Samwel,

Quoted 4 lines · Bart Samwel

OK, that's the second report then. I'm beginning to worry. :/

Are you seeing any DMA timeout messages in your kernel log?

Once, when my /var partition got trashed - about thirty or forty loud and scary messages from the IDE core saying that various disk accesses (i.e. normal read/writes) were failing. I do believe DMA was mentioned.

Another time (i.e. just now), I got five Oopses in a row, most of them in kmem_cache_alloc() but with one in generic_aio_file_read(). Unfortunately I am using fglrx right now so they are probably quite meaningless...*

Most of the time though, I don't see anything.

Fortunately the number of errors encouraged the kernel to remount R/O, so after a quick jump to single user mode and two e2fsck -f invocations, it was healed.

Quoted 6 lines

Also, both reports are on ext3, which might point to an ext3 problem with long commit intervals.

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

They started with 2.6.13. I can't remember ever expereincing random partition trashing or random file corruption in 2.6.12. I tried 2.6.14.1 - that kernel did Bad Things as well.

So far though, as long as I stay on juice, 2.6.13 seems to behave.

Quoted 3 lines

--Bart

Brad

* - http://216.55.161.203/theonekea/misc/oopsen.txt
--
SCREW THE ADS! http://adblock.mozdev.org/

#5 lore raw
Quoted 11 lines · Bradley Chapman

Mr. Samwel,

Quoted 3 lines · Bart Samwel

OK, that's the second report then. I'm beginning to worry. :/

Are you seeing any DMA timeout messages in your kernel log?

Once, when my /var partition got trashed - about thirty or forty loud and scary messages from the IDE core saying that various disk accesses (i.e. normal read/writes) were failing. I do believe DMA was mentioned.

This could be the problem I was talking about. Was this happening during spindown or not?

Quoted 3 lines

Another time (i.e. just now), I got five Oopses in a row, most of them
in kmem_cache_alloc() but with one in generic_aio_file_read(). Unfortunately I am using fglrx right now so they are probably quite meaningless...*

I guess so. They all oops on reading the same address (0x05c2a5bb), there's something corrupted in the slab cache, cause unknown. Very possibly fglrx.

Quoted 1 line

Most of the time though, I don't see anything.

...while still experiencing corruption?

Quoted 8 lines
Quoted 2 lines

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

They started with 2.6.13. I can't remember ever expereincing random partition trashing or random file corruption in 2.6.12. I tried 2.6.14.1 - that kernel did Bad Things as well.

So far though, as long as I stay on juice, 2.6.13 seems to behave.

Hmmmm. This means that you could still be experiencing the same thing that Andrea Gelmini was reporting. Could you try the things he said made it worse, and check if things go wrong? You are, of course, allowed to decline because of the risk involved. :-) The things are:

Big activity:

* iozone -A
* unrar big file
* In order to make it happen faster:
cd /proc/sys/vm
echo 100 > dirty_background_ratio
echo 1000000 > dirty_expire_centisecs
echo 100 > dirty_ratio
echo 1000000 > dirty_writeback_centisecs

--Bart

#6 lore raw

Mr. Samwel,

Quoted 8 lines · Bart Samwel
Quoted 7 lines · Bradley Chapman

Mr. Samwel,

Quoted 3 lines · Bart Samwel

OK, that's the second report then. I'm beginning to worry. :/

Are you seeing any DMA timeout messages in your kernel log?

Quoted 7 lines
Quoted 4 lines

Once, when my /var partition got trashed - about thirty or forty loud and scary messages from the IDE core saying that various disk accesses (i.e. normal read/writes) were failing. I do believe DMA was mentioned.

This could be the problem I was talking about. Was this happening during spindown or not?

I believe so. I only noticed it when I checked my dmesg after the ipw2200 driver crapped out yet again...

Quoted 9 lines
Quoted 5 lines

Another time (i.e. just now), I got five Oopses in a row, most of them in kmem_cache_alloc() but with one in generic_aio_file_read(). Unfortunately I am using fglrx right now so they are probably quite meaningless...*

I guess so. They all oops on reading the same address (0x05c2a5bb), there's something corrupted in the slab cache, cause unknown. Very possibly fglrx.

Indeed. I expected as such.

Quoted 21 lines
Quoted 2 lines

Most of the time though, I don't see anything.

...while still experiencing corruption?

Quoted 8 lines
Quoted 2 lines

Bradley, Jan, since when have these problems been happening? Kernel version-wise, I mean?

They started with 2.6.13. I can't remember ever expereincing random partition trashing or random file corruption in 2.6.12. I tried 2.6.14.1 - that kernel did Bad Things as well.

So far though, as long as I stay on juice, 2.6.13 seems to behave.

Hmmmm. This means that you could still be experiencing the same thing that Andrea Gelmini was reporting. Could you try the things he said made it worse, and check if things go wrong? You are, of course, allowed to decline because of the risk involved. :-) The things are:

Big activity:

Quoted 8 lines

* iozone -A
* unrar big file
* In order to make it happen faster:
cd /proc/sys/vm
echo 100 > dirty_background_ratio
echo 1000000 > dirty_expire_centisecs
echo 100 > dirty_ratio
echo 1000000 > dirty_writeback_centisecs

No thanks. I'll stick to 'normal usage' triggers and see if I can gather any data that way ;-)))

Quoted 3 lines

--Bart

Brad
--
SCREW THE ADS! http://adblock.mozdev.org/

#7 lore raw
In reply to Bradley Chapman

Hi!

Quoted 10 lines

I too have been experiencing some problems with laptop-mode that may be similar to what was recently reported here.

I have a Centrino machine (Sager NP3760, aka Clevo M375E) with a 60GB Hitachi TravelStar hard disk running in UDMA5 and 512MB RAM, and on occassions I've had random files on my /usr partition overwritten and both my /usr and /var filesystems quite thoroughly trashed - with these events usually occuring right after I'd been on battery power and my hard disk had been spinning up and down regularly.

Quoted 2 lines

All my filesystems are ext3 with journaling active, and none of them have been messed with (i.e. resized).

Can you try ext2? Relying on journal when you are experiencing corruption is bad idea, anyway.

Signature · 1 line
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms