linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: pinotj@club-internet.fr
Cc: nathans@sgi.com, manfred@colorfullife.com, akpm@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [Oops]  i386 mm/slab.c (cache_flusharray)
Date: Thu, 4 Dec 2003 10:49:07 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0312041035530.6638@home.osdl.org> (raw)
In-Reply-To: <mnet1.1070562461.26292.pinotj@club-internet.fr>



On Thu, 4 Dec 2003 pinotj@club-internet.fr wrote:
>
> OK, I tried again the patch on "small kernel" test11 with
> CONFIG_DEBUG_PAGEALLOC only. Here are the first results. I will do more
> tests later because it seems weird. This time I have very different
> behavior for XFS and Ext3.

Ok, interesting indeed.

> I got an oops at boot time, when system try to mount root filesystem (XFS).
>
> But when I tried on a root Ext3, I got no problem at all. I even
> compiled 2 kernel straight without any problems. It seems to be the
> first time a test11 works flawless on my system.

All right. That may or may not mean that the bug is actually in mm/slab.c,
rather than anywhere else. It doesn't explain why _you_ hit it and few
others do, but it's still an interesting fact.

Manfred, any ideas? What's different between 2.6.x and 2.4.x in slab?

But it may also be that the bug is in some slab user - since my slab-
translates-to-page-alloc hack always calls the slab constructor function
on every allocation, and the destructor gets called immediately after the
free, my debug version might hide some usage bugs.

> The XFS oops (I was too lazy to write down all the backtraces, all about
> xfs_* things, I can send if needed):
>
> ---
> kernel BUG at include/linux/mm.h:267!

YEAH! That's "put_page_testzero()", and either the BUG_ON() or the
atomic_dec_and_test() noticing bad things.

So that's the "test for count going negative" bug, and it seems to have
found somebody doing a double free on a page. Which is _exactly_ what we
expected from the XFS problems, and would explain the "struct page"
corruption that people report.

> Call Trace:
>  [<c01aaf90>] pagebuf_free+0x24/0x30
>  [<c019669b>] xlog_find_verify_cycle+0x18b/0x1e0
> Code: 0f 0b 0b 01 d6 cb 1f c0 eb 8e ff 73 54 eb b3 90 53 e8 0e 11

It would be good to get the full backtrace, though.

Nathan - did you see the two debug patches I sent out that caught this?

One adds checks to "atomic_dec_and_test()" to verify that the count never
goes negative. The other basically disables all the slab code, and
replaces them with straight page allocations, and that together with
CONFIG_DEBUG_PAGEALLOC helps find bad behaviour (touching allocations
after they are free'd etc).

		Linus

  reply	other threads:[~2003-12-04 18:49 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-04 18:27 [Oops] i386 mm/slab.c (cache_flusharray) pinotj
2003-12-04 18:49 ` Linus Torvalds [this message]
2003-12-04 19:09   ` Linus Torvalds
2003-12-04 21:21     ` Nathan Scott
2003-12-05  7:14       ` Christoph Hellwig
2003-12-05  9:34         ` Nathan Scott
2003-12-05 14:22           ` Christoph Hellwig
2003-12-05  3:00     ` Nathan Scott
2003-12-05  6:40       ` Linus Torvalds
2003-12-04 19:19   ` Manfred Spraul
2003-12-04 21:26   ` Nathan Scott
  -- strict thread matches above, loose matches on Subject: below --
2003-12-09  0:57 pinotj
2003-12-09  2:03 ` Nathan Scott
2003-12-09  7:21   ` Christoph Hellwig
2003-12-09 23:58     ` Nathan Scott
2003-12-12 19:00       ` Christoph Hellwig
2003-12-12 20:07         ` Manfred Spraul
2003-12-03 23:06 pinotj
2003-12-03 23:26 ` Linus Torvalds
2003-11-29 17:41 pinotj
2003-12-02  0:36 ` Linus Torvalds
2003-12-02  1:37   ` Nathan Scott
2003-12-02  6:44     ` Nathan Scott
2003-12-02 18:05       ` Mike Fedyk
2003-12-02 20:05         ` Nathan Scott
2003-11-27 18:42 pinotj
2003-11-27 18:55 ` Manfred Spraul
2003-12-02  1:03 ` Mike Fedyk
2003-11-25 17:30 pinotj
2003-11-25 22:51 ` Linus Torvalds
2003-11-27 18:07   ` Manfred Spraul
2003-11-22  7:47 Re: " pinotj
2003-11-22 10:55 ` Manfred Spraul
2003-11-21 18:12 pinotj
2003-11-21 18:58 ` Manfred Spraul
2003-11-20  1:50 pinotj
2003-11-20  2:09 ` Andrew Morton
2003-11-19 18:19 pinotj
2003-11-20  1:07 ` Andrew Morton

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=Pine.LNX.4.58.0312041035530.6638@home.osdl.org \
    --to=torvalds@osdl.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=nathans@sgi.com \
    --cc=pinotj@club-internet.fr \
    /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;
as well as URLs for NNTP newsgroup(s).