From: Vegard Nossum <vegard.nossum@gmail.com>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: David Howells <dhowells@redhat.com>,
Serge Hallyn <serue@us.ibm.com>,
LKML <linux-kernel@vger.kernel.org>,
Lee Schermerhorn <Lee.Schermerhorn@hp.com>
Subject: Re: [CRED bug?] 2.6.29-rc3 don't survive on stress workload
Date: Wed, 11 Feb 2009 04:56:14 +0100 [thread overview]
Message-ID: <19f34abd0902101956t2af01f9cifeab655c1f6625eb@mail.gmail.com> (raw)
In-Reply-To: <20090210162708.6FBF.KOSAKI.MOTOHIRO@jp.fujitsu.com>
On Tue, Feb 10, 2009 at 8:28 AM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>> That stack trace looks somewhat similar to the one in
>> http://lkml.org/lkml/2009/2/6/136
>>
>> If this is reproducible, maybe a patch like the one attached can help
>> pinpoint it?
>
> Thanks. I'll try it.
> please wait one night, it need to reproduce.
Wow, it seems that I was able to reproduce it (somewhat, somehow) too:
[13359.131495] ------------[ cut here ]------------
[13359.133489] kernel BUG at mm/slub.c:2750!
[13359.133489] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
[13359.133489] last sysfs file: /sys/devices/pnp0/00:0d/id
[13359.133489] CPU 1
[13359.133489] Modules linked in:
[13359.133489] Pid: 917, comm: udevd Not tainted 2.6.29-rc3 #223
[13359.133489] RIP: 0010:[<ffffffff810b99c9>] [<ffffffff810b99c9>] kfree+0x29/7
[13359.133489] RSP: 0000:ffff88003f187e28 EFLAGS: 00010246
[13359.133489] RAX: 0100000000000400 RBX: ffffffff8171fe00 RCX: 0000000000000086
[13359.133489] RDX: ffffe20000050ec8 RSI: 0000000000000085 RDI: ffffe20000050ec8
[13359.133489] RBP: ffff88003f187e38 R08: 0000000000000585 R09: ffffffff81819cb0
[13359.133489] R10: ffff88003e457b40 R11: ffff88003f187e98 R12: ffffffff81072144
[13359.133489] R13: 0000000000000001 R14: ffffffff818b13e0 R15: 000000000000000a
[13359.133489] FS: 0000000000000000(0000) GS:ffff88003f156f80(0063) knlGS:00000
[13359.218474] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
[13359.218474] CR2: 0000000043d6a0ac CR3: 000000003e407000 CR4: 00000000000006a0
[13359.218474] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[13359.239494] ------------[ cut here ]------------
[13359.239498] WARNING: at lib/kref.c:43 kref_get+0x27/0x30()
[13359.239501] Hardware name: 945P-A
[13359.239503] Modules linked in:
[13359.239508] Pid: 2463, comm: a.out Not tainted 2.6.29-rc3 #223
[13359.239511] Call Trace:
[13359.239521] [<ffffffff8103c93a>] warn_slowpath+0xb6/0xf2
[13359.239529] [<ffffffff810b5452>] ? alloc_pages_current+0xbe/0xc7
[13359.239536] [<ffffffff810b734e>] ? get_partial_node+0x22/0x87
[13359.239540] [<ffffffff810b9705>] ? __slab_alloc+0xd6/0x371
[13359.239547] [<ffffffff8103238d>] ? set_next_entity+0x8a/0xda
[13359.239553] [<ffffffff811b2f9b>] kref_get+0x27/0x30
[13359.239560] [<ffffffff810465ce>] alloc_uid+0xe0/0x1d5
[13359.239568] [<ffffffff8104b501>] set_user+0x2f/0x88
[13359.239574] [<ffffffff8104b842>] sys_setreuid+0xcd/0x133
[13359.239579] [<ffffffff8102d398>] sysenter_dispatch+0x7/0x27
[13359.239582] ---[ end trace 41e0e7b4a6e4140a ]---
[13359.218474] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[13359.346481] Process udevd (pid: 917, threadinfo ffff88003e456000, task ffff8)
Booting 'Fedora Core (2.6.20.9)'
(spontaneous reboot)
The second BUG is the one from my patch:
WARN_ON(atomic_read(&kref->refcount) <= 0);
This was a program that forked and did setreuid(0, 99999);
setreuid(99999, 0); in a loop (to alloc/free uids quickly).
My theory is that the reference counting for 'struct user_struct' is
wrong in the case that CONFIG_USER_SCHED=y (check out free_user() in
the two cases), but I don't know that for sure. What is the setting of
this config variable in your configuration?
Will refine my test program to see if I can trigger this immediately
and accurately.
Vegard
--
"The animistic metaphor of the bug that maliciously sneaked in while
the programmer was not looking is intellectually dishonest as it
disguises that the error is the programmer's own creation."
-- E. W. Dijkstra, EWD1036
next prev parent reply other threads:[~2009-02-11 3:56 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-10 5:41 KOSAKI Motohiro
2009-02-10 7:10 ` Vegard Nossum
2009-02-10 7:28 ` KOSAKI Motohiro
2009-02-11 3:56 ` Vegard Nossum [this message]
2009-02-11 10:48 ` David Howells
2009-02-10 12:18 ` Ingo Molnar
2009-02-11 12:25 ` KOSAKI Motohiro
2009-02-11 12:54 ` David Howells
2009-02-10 10:35 ` David Howells
2009-02-10 10:49 ` KOSAKI Motohiro
2009-02-11 12:41 ` David Howells
2009-02-11 12:52 ` KOSAKI Motohiro
2009-02-11 13:09 ` David Howells
2009-02-11 14:04 ` KOSAKI Motohiro
2009-02-11 16:33 ` Ingo Molnar
2009-02-11 17:07 ` David Howells
2009-02-11 17:19 ` Ingo Molnar
2009-02-12 11:09 ` David Howells
2009-02-12 11:23 ` KOSAKI Motohiro
2009-02-12 12:04 ` David Howells
2009-02-12 14:39 ` Serge E. Hallyn
2009-02-12 17:18 ` David Howells
2009-02-13 4:44 ` KOSAKI Motohiro
2009-02-13 8:28 ` Ingo Molnar
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=19f34abd0902101956t2af01f9cifeab655c1f6625eb@mail.gmail.com \
--to=vegard.nossum@gmail.com \
--cc=Lee.Schermerhorn@hp.com \
--cc=dhowells@redhat.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
/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
all inboxes | Powered by JetHome®