From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: "Alexander E. Patrakov" <patrakov@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: BUG: sleeping function called from invalid context at kernel/mutex.c:271
Date: Tue, 17 Apr 2012 21:06:36 -0700 [thread overview]
Message-ID: <20120418040636.GD2449@linux.vnet.ibm.com> (raw)
In-Reply-To: <20120418025626.GB23877@home.goodmis.org>
On Tue, Apr 17, 2012 at 10:56:27PM -0400, Steven Rostedt wrote:
> On Mon, Apr 16, 2012 at 01:27:24PM +0600, Alexander E. Patrakov wrote:
> > Hello.
> >
> > With linux-3.3.0, my computer at work is rather unstable. The kernel
>
> Have you tried other kernels? The leak just started with 3.3?
>
> > seems to leak memory, however, kmemleak finds nothing significant.
> >
> > Finally, the computer started swapping heavily and responded only via
> > ssh. In dmesg, I found this (repeated every two seconds):
> >
> > [ 6709.483956] BUG: sleeping function called from invalid context at
> > kernel/mutex.c:271
> > [ 6709.483968] in_atomic(): 0, irqs_disabled(): 0, pid: 1210, name:
>
> I'm a little baffled here, as preempt_count() is zero (in_atomic) and
> irqs are not disabled.
>
> > NetworkManager
>
> Ah there's your problem! (just kidding)
>
>
> > [ 6709.483974] INFO: lockdep is turned off.
> > [ 6709.483981] Pid: 1210, comm: NetworkManager Tainted: G I
> > 3.3.0-gentoo #4
> > [ 6709.483987] Call Trace:
> > [ 6709.484006] [<ffffffff810683fc>] __might_sleep+0xff/0x103
> > [ 6709.484019] [<ffffffff81548783>] mutex_lock_nested+0x2a/0x2ff
> > [ 6709.484031] [<ffffffff811261b5>] ? fget_light+0x6a/0x118
> > [ 6709.484043] [<ffffffff8115a738>] inotify_poll+0x35/0x53
> > [ 6709.484052] [<ffffffff81135eb1>] do_sys_poll+0x266/0x3f2
> > [ 6709.484060] [<ffffffff81134e33>] ? poll_freewait+0x8f/0x8f
> > [ 6709.484069] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484076] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484084] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484092] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484099] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484107] [<ffffffff81134efa>] ? __pollwait+0xc7/0xc7
> > [ 6709.484118] [<ffffffff8112fde0>] ? putname+0x2d/0x36
> > [ 6709.484127] [<ffffffff8112fde0>] ? putname+0x2d/0x36
> > [ 6709.484138] [<ffffffff81045cb7>] ? timespec_add_safe+0x32/0x5f
> > [ 6709.484146] [<ffffffff81018078>] ? read_tsc+0x9/0x1b
> > [ 6709.484155] [<ffffffff8113509a>] ? poll_select_set_timeout+0x61/0x75
> > [ 6709.484163] [<ffffffff811360d8>] sys_poll+0x4e/0xb7
> > [ 6709.484173] [<ffffffff81552896>] sysenter_dispatch+0x7/0x21
> >
>
> Hmm, this can also be reported if you have an rcu leak. Which would also
> explain your memory leak. RCU is the kernel's "garbage collector" and if
> it gets stuck, then you will definitely start seeing memory leaks, as
> memory wont be freed.
If RCU is stuck, you should see RCU CPU stall warnings, which can
give clues as to what is causing RCU to get stuck.
> Paul, know of any fixes in RCU that could have caused this?
>
> -- Steve
>
> > The taint is due to nouveau. I am sure that this
> > "sleeping-in-invalid-context" report is a consequence of the memory leak
> > that I could not convert into something reportable. But still, it is
> > something that the kernel wants me to report, that's why this e-mail.
> >
> > The kernel is configured as CONFIG_PREEMPT=y, if this is relevant.
Could you please send along your full .config?
Thanx, Paul
next prev parent reply other threads:[~2012-04-18 4:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-16 7:27 BUG: sleeping function called from invalid context at kernel/mutex.c:271 Alexander E. Patrakov
2012-04-18 2:56 ` Steven Rostedt
2012-04-18 4:06 ` Paul E. McKenney [this message]
2012-04-18 4:51 ` Alexander E. Patrakov
2012-04-18 12:08 ` Steven Rostedt
2012-04-18 13:45 ` Alexander E. Patrakov
2012-04-18 13:48 ` Steven Rostedt
2012-04-18 15:21 ` Alexander E. Patrakov
2012-04-18 16:19 ` Alexander E. Patrakov
2012-04-18 13:51 ` Paul E. McKenney
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=20120418040636.GD2449@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patrakov@gmail.com \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.