public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Niehusmann <jan@gondor.com>
To: bart@samwel.tk
Cc: linux-kernel@vger.kernel.org
Subject: Laptop mode causing writes to wrong sectors?
Date: Wed, 16 Nov 2005 19:16:17 +0100	[thread overview]
Message-ID: <20051116181612.GA9231@knautsch.gondor.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2828 bytes --]

(Cc: to linux-kernel, in case somebody else is interested in this as well)

Hi Bart,

let me start by stating that the following is mainly guessed. I may be
completely wrong. Still I think you may be interested in my
observations, and perhaps you already got similar reports?

On my laptop, running 2.6.14, I'm observing some strange file- and
filesystem corruptions. First, I thought it may have been caused by an
ext3 bug because the first corruption I did observe happened shortly
after an ext3 journal replay.

I did report this to linux-kernel, but without any helpful response:
http://www.ussg.iu.edu/hypermail/linux/kernel/0511.0/0129.html
(Subject: ext3 corruption: "JBD: no valid journal superblock found")

But now, I got another hint pointing to a possible cause of this
problem: I found a file - /usr/lib/libatlas.so.3.0 - which was corrupted
by 4k of it being overwritten by a different file, which I recognized. 
And that file happened to be an uncompressed manual page.

As usually the manual pages are only stored compressed, this must have
happened when I actually did look at that manual page, which causes the
uncompressed version to be written to a file in /tmp/. And the best is:
I actually remember when I did read that man page, and it was while the
notebook ran on battery power, which is quite seldom. On battery power,
I have laptop mode activated and the hard disk spun down after a short
idle time.

Why do I think this is related to the corruption? Well, on the one hand,
I'm compiling kernels quite often, tracking linus' git repository, and
I'm regularly upgrading my system to debian unstable, both involving
hundreds of megabytes of disk writes - and I never observed a single
problem while doing so. On the other hand, a simple look at a short
manual page did cause file system corruption. This would be rather
strange if the corruption happened at random disk writes. But kernel
compiles as well as system upgrades involve regular writes to the hard
disk, which therefore doesn't spin down. (And additionally, I usually
don't do such things while running on battery.) Reading the man page
happend while the system was quite idle, and it may have been the read
of the compressed image or the write to the temporary file which spun up
the hard drive. (To be exact, I looked at the man page more than once -
so the second time, the compressed image probably was cached and reading
it didn't require filesystem access, so it really could have been the
write triggering the spin up)

Well, quite a long mail for a little observation, and sorry if you think
that I wasted your time. Did I? Or may my suspicion be true and there is
some connection between laptop mode and the corruptions I observe?

Thanks for reading all this stuff ;-) 

Jan


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 307 bytes --]

             reply	other threads:[~2005-11-16 18:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 18:16 Jan Niehusmann [this message]
2005-11-16 20:06 ` Laptop mode causing writes to wrong sectors? Bart Samwel
2005-11-16 21:42   ` Jan Niehusmann
2005-11-17  9:25     ` Bart Samwel
2005-11-17 10:33       ` Jan Niehusmann
2005-11-17 11:36         ` Bart Samwel
2005-11-17 22:33 ` Pavel Machek
2005-11-18 18:45   ` Bill Davidsen
2005-11-18 23:20     ` Pavel Machek
2005-11-19  8:39       ` Bart Samwel
2005-11-19  9:26         ` Vojtech Pavlik
2005-11-19 11:10           ` Bart Samwel
2005-11-19 14:05         ` Jan Niehusmann
2005-11-19 15:30           ` Jan Niehusmann
2005-11-19 23:29             ` Bart Samwel
2005-11-19 23:45               ` Jan Niehusmann
2005-11-21  2:09       ` Bill Davidsen
  -- strict thread matches above, loose matches on Subject: below --
2005-11-17 13:22 Bradley Chapman
2005-11-17 14:27 ` Bart Samwel
2005-11-17 15:41   ` Jan Niehusmann
2005-11-17 16:05     ` Bart Samwel
2005-11-17 16:22   ` Bradley Chapman
2005-11-17 21:22     ` Bart Samwel
2005-11-17 22:50       ` Bradley Chapman
2005-11-20 21:30 ` Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051116181612.GA9231@knautsch.gondor.com \
    --to=jan@gondor.com \
    --cc=bart@samwel.tk \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox