public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation•org>
To: Alexey Dobriyan <adobriyan@gmail•com>
Cc: Linus Torvalds <torvalds@linux-foundation•org>,
	linux-kernel@vger•kernel.org, netdev@vger•kernel.org
Subject: Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()
Date: Mon, 23 Jul 2007 15:27:12 -0700	[thread overview]
Message-ID: <20070723152712.02ded067.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070723220446.GA5822@martell.zuzino.mipt.ru>

On Tue, 24 Jul 2007 02:04:46 +0400
Alexey Dobriyan <adobriyan@gmail•com> wrote:

> On Mon, Jul 23, 2007 at 02:11:37PM -0700, Andrew Morton wrote:
> > On Tue, 24 Jul 2007 01:01:53 +0400
> > Alexey Dobriyan <adobriyan@gmail•com> wrote:
> > 
> > > On Tue, Jul 24, 2007 at 12:40:45AM +0400, Alexey Dobriyan wrote:
> > > > > I had more complete info: http://article.gmane.org/gmane.linux.network/66966
> > > > > 
> > > > > You're using DEBUG_PAGEALLOC, but I was not, so I think we can rule that out.
> > > > > 
> > > > > I haven't worked out where that kmap_atomic() call is coming from yet. 
> > > > > Both traces point up into the page allocator, but I _think_ that's stack
> > > > > gunk.
> > > > 
> > > > Ahh, you suspect networking.
> > > > 
> > > > Here, setup is 2 cheap-ass 100Mb realtek 8139 NICs, one to campus network
> > > > receiving ~20 junk packets per second, one gathering netconsole output
> > > > and ssh to it, no conntracks and fancy stuff.
> > > > 
> > > > [reboots with cables physically unplugged]
> > > 
> > > OK, I run gdb recompile, cat(1) every file in /usr/portage (shitload of
> > > small files) with both cables unplugged. It all went fine for ~5 minutes
> > > after that it crashed exactly same way after 10 secs after plugging one
> > > of them.
> > 
> > It'd be nice to get a clean trace.  Are you able to obtain the full
> > trace with CONFIG_FRAME_POINTER=y?
> 
> Sorry, no camera shot, finding camera requires wakening up M. :)
> 
> It took longer that usual, but here it is
> 
> 	kmap_atomic
> 	get_page_from_freelist
> 	__alloc_pages
> 	cache_alloc_refill
> 	__alloc_pages
> 	cache_alloc_refill
> 	kmem_cache_alloc
> 	dst_alloc
> 	ip_route_input
> 	ip_rcv
> 	netif_receive_skb
> 	rtl8139_poll
> 	net_rx_action
> 	__do_softirq
> 	do_softirq
> 	irq_exit
> 	do_IRQ
> 	common_interrupt
> 	handle_mm_fault
> 	do_page_fault
> 	error_core
> 
> much more loaded x86_64 box near also running 2.6.23-rc1 with debugging
> turned on, using atl1 driver doesn't experience any crashes.
> 
> And I found 2.6.22-b91cba52e9b7b3f1c0037908a192d93a869ca9e5-x entry on
> top of grub config which means b91cba52e9b7b3f1c0037908a192d93a869ca9e5
> _without_ any debugging was OK.

I worked out that the crash I saw was in

        BUG_ON(!pte_none(*(kmap_pte-idx)));

in the read of kmap_pte[idx].  Which would be weird as the caller is using 
a literal KM_USER0.

So maybe I goofed, and that BUG_ON is triggering (it scrolled off, and I am
unable to reproduce it now).

If that BUG_ON _is_ triggering then it might indicate that someone is doing
a __GFP_HIGHMEM|__GFP_ZERO allocation while holding KM_USER0.

If they're holding an atomic kmap then they'll be running in_atomic so it
is unlikely that they accidentally added __GFP_WAIT because lots of people
would be getting lots of might_sleep() warnings.

Hence that first VM_BUG_ON in prep_zero_page() _should_ be triggering.

Do you have CONFIG_DEBUG_VM enabled?



Also, it might be useful to apply -mm's kmap_atomic-debugging.patch.  it
will detect lots of abuse.

  reply	other threads:[~2007-07-23 22:27 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <alpine.LFD.0.999.0707221351030.3607@woody.linux-foundation.org>
     [not found] ` <20070723183839.GA5874@martell.zuzino.mipt.ru>
     [not found]   ` <20070723190152.GA5755@martell.zuzino.mipt.ru>
2007-07-23 20:24     ` 2.6.23-rc1: BUG_ON in kmap_atomic_prot() Andrew Morton
2007-07-23 20:40       ` Alexey Dobriyan
2007-07-23 21:01         ` Alexey Dobriyan
2007-07-23 21:11           ` Andrew Morton
2007-07-23 21:28             ` Linus Torvalds
2007-07-23 21:37               ` Sam Ravnborg
2007-07-24 17:59               ` Adrian Bunk
2007-07-24 18:14                 ` Linus Torvalds
2007-07-24 18:28                   ` Andrew Morton
2007-07-24 19:15                     ` Linus Torvalds
2007-07-24 19:40                       ` Adrian Bunk
2007-07-24 19:48                         ` Linus Torvalds
2007-07-26 18:07                           ` Adrian Bunk
2007-07-26 18:19                             ` Linus Torvalds
2007-07-24 20:27                       ` Andi Kleen
2007-07-24 19:45                         ` Linus Torvalds
2007-07-26  6:09                   ` commit 7e92b4fc34 - x86, serial: convert legacy COM ports to platform devices - broke my serial console H. Peter Anvin
2007-07-23 22:04             ` 2.6.23-rc1: BUG_ON in kmap_atomic_prot() Alexey Dobriyan
2007-07-23 22:27               ` Andrew Morton [this message]
2007-07-24  5:20                 ` Alexey Dobriyan
2007-07-24  8:17                 ` Jens Axboe
2007-07-24  8:22                   ` Jens Axboe
2007-07-24  8:34                     ` Andrew Morton
2007-07-24 14:00                       ` Dan Williams
2007-07-24 13:55                     ` Dan Williams
2007-07-24 10:01       ` Mike Galbraith
2007-07-24 10:37         ` Mike Galbraith
2007-07-24 16:28         ` Andrew Morton
2007-07-24 18:25           ` Linus Torvalds
2007-07-24 20:05             ` Alexey Dobriyan
2007-07-25  5:09             ` Mike Galbraith

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=20070723152712.02ded067.akpm@linux-foundation.org \
    --to=akpm@linux-foundation$(echo .)org \
    --cc=adobriyan@gmail$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=torvalds@linux-foundation$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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