public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Bart Samwel <bart@samwel.tk>
To: Jan Niehusmann <jan@gondor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Laptop mode causing writes to wrong sectors?
Date: Thu, 17 Nov 2005 10:25:31 +0100	[thread overview]
Message-ID: <437C4C8B.4030502@samwel.tk> (raw)
In-Reply-To: <20051116214222.GB4935@knautsch.gondor.com>

Jan Niehusmann wrote:
> On Wed, Nov 16, 2005 at 09:06:03PM +0100, Bart Samwel wrote:
>> First of all, you having resized your fs is a smoking gun, if you ask 
>> me. Your fs is dead/dying, and you know you've recently been tinkering 
>> with it. It's the most probable cause.
> 
> Well, it would be nice if the explanation was that easy - but the recent
> corruption (with the man page) was on my root partition, which is not on
> LVM and has never been resized.

Youch. I assumed this was all the same fs! It is the same HD though?

> Be assured that at least after the first corruption I observed, I did
> forced e2fsck on all partitions. Without any errors found.

ACK.

>> after the resize2fs -- seeing as all the subsequent fscks were probably 
>> done by journal.
> 
> What do you mean with 'by journal'? The filesystems were unmounted (or
> remounted r/o), so the journal should have been committed and empty at
> e2fsck time.

I mean, no full e2fsck, at most a journal replay. This doesn't check the 
bitmaps, so if they are inconsistent, they stay inconsistent.

>>> 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.
>> This sounds like your filesystem's block bitmaps are "fscked up". These 
>> problems can definitely cause "creeping corruption" when undetected, 
> 
> But this should definitely have been detected by an fsck, right?

Yes. And you've had this problem before, even. Googling for "e2fsck 
block bitmap differences" shows me this as the third entry. :)

http://lkml.org/lkml/2003/8/3/166

If you didn't get those messages, then this is not the problem, apparently.

> I agree it's probably not a sync problem. And therefore, probably not
> really a laptop-mode bug, even if laptop-mode triggered the corruption.
> I suspected the hard drive to mess up write requests during spin-up. Or
> perhaps giving some kind of error message, which could trigger a bug in
> a rarely tested error-handling path in the kernel. But the fact that you
> never got similar reports makes this less likely. In the end, I have to
> consider there may be some bad hardware in my laptop. (Already did a
> memtest86, of course.)

There is a known problem with laptop mode where, often during 
spindown/spinup, the kernel emits DMA timeout errors.

http://lkml.org/lkml/2005/8/21/48

According to Andrea Gelmini (the original reporter of this problem) this 
can lead to system freezes on some kernels, and corruption on others. 
Are you seeing these errors somewhere in your logs?

What's your hardware? A Thinkpad perhaps?

--Bart

  reply	other threads:[~2005-11-17  9:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-16 18:16 Laptop mode causing writes to wrong sectors? Jan Niehusmann
2005-11-16 20:06 ` Bart Samwel
2005-11-16 21:42   ` Jan Niehusmann
2005-11-17  9:25     ` Bart Samwel [this message]
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=437C4C8B.4030502@samwel.tk \
    --to=bart@samwel.tk \
    --cc=jan@gondor.com \
    --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