From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Michal Hocko <mhocko@suse.cz>, Ingo Molnar <mingo@elte.hu>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org
Subject: Re: BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4
Date: Fri, 18 Feb 2011 17:01:28 -0200 [thread overview]
Message-ID: <20110218190128.GF13211@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTikh4oaR6CBK3NBazer7yjhE0VndsUB5FCDRsbJc@mail.gmail.com>
Em Fri, Feb 18, 2011 at 10:48:18AM -0800, Linus Torvalds escreveu:
> On Fri, Feb 18, 2011 at 10:08 AM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
> >
> > I am still getting programs segfaulting but that is happening on other
> > machines running on older kernels so I am going to chalk that up to a
> > buggy test and a false positive.
>
> Ok.
>
> > I am have OOM problems getting my tests run to complete. On a good
> > day that happens about 1 time in 3 right now. I'm guess I will have
> > to turn off DEBUG_PAGEALLOC to get everything to complete.
> > DEBUG_PAGEALLOC causes us to use more memory doesn't it?
>
> It does use a bit more memory, but it shouldn't be _that_ noticeable.
> The real cost of DEBUG_PAGEALLOC is all the crazy page table
> operations and TLB flushes we do for each allocation/deallocation. So
> DEBUG_PAGEALLOC is very CPU-intensive, but it shouldn't have _that_
> much of a memory overhead - just some trivial overhead due to not
> being able to use largepages for the normal kernel identity mappings.
>
> But there might be some other interaction with OOM that I haven't thought about.
>
> > The most interesting thing I have right now is a networking lockdep
> > issue. Does anyone know what is going on there?
>
> This seems to be a fairly straightforward bug.
>
> In net/ipv4/inet_timewait_sock.c we have this:
>
> /* These are always called from BH context. See callers in
> * tcp_input.c to verify this.
> */
>
> /* This is for handling early-kills of TIME_WAIT sockets. */
> void inet_twsk_deschedule(struct inet_timewait_sock *tw,
> struct inet_timewait_death_row *twdr)
> {
> spin_lock(&twdr->death_lock);
> ..
>
> and the intention is clearly that that spin_lock is BH-safe because
> it's called from BH context.
>
> Except that clearly isn't true. It's called from a worker thread:
>
> > stack backtrace:
> > Pid: 10833, comm: kworker/u:1 Not tainted 2.6.38-rc4-359399.2010AroraKernelBeta.fc14.x86_64 #1
> > Call Trace:
> > [<ffffffff81460e69>] ? inet_twsk_deschedule+0x29/0xa0
> > [<ffffffff81460fd6>] ? inet_twsk_purge+0xf6/0x180
> > [<ffffffff81460f10>] ? inet_twsk_purge+0x30/0x180
> > [<ffffffff814760fc>] ? tcp_sk_exit_batch+0x1c/0x20
> > [<ffffffff8141c1d3>] ? ops_exit_list.clone.0+0x53/0x60
> > [<ffffffff8141c520>] ? cleanup_net+0x100/0x1b0
> > [<ffffffff81068c47>] ? process_one_work+0x187/0x4b0
> > [<ffffffff81068be1>] ? process_one_work+0x121/0x4b0
> > [<ffffffff8141c420>] ? cleanup_net+0x0/0x1b0
> > [<ffffffff8106a65c>] ? worker_thread+0x15c/0x330
>
> so it can deadlock with a BH happening at the same time, afaik.
>
> The code (and comment) is all from 2005, it looks like the BH->worker
> thread has broken the code. But somebody who knows that code better
> should take a deeper look at it.
>
> Added acme to the cc, since the code is attributed to him back in 2005
> ;). Although I don't know how active he's been in networking lately
> (seems to be all perf-related). Whatever, it can't hurt.
Original code is ANK's, I just made it possible to use with DCCP, and
yeah, the smiley is appropriate, something 6 years old and the world
around it changing continually... well, thanks for the git blame ;-)
- Arnaldo
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Michal Hocko <mhocko@suse.cz>, Ingo Molnar <mingo@elte.hu>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org
Subject: Re: BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4
Date: Fri, 18 Feb 2011 17:01:28 -0200 [thread overview]
Message-ID: <20110218190128.GF13211@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTikh4oaR6CBK3NBazer7yjhE0VndsUB5FCDRsbJc@mail.gmail.com>
Em Fri, Feb 18, 2011 at 10:48:18AM -0800, Linus Torvalds escreveu:
> On Fri, Feb 18, 2011 at 10:08 AM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
> >
> > I am still getting programs segfaulting but that is happening on other
> > machines running on older kernels so I am going to chalk that up to a
> > buggy test and a false positive.
>
> Ok.
>
> > I am have OOM problems getting my tests run to complete. On a good
> > day that happens about 1 time in 3 right now. I'm guess I will have
> > to turn off DEBUG_PAGEALLOC to get everything to complete.
> > DEBUG_PAGEALLOC causes us to use more memory doesn't it?
>
> It does use a bit more memory, but it shouldn't be _that_ noticeable.
> The real cost of DEBUG_PAGEALLOC is all the crazy page table
> operations and TLB flushes we do for each allocation/deallocation. So
> DEBUG_PAGEALLOC is very CPU-intensive, but it shouldn't have _that_
> much of a memory overhead - just some trivial overhead due to not
> being able to use largepages for the normal kernel identity mappings.
>
> But there might be some other interaction with OOM that I haven't thought about.
>
> > The most interesting thing I have right now is a networking lockdep
> > issue. Does anyone know what is going on there?
>
> This seems to be a fairly straightforward bug.
>
> In net/ipv4/inet_timewait_sock.c we have this:
>
> /* These are always called from BH context. See callers in
> * tcp_input.c to verify this.
> */
>
> /* This is for handling early-kills of TIME_WAIT sockets. */
> void inet_twsk_deschedule(struct inet_timewait_sock *tw,
> struct inet_timewait_death_row *twdr)
> {
> spin_lock(&twdr->death_lock);
> ..
>
> and the intention is clearly that that spin_lock is BH-safe because
> it's called from BH context.
>
> Except that clearly isn't true. It's called from a worker thread:
>
> > stack backtrace:
> > Pid: 10833, comm: kworker/u:1 Not tainted 2.6.38-rc4-359399.2010AroraKernelBeta.fc14.x86_64 #1
> > Call Trace:
> > [<ffffffff81460e69>] ? inet_twsk_deschedule+0x29/0xa0
> > [<ffffffff81460fd6>] ? inet_twsk_purge+0xf6/0x180
> > [<ffffffff81460f10>] ? inet_twsk_purge+0x30/0x180
> > [<ffffffff814760fc>] ? tcp_sk_exit_batch+0x1c/0x20
> > [<ffffffff8141c1d3>] ? ops_exit_list.clone.0+0x53/0x60
> > [<ffffffff8141c520>] ? cleanup_net+0x100/0x1b0
> > [<ffffffff81068c47>] ? process_one_work+0x187/0x4b0
> > [<ffffffff81068be1>] ? process_one_work+0x121/0x4b0
> > [<ffffffff8141c420>] ? cleanup_net+0x0/0x1b0
> > [<ffffffff8106a65c>] ? worker_thread+0x15c/0x330
>
> so it can deadlock with a BH happening at the same time, afaik.
>
> The code (and comment) is all from 2005, it looks like the BH->worker
> thread has broken the code. But somebody who knows that code better
> should take a deeper look at it.
>
> Added acme to the cc, since the code is attributed to him back in 2005
> ;). Although I don't know how active he's been in networking lately
> (seems to be all perf-related). Whatever, it can't hurt.
Original code is ANK's, I just made it possible to use with DCCP, and
yeah, the smiley is appropriate, something 6 years old and the world
around it changing continually... well, thanks for the git blame ;-)
- Arnaldo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Arnaldo Carvalho de Melo <acme@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Michal Hocko <mhocko@suse.cz>, Ingo Molnar <mingo@elte.hu>,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Eric Dumazet <eric.dumazet@gmail.com>,
netdev@vger.kernel.org
Subject: Re: BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4
Date: Fri, 18 Feb 2011 17:01:28 -0200 [thread overview]
Message-ID: <20110218190128.GF13211@ghostprotocols.net> (raw)
In-Reply-To: <AANLkTikh4oaR6CBK3NBazer7yjhE0VndsUB5FCDRsbJc@mail.gmail.com>
Em Fri, Feb 18, 2011 at 10:48:18AM -0800, Linus Torvalds escreveu:
> On Fri, Feb 18, 2011 at 10:08 AM, Eric W. Biederman
> <ebiederm@xmission.com> wrote:
> >
> > I am still getting programs segfaulting but that is happening on other
> > machines running on older kernels so I am going to chalk that up to a
> > buggy test and a false positive.
>
> Ok.
>
> > I am have OOM problems getting my tests run to complete. On a good
> > day that happens about 1 time in 3 right now. I'm guess I will have
> > to turn off DEBUG_PAGEALLOC to get everything to complete.
> > DEBUG_PAGEALLOC causes us to use more memory doesn't it?
>
> It does use a bit more memory, but it shouldn't be _that_ noticeable.
> The real cost of DEBUG_PAGEALLOC is all the crazy page table
> operations and TLB flushes we do for each allocation/deallocation. So
> DEBUG_PAGEALLOC is very CPU-intensive, but it shouldn't have _that_
> much of a memory overhead - just some trivial overhead due to not
> being able to use largepages for the normal kernel identity mappings.
>
> But there might be some other interaction with OOM that I haven't thought about.
>
> > The most interesting thing I have right now is a networking lockdep
> > issue. Does anyone know what is going on there?
>
> This seems to be a fairly straightforward bug.
>
> In net/ipv4/inet_timewait_sock.c we have this:
>
> /* These are always called from BH context. See callers in
> * tcp_input.c to verify this.
> */
>
> /* This is for handling early-kills of TIME_WAIT sockets. */
> void inet_twsk_deschedule(struct inet_timewait_sock *tw,
> struct inet_timewait_death_row *twdr)
> {
> spin_lock(&twdr->death_lock);
> ..
>
> and the intention is clearly that that spin_lock is BH-safe because
> it's called from BH context.
>
> Except that clearly isn't true. It's called from a worker thread:
>
> > stack backtrace:
> > Pid: 10833, comm: kworker/u:1 Not tainted 2.6.38-rc4-359399.2010AroraKernelBeta.fc14.x86_64 #1
> > Call Trace:
> > [<ffffffff81460e69>] ? inet_twsk_deschedule+0x29/0xa0
> > [<ffffffff81460fd6>] ? inet_twsk_purge+0xf6/0x180
> > [<ffffffff81460f10>] ? inet_twsk_purge+0x30/0x180
> > [<ffffffff814760fc>] ? tcp_sk_exit_batch+0x1c/0x20
> > [<ffffffff8141c1d3>] ? ops_exit_list.clone.0+0x53/0x60
> > [<ffffffff8141c520>] ? cleanup_net+0x100/0x1b0
> > [<ffffffff81068c47>] ? process_one_work+0x187/0x4b0
> > [<ffffffff81068be1>] ? process_one_work+0x121/0x4b0
> > [<ffffffff8141c420>] ? cleanup_net+0x0/0x1b0
> > [<ffffffff8106a65c>] ? worker_thread+0x15c/0x330
>
> so it can deadlock with a BH happening at the same time, afaik.
>
> The code (and comment) is all from 2005, it looks like the BH->worker
> thread has broken the code. But somebody who knows that code better
> should take a deeper look at it.
>
> Added acme to the cc, since the code is attributed to him back in 2005
> ;). Although I don't know how active he's been in networking lately
> (seems to be all perf-related). Whatever, it can't hurt.
Original code is ANK's, I just made it possible to use with DCCP, and
yeah, the smiley is appropriate, something 6 years old and the world
around it changing continually... well, thanks for the git blame ;-)
- Arnaldo
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-02-18 19:01 UTC|newest]
Thread overview: 106+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-16 18:52 BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4 Michal Hocko
2011-02-16 19:37 ` Ingo Molnar
2011-02-16 19:37 ` Ingo Molnar
2011-02-16 19:50 ` Linus Torvalds
2011-02-16 19:50 ` Linus Torvalds
2011-02-16 20:09 ` Linus Torvalds
2011-02-16 20:09 ` Linus Torvalds
2011-02-16 20:51 ` Linus Torvalds
2011-02-16 20:51 ` Linus Torvalds
2011-02-17 9:09 ` Michal Hocko
2011-02-17 9:09 ` Michal Hocko
2011-02-17 16:13 ` Linus Torvalds
2011-02-17 16:13 ` Linus Torvalds
2011-02-17 16:26 ` Michal Hocko
2011-02-17 16:26 ` Michal Hocko
2011-02-17 16:35 ` Ingo Molnar
2011-02-17 16:35 ` Ingo Molnar
2011-02-17 18:57 ` Eric W. Biederman
2011-02-17 18:57 ` Eric W. Biederman
2011-02-17 19:11 ` Linus Torvalds
2011-02-17 19:11 ` Linus Torvalds
2011-02-17 19:31 ` Eric W. Biederman
2011-02-17 19:31 ` Eric W. Biederman
2011-02-18 3:16 ` Eric W. Biederman
2011-02-18 3:16 ` Eric W. Biederman
2011-02-18 4:30 ` Linus Torvalds
2011-02-18 4:30 ` Linus Torvalds
2011-02-18 4:36 ` David Miller
2011-02-18 4:36 ` David Miller
2011-02-18 6:25 ` Eric Dumazet
2011-02-18 6:25 ` Eric Dumazet
2011-02-18 7:29 ` Eric Dumazet
2011-02-18 7:29 ` Eric Dumazet
2011-02-18 8:54 ` [PATCH 1/2] net: dont leave active on stack LIST_HEAD Eric Dumazet
2011-02-18 8:54 ` Eric Dumazet
2011-02-18 20:14 ` David Miller
2011-02-18 20:14 ` David Miller
2011-02-18 4:38 ` BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4 Linus Torvalds
2011-02-18 4:38 ` Linus Torvalds
2011-02-18 4:40 ` David Miller
2011-02-18 4:40 ` David Miller
2011-02-18 4:57 ` Linus Torvalds
2011-02-18 4:57 ` Linus Torvalds
2011-02-18 8:29 ` Eric W. Biederman
2011-02-18 8:29 ` Eric W. Biederman
2011-02-18 5:20 ` Eric W. Biederman
2011-02-18 5:20 ` Eric W. Biederman
2011-02-18 8:41 ` Eric Dumazet
2011-02-18 8:41 ` Eric Dumazet
2011-02-18 8:59 ` [PATCH 2/2] net: deinit automatic LIST_HEAD Eric Dumazet
2011-02-18 8:59 ` Eric Dumazet
2011-02-18 20:14 ` David Miller
2011-02-18 20:14 ` David Miller
2011-02-18 12:29 ` BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4 Michal Hocko
2011-02-18 12:29 ` Michal Hocko
2011-02-18 16:26 ` Michal Hocko
2011-02-18 16:26 ` Michal Hocko
2011-02-18 16:39 ` Linus Torvalds
2011-02-18 16:39 ` Linus Torvalds
2011-02-18 18:08 ` Eric W. Biederman
2011-02-18 18:08 ` Eric W. Biederman
2011-02-18 18:08 ` Eric W. Biederman
2011-02-18 18:48 ` Linus Torvalds
2011-02-18 18:48 ` Linus Torvalds
2011-02-18 19:01 ` Arnaldo Carvalho de Melo [this message]
2011-02-18 19:01 ` Arnaldo Carvalho de Melo
2011-02-18 19:01 ` Arnaldo Carvalho de Melo
2011-02-18 19:11 ` Arnaldo Carvalho de Melo
2011-02-18 19:11 ` Arnaldo Carvalho de Melo
2011-02-18 20:38 ` Eric W. Biederman
2011-02-18 20:38 ` Eric W. Biederman
2011-02-19 8:35 ` [PATCH] tcp: fix inet_twsk_deschedule() Eric Dumazet
2011-02-19 8:35 ` Eric Dumazet
2011-02-19 8:35 ` Eric Dumazet
2011-02-20 2:59 ` David Miller
2011-02-20 2:59 ` David Miller
2011-02-18 19:13 ` BUG: Bad page map in process udevd (anon_vma: (null)) in 2.6.38-rc4 Eric Dumazet
2011-02-18 19:13 ` Eric Dumazet
2011-02-18 19:56 ` David Miller
2011-02-18 19:56 ` David Miller
2011-02-19 6:22 ` Eric W. Biederman
2011-02-19 6:22 ` Eric W. Biederman
2011-02-19 15:33 ` Linus Torvalds
2011-02-19 15:33 ` Linus Torvalds
2011-02-20 2:01 ` Eric W. Biederman
2011-02-20 2:01 ` Eric W. Biederman
2011-02-20 6:15 ` Linus Torvalds
2011-02-20 6:15 ` Linus Torvalds
2011-02-20 8:27 ` Eric Dumazet
2011-02-20 8:27 ` Eric Dumazet
2011-02-20 19:53 ` David Miller
2011-02-20 19:53 ` David Miller
2011-02-20 21:34 ` Eric W. Biederman
2011-02-20 21:34 ` Eric W. Biederman
2011-02-18 8:54 ` Michal Hocko
2011-02-18 8:54 ` Michal Hocko
2011-02-20 12:43 ` Ingo Molnar
2011-02-20 12:43 ` Ingo Molnar
2011-02-17 16:36 ` Eric Dumazet
2011-02-17 16:36 ` Eric Dumazet
2011-02-17 17:07 ` Linus Torvalds
2011-02-17 19:36 ` Eric Dumazet
2011-02-17 19:36 ` Eric Dumazet
2011-02-17 20:18 ` Linus Torvalds
2011-02-16 20:13 ` Ingo Molnar
2011-02-16 20:13 ` 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=20110218190128.GF13211@ghostprotocols.net \
--to=acme@redhat.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.cz \
--cc=mingo@elte.hu \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.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.