netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* query: tcpdump versus atomic?
@ 2009-10-14  4:23 William Allen Simpson
  2009-10-14 15:20 ` William Allen Simpson
  0 siblings, 1 reply; 4+ messages in thread
From: William Allen Simpson @ 2009-10-14  4:23 UTC (permalink / raw)
  To: netdev

Anybody know what code path tcpdump changes to running atomic?

Is there a function to test whether you're running atomic?

Dutifully testing, and noticed a strange anomaly.  When the code is
running normally, no problems.  When running tcpdump on the client, no
problems.  When running tcpdump on the server:

[   88.997594] device eth0 entered promiscuous mode
[  114.827403] BUG: scheduling while atomic: swapper/0/0x10000100
[  114.827462] Modules linked in: lp snd_intel8x0 snd_ac97_codec ac97_bus snd_pcm snd_timer snd ppdev iTCO_wdt iTCO_vendor_support psmouse soundcore parport_pc intel_agp parport agpgart pcspkr serio_raw shpchp snd_page_alloc 8139too aic7xxx 8139cp 
scsi_transport_spi mii floppy
[  114.827493]
[  114.827497] Pid: 0, comm: swapper Not tainted (2.6.32-rc3 #4) Imperial
[  114.827501] EIP: 0060:[<c0123295>] EFLAGS: 00000246 CPU: 0
[  114.827512] EIP is at native_safe_halt+0x5/0x10
[  114.827515] EAX: c0740000 EBX: 00000000 ECX: ffff4b6e EDX: 00000000
[  114.827519] ESI: c07992c0 EDI: c0743000 EBP: c0741fa0 ESP: c0741fa0
[  114.827522]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[  114.827525] CR0: 8005003b CR2: 09278fc4 CR3: 04b56000 CR4: 00000690
[  114.827529] DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000
[  114.827532] DR6: ffff0ff0 DR7: 00000400
[  114.827535] Call Trace:
[  114.827546]  [<c01098b5>] default_idle+0x65/0x90
[  114.827550]  [<c0102062>] cpu_idle+0x52/0x90
[  114.827558]  [<c056cc23>] rest_init+0x53/0x60
[  114.827565]  [<c079c93d>] start_kernel+0x328/0x390
[  114.827569]  [<c079c3ce>] ? unknown_bootoption+0x0/0x1f6
[  114.827574]  [<c079c07e>] i386_start_kernel+0x7e/0xa8
[  136.570632] device eth0 left promiscuous mode


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: query: tcpdump versus atomic?
  2009-10-14  4:23 query: tcpdump versus atomic? William Allen Simpson
@ 2009-10-14 15:20 ` William Allen Simpson
  2009-10-14 15:59   ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: William Allen Simpson @ 2009-10-14 15:20 UTC (permalink / raw)
  To: netdev

William Allen Simpson wrote:
> Anybody know what code path tcpdump changes to running atomic?
> 
> Is there a function to test whether you're running atomic?
> 
To partially answer my own question, after laboriously #if'ing compiling
section by section, it affects the tcp_minisockets.c code at
tcp_create_openreq_child().

I've not found a function to test.  I've found sk->sk_allocation, but
that doesn't seem to be dynamically updated to reflect the current state.

Anyway, sorry David, but there's at least two GFP_ATOMIC here (one existing,
one new).  I've managed to change the others, by careful rearrangement.  At
least, I hope so, until some future testing reveals otherwise....


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: query: tcpdump versus atomic?
  2009-10-14 15:20 ` William Allen Simpson
@ 2009-10-14 15:59   ` Stephen Hemminger
  2009-10-14 20:36     ` William Allen Simpson
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2009-10-14 15:59 UTC (permalink / raw)
  To: William Allen Simpson; +Cc: netdev

On Wed, 14 Oct 2009 11:20:12 -0400
William Allen Simpson <william.allen.simpson@gmail.com> wrote:

> William Allen Simpson wrote:
> > Anybody know what code path tcpdump changes to running atomic?
> > 
> > Is there a function to test whether you're running atomic?
> > 
> To partially answer my own question, after laboriously #if'ing compiling
> section by section, it affects the tcp_minisockets.c code at
> tcp_create_openreq_child().
> 
> I've not found a function to test.  I've found sk->sk_allocation, but
> that doesn't seem to be dynamically updated to reflect the current state.
> 
> Anyway, sorry David, but there's at least two GFP_ATOMIC here (one existing,
> one new).  I've managed to change the others, by careful rearrangement.  At
> least, I hope so, until some future testing reveals otherwise....
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

did you look at your ethernet's drivers code to turn on promiscuous mode.
It could be leaving irq's or bottom half disabled.

-- 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: query: tcpdump versus atomic?
  2009-10-14 15:59   ` Stephen Hemminger
@ 2009-10-14 20:36     ` William Allen Simpson
  0 siblings, 0 replies; 4+ messages in thread
From: William Allen Simpson @ 2009-10-14 20:36 UTC (permalink / raw)
  To: netdev

Stephen Hemminger wrote:
> On Wed, 14 Oct 2009 11:20:12 -0400
> William Allen Simpson <william.allen.simpson@gmail.com> wrote:
> 
>> William Allen Simpson wrote:
>>> Anybody know what code path tcpdump changes to running atomic?
>>>
>>> Is there a function to test whether you're running atomic?
>>>
>> To partially answer my own question, after laboriously #if'ing compiling
>> section by section, it affects the tcp_minisockets.c code at
>> tcp_create_openreq_child().
>>
>> I've not found a function to test.  I've found sk->sk_allocation, but
>> that doesn't seem to be dynamically updated to reflect the current state.
>>
> did you look at your ethernet's drivers code to turn on promiscuous mode.
> It could be leaving irq's or bottom half disabled.
> 
[    2.876485] eth0: RealTek RTL8139 at 0x2000, 00:40:2b:6b:61:36, IRQ 17
[    2.876490] eth0:  Identified 8139 chip type 'RTL-8101'

No idea on the driver file name, but that's a fairly popular chipset, so
the code should be fairly well reviewed.

Still, tcp shouldn't be processed with interrupts disabled.  That's *way*
too much code....

And we need a function that tells us whether we're atomic already....  And
better function header descriptions that mention the assumptions.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-14 20:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-14  4:23 query: tcpdump versus atomic? William Allen Simpson
2009-10-14 15:20 ` William Allen Simpson
2009-10-14 15:59   ` Stephen Hemminger
2009-10-14 20:36     ` William Allen Simpson

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).