From nobody@FreeBSD.org  Sat Mar 22 12:14:23 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC8DF106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Mar 2008 12:14:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id CE7FC8FC21
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Mar 2008 12:14:23 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2MCEH9K087103
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 22 Mar 2008 12:14:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2MCEHTF087102;
	Sat, 22 Mar 2008 12:14:17 GMT
	(envelope-from nobody)
Message-Id: <200803221214.m2MCEHTF087102@www.freebsd.org>
Date: Sat, 22 Mar 2008 12:14:17 GMT
From: Dmitry Demidov <dima_bsd@inbox.lv>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Kernel panics with device polling and snd_emu10k1.ko enabled and network load
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121962
>Category:       kern
>Synopsis:       [sound] [snd_emu10k1] [panic] Kernel panics with device polling and snd_emu10k1.ko enabled and network load
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 22 12:20:00 UTC 2008
>Closed-Date:    
>Last-Modified:  Mon Jul 27 09:21:38 UTC 2009
>Originator:     Dmitry Demidov
>Release:        7.0-RELEASE FreeBSD 7.0-RELEASE #0
>Organization:
>Environment:
uname -a:
FreeBSD hius.local.home 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Sat Mar 22 12:08:01 EET 2008     root@hius.local.home:/usr/obj/usr/src/sys/HIUS  i386
---

dmesg
Copyright (c) 1992-2008 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.0-RELEASE #0: Sat Mar 22 12:08:01 EET 2008
    root@hius.local.home:/usr/obj/usr/src/sys/HIUS
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) 4 CPU 2.53GHz (2545.58-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0xf27  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x400<CNXT-ID>
real memory  = 1073676288 (1023 MB)
avail memory = 1037107200 (989 MB)
ACPI APIC Table: <GBT    AWRDACPI>
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <GBT AWRDACPI> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
cpu0: <ACPI CPU> on acpi0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff,0x4000-0x40bf on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <Intel 82845G host to AGP bridge> on hostb0
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
nvidia0: <GeForce4 Ti 4200 with AGP8X> mem 0xd8000000-0xd8ffffff,0xd0000000-0xd7ffffff irq 16 at device 0.0 on pci1
nvidia0: [GIANT-LOCKED]
nvidia0: [ITHREAD]
uhci0: <Intel 82801DB (ICH4) USB controller USB-A> port 0xb800-0xb81f irq 16 at device 29.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <Intel 82801DB (ICH4) USB controller USB-A> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <Intel 82801DB (ICH4) USB controller USB-B> port 0xb000-0xb01f irq 19 at device 29.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <Intel 82801DB (ICH4) USB controller USB-B> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <Intel 82801DB (ICH4) USB controller USB-C> port 0xb400-0xb41f irq 18 at device 29.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <Intel 82801DB (ICH4) USB controller USB-C> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
ehci0: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> mem 0xdc100000-0xdc1003ff irq 23 at device 29.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <Intel 82801DB/L/M (ICH4) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
pcib2: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcm0: <Creative EMU10K1> port 0x9000-0x901f irq 21 at device 1.0 on pci2
pcm0: <TriTech TR28602 AC97 Codec>
pcm0: [ITHREAD]
fxp0: <Intel 82558 Pro/100 Ethernet> port 0x9800-0x981f mem 0xdc000000-0xdc000fff,0xdb000000-0xdb0fffff irq 22 at device 2.0 on pci2
miibus0: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> PHY 1 on miibus0
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: Ethernet address: 00:90:27:1a:c5:a3
fxp0: [ITHREAD]
fwohci0: <VIA Fire II (VT6306)> port 0x9c00-0x9c7f mem 0xdb120000-0xdb1207ff irq 16 at device 7.0 on pci2
fwohci0: [FILTER]
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 8.
fwohci0: EUI64 00:00:20:ed:00:77:6d:65
fwohci0: Phy 1394a available S400, 3 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:00:20:77:6d:65
fwe0: Ethernet address: 02:00:20:77:6d:65
fwip0: <IP over FireWire> on firewire0
fwip0: Firewire address: 00:00:20:ed:00:77:6d:65 @ 0xfffe00000000, S400, maxrec 2048
dcons_crom0: <dcons configuration ROM> on firewire0
dcons_crom0: bus_addr 0x1370000
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: BUS reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
em0: <Intel(R) PRO/1000 Network Connection Version - 6.7.3> port 0xa000-0xa03f mem 0xdb100000-0xdb11ffff irq 21 at device 9.0 on pci2
em0: Ethernet address: 00:20:ed:33:35:13
em0: [FILTER]
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH4 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
ata1: <ATA channel 1> on atapci0
ata1: [ITHREAD]
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
fdc0: <floppy drive controller> port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on acpi0
fdc0: [FILTER]
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
sio1: <Generic IRDA-compatible device> port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sio1: [FILTER]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
pmtimer0 on isa0
orm0: <ISA Option ROM> at iomem 0xd0000-0xd7fff pnpid ORM0000 on isa0
ppc0: <Parallel port> at port 0x378-0x37f irq 7 on isa0
ppc0: SMC-like chipset (ECP/EPP/PS2/NIBBLE) in COMPATIBLE mode
ppc0: FIFO with 16/16/16 bytes threshold
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ugen0: <American Power Conversion Back-UPS CS 500 FW:808.q5.I USB FW:q5, class 0/0, rev 1.10/0.06, addr 2> on uhub0
ums0: <Microsoft Basic Optical Mouse, class 0/0, rev 1.10/0.00, addr 2> on uhub2
ums0: 3 buttons and Z dir.
Timecounter "TSC" frequency 2545584048 Hz quality 800
Timecounters tick every 1.000 msec
ipfw2 initialized, divert loadable, rule-based forwarding disabled, default to deny, logging limited to 10 packets/entry by default
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
ad0: 114498MB <SAMSUNG SP1213N TL100-24> at ata0-master UDMA100
acd0: DVDR <DVDRW DRW-3S167/JSG7> at ata1-master UDMA66
ad3: 19130MB <SAMSUNG SP2001H QT100-61> at ata1-slave UDMA33
cd0 at ata1 bus 0 target 0 lun 0
cd0: <DVDRW DRW-3S167 JSG7> Removable CD-ROM SCSI-0 device
cd0: 66.000MB/s transfers
Trying to mount root from ufs:/dev/ad0s2a
>Description:
I met 100% reproducible kernel panic when DEVICE_POLLING is enabled and sound sustem is active.

If I enable polling for my em0 using ifconfig/rc.conf, start playing audio, and in parallel, start to download some stuff with full speed of my internet connection - there is always the same result - kernel panics. All this conditions (polling+audio+download) should be achieved in one time to generate panic.

My sound card is SB Live and I use snd_emu10k1 driver (compiled in or loaded as module). To test this problem, I have builded GENERIC kernel with this set of options:
options         DEVICE_POLLING
options         HZ="1000"

kldstat:
Id Refs Address    Size     Name
 1   10 0xc0400000 b51968   kernel
 2    1 0xc0f52000 85a4     snd_emu10k1.ko
 3    3 0xc0f5b000 4836c    sound.ko
 4    1 0xc0fa4000 6722c    acpi.ko
 5    1 0xc4b31000 2000     rtc.ko
 6    1 0xc4b33000 21000    linux.ko


my make.conf is:
PERL_VER=5.8.8
PERL_VERSION=5.8.8
CPUTYPE=pentium4
CFLAGS+= -pipe
COPTFLAGS+= -pipe

mp3 audio playing has been done using XMMS from KDE, and mocp/mpg321 from console. Audio has been played from regular user account.
xmms-1.2.11_2
moc-2.4.1_3
mpg321-0.2.10_7

My Internet connection is DSL line with 230KB/64KB speed. Panics occur then I fill up this channel with http download trafic. There is no firewall in kernel/modules loaded during tests.


/var/crash:

cat ./info.7
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 65011712B (62 MB)
  Blocksize: 512
  Dumptime: Sat Mar 22 11:53:24 2008
  Hostname: hius.local.home
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Sat Mar 22 11:12:14 EET 2008
    root@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY
  Panic String: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
  Dump Parity: 2072778861
  Bounds: 7
  Dump Status: good

cat ./info.6
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 121036800B (115 MB)
  Blocksize: 512
  Dumptime: Sat Mar 22 10:56:41 2008
  Hostname: hius.local.home
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Fri Mar 21 22:20:44 EET 2008
    root@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY
  Panic String: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
  Dump Parity: 2808929151
  Bounds: 6
  Dump Status: good

cat ./info.5
Dump header from device /dev/ad0s2b
  Architecture: i386
  Architecture Version: 2
  Dump Length: 65126400B (62 MB)
  Blocksize: 512
  Dumptime: Sat Mar 22 10:48:35 2008
  Hostname: hius.local.home
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 7.0-RELEASE #0: Fri Mar 21 22:20:44 EET 2008
    root@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY
  Panic String: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
  Dump Parity: 2369916027
  Bounds: 5
  Dump Status: good
>How-To-Repeat:
1) Build/install GENERIC kernel with options:
options         DEVICE_POLLING
options         HZ="1000"

2) /boot/loader.conf
snd_emu10k1_load="YES"

3) ifconfig em0 polling

4) mpg321 ./some_nice_audio.mp3

5) fetch http://some.site.com/some_big_file
5) links net.apollo.lv/download_meter

>Fix:


>Release-Note:
>Audit-Trail:

From: "Remko Lodder" <remko@elvandar.org>
To: "Dmitry Demidov" <dima_bsd@inbox.lv>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and 
     snd_emu10k1.ko enabled and network load
Date: Sat, 22 Mar 2008 14:54:22 +0100 (CET)

 On Sat, March 22, 2008 1:14 pm, Dmitry Demidov wrote:
 >
 
 Hello,
 
 Thanks for submitting this; can you please review
 http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
 and return is the information? Make sure you reply-all to this message to
 get it properly recorded for others.
 
 Without that it's rather difficult to see why something crashed and what
 caused it (as you mention three or four different things occur at the same
 time, only one of them probably triggers a panic).
 
 Thanks,
 remko
 
 -- 
 /"\   Best regards,                      | remko@FreeBSD.org
 \ /   Remko Lodder                       | remko@EFnet
  X    http://www.evilcoder.org/          |
 / \   ASCII Ribbon Campaign              | Against HTML Mail and News
 
 
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Sat Mar 22 14:06:07 UTC 2008 
State-Changed-Why:  
I asked for additional information about the coredumps. Set status to 
feedback 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121962 

From: Dmitry Demidov <dima_bsd@inbox.lv>
To: remko@elvandar.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and  snd_emu10k1.ko enabled and network load
Date: Sat, 22 Mar 2008 18:20:08 +0200

 On Saturday 22 March 2008, Remko Lodder wrote:
 > On Sat, March 22, 2008 1:14 pm, Dmitry Demidov wrote:
 >
 >
 > Hello,
 >
 > Thanks for submitting this; can you please review
 > http://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug.html
 > and return is the information? Make sure you reply-all to this message to
 > get it properly recorded for others.
 >
 > Without that it's rather difficult to see why something crashed and what
 > caused it (as you mention three or four different things occur at the same
 > time, only one of them probably triggers a panic).
 >
 > Thanks,
 > remko
 
 
 Thanks for support. 
 Here are the output of kgdb and some more info.
 Can I do more to help you trace this?
 
 
 ---
 
 kgdb kernel.debug /var/crash/vmcore.8
 
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-marcel-freebsd".
 
 Unread portion of the kernel message buffer:
 panic: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
 cpuid = 0
 Uptime: 2m40s
 Physical memory: 1007 MB
 Dumping 62 MB: 47 31 15
 
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 241             dumptid = curthread->td_tid;
 
 ---
 
 cat /var/crash/info.8
 
 Dump header from device /dev/ad0s2b
   Architecture: i386
   Architecture Version: 2
   Dump Length: 65060864B (62 MB)
   Blocksize: 512
   Dumptime: Sat Mar 22 17:15:49 2008
   Hostname: hius.local.home
   Magic: FreeBSD Kernel Dump
   Version String: FreeBSD 7.0-RELEASE #0: Sat Mar 22 16:44:18 EET 2008
     root@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY
   Panic String: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
   Dump Parity: 3434092906
   Bounds: 8
   Dump Status: good
 
 ---
 
 kldstat
 
 Id Refs Address    Size     Name
  1   10 0xc0400000 b51968   kernel
  2    1 0xc0f52000 85a4     snd_emu10k1.ko
  3    3 0xc0f5b000 4836c    sound.ko
  4    1 0xc0fa4000 6722c    acpi.ko
  5    1 0xc4b2f000 2000     rtc.ko
  6    1 0xc4b31000 21000    linux.ko
 
 ---
 
 ps auxw
 
 USER    PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND
 root     11 97.8  0.0     0     8  ??  RL    5:13PM   0:42.42 [idle: cpu0]
 root      0  0.0  0.0     0     0  ??  WLs   5:13PM   0:00.00 [swapper]
 root      1  0.0  0.0  1888   456  ??  ILs   5:13PM   0:00.01 /sbin/init --
 root      2  0.0  0.0     0     8  ??  DL    5:13PM   0:00.01 [g_event]
 root      3  0.0  0.0     0     8  ??  DL    5:13PM   0:00.02 [g_up]
 root      4  0.0  0.0     0     8  ??  DL    5:13PM   0:00.03 [g_down]
 root      5  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [kqueue taskq]
 root      6  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [acpi_task_0]
 root      7  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [acpi_task_1]
 root      8  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [acpi_task_2]
 root      9  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [thread taskq]
 root     10  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [audit]
 root     12  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi1: net]
 root     13  0.0  0.0     0     8  ??  WL    5:13PM   0:00.16 [swi4: clock 
 sio]
 root     14  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi3: vm]
 root     15  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [yarrow]
 root     16  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi6: task 
 queue]
 root     17  0.0  0.0     0     8  ??  WL    5:13PM   0:00.01 [swi6: Giant 
 taskq]
 root     18  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi5: +]
 root     19  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [xpt_thrd]
 root     20  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi2: cambio]
 root     21  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq9: acpi0]
 root     22  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq16: 
 fwohci0+]
 root     23  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usb0]
 root     24  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usbtask-hc]
 root     25  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usbtask-dr]
 root     26  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq19: uhci1]
 root     27  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usb1]
 root     28  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq18: uhci2]
 root     29  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usb2]
 root     30  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq23: ehci0]
 root     31  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [usb3]
 root     32  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq21: pcm0 
 em0]
 root     33  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq22: fxp0]
 root     34  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [fw0_taskq]
 root     35  0.0  0.0     0     8  ??  IL    5:13PM   0:00.00 [fw0_probe]
 root     36  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [em0 taskq]
 root     37  0.0  0.0     0     8  ??  WL    5:13PM   0:00.01 [irq14: ata0]
 root     38  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq15: ata1]
 root     39  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [fdc0]
 root     40  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [swi0: sio]
 root     41  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq1: atkbd0]
 root     42  0.0  0.0     0     8  ??  WL    5:13PM   0:00.00 [irq7: ppbus0 
 ppc0]
 root     43  0.0  0.0     0    16  ??  DL    5:13PM   0:00.00 [sctp_iterator]
 root     44  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [pagedaemon]
 root     45  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [vmdaemon]
 root     46  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [idlepoll]
 root     47  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [pagezero]
 root     48  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [bufdaemon]
 root     49  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [syncer]
 root     50  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [vnlru]
 root     51  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [softdepflush]
 root     52  0.0  0.0     0     8  ??  DL    5:13PM   0:00.00 [schedcpu]
 root    170  0.0  0.1  1324   752  ??  Is    5:13PM   0:00.00 adjkerntz -i
 _dhcp   449  0.0  0.1  3072  1256  ??  Is    5:13PM   0:00.00 dhclient: em0 
 (dhclient)
 root    744  0.0  0.1  3208   996  ??  Is    5:13PM   
 0:00.00 /usr/sbin/moused -p /dev/ums0 -t auto -I /var/run/moused.ums0.pid
 root    802  0.0  0.1  1888   528  ??  Is    5:13PM   0:00.00 /sbin/devd
 root    873  0.0  0.1  3124  1156  ??  Ss    5:13PM   
 0:00.01 /usr/sbin/syslogd -s
 root   1015  0.0  0.1  3152  1180  ??  Is    5:13PM   
 0:00.00 /usr/sbin/cron -s
 root   1078  0.0  0.1  3124  1036  v0  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv0
 root   1079  0.0  0.1  3556  1528  v1  Is    5:13PM   0:00.02 login [pam] 
 (login)
 root   1086  0.0  0.2  4352  2092  v1  S     5:13PM   0:00.02 -bash (bash)
 root   1092  0.0  0.1  3224  1020  v1  R+    5:13PM   0:00.00 ps auxw
 root   1080  0.0  0.1  3124  1040  v2  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv2
 root   1081  0.0  0.1  3124  1040  v3  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv3
 root   1082  0.0  0.1  3124  1040  v4  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv4
 root   1083  0.0  0.1  3124  1040  v5  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv5
 root   1084  0.0  0.1  3124  1040  v6  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv6
 root   1085  0.0  0.1  3124  1040  v7  Is+   5:13PM   
 0:00.00 /usr/libexec/getty Pc ttyv7
 root    429  0.0  0.1  3072  1152 con- I+    5:13PM   0:00.00 dhclient: em0 
 [priv] (dhclient)

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, dima_bsd@inbox.lv
Cc:  
Subject: Re: kern/121962: [snd_emu10k1] [panic] Kernel panics with device
 polling and snd_emu10k1.ko enabled and network load
Date: Sat, 24 May 2008 00:16:50 +0200

 Dmitry,
 
 can you please send us a backtrace? Using the kgdb, fire a 'bt' command
 and send us the output.
 
 Thanks!

From: Dmitry Demidov <dima_bsd@inbox.lv>
To: volker@vwsoft.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and  snd_emu10k1.ko enabled and network load
Date: Sat, 24 May 2008 22:42:40 +0300

 >Dmitry,
 >
 >can you please send us a backtrace? Using the kgdb, fire a 'bt' command
 >and send us the output.
 >
 >Thanks!
 
 Here it is.
 
 
 ===
 
 Script started on Sat May 24 22:17:34 2008
 
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# uname -a
 FreeBSD hius.local.home 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Sat May 24 
 21:41:59 EEST 2008 root@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY  
 i386
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# kgdb 
 kernel.debug /var/crash/vmcore.9
 
 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
 Undefined symbol "ps_pglobal_lookup"]
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-marcel-freebsd".
 
 Unread portion of the kernel message buffer:
 panic: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
 cpuid = 0
 Uptime: 3m30s
 Physical memory: 1007 MB
 Dumping 62 MB: 47 31 15
 
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 241		dumptid = curthread->td_tid;
 (kgdb) bt
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 #1  0xc0852d7f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409
 #2  0xc08531ad in panic (fmt=Could not find the frame base for "panic".
 ) at /usr/src/sys/kern/kern_shutdown.c:563
 #3  0xc08bce07 in sbflush_internal (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:815
 #4  0xc08bce1a in sbflush_locked (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:824
 #5  0xc08bcebb in sbflush (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:832
 #6  0xc0a1d011 in tcp_disconnect (tp=0xc4bddcb0)
     at /usr/src/sys/netinet/tcp_usrreq.c:1491
 #7  0xc0a1a902 in tcp_usr_disconnect (so=0xc48c8c60)
     at /usr/src/sys/netinet/tcp_usrreq.c:578
 #8  0xc08bf5d1 in sodisconnect (so=0xc48c8c60)
     at /usr/src/sys/kern/uipc_socket.c:787
 #9  0xc08bec08 in soclose (so=0xc48c8c60)
     at /usr/src/sys/kern/uipc_socket.c:642
 #10 0xc08a083b in soo_close (fp=0xc481e360, td=0xc4977210)
     at /usr/src/sys/kern/sys_socket.c:274
 #11 0xc0816377 in fo_close (fp=0xc481e360, td=0xc4977210) at file.h:297
 #12 0xc081629c in fdrop_locked (fp=0xc481e360, td=0xc4977210)
     at /usr/src/sys/kern/kern_descrip.c:2175
 #13 0xc0816153 in fdrop (fp=0xc481e360, td=0xc4977210)
     at /usr/src/sys/kern/kern_descrip.c:2140
 #14 0xc08158e2 in closef (fp=0xc481e360, td=0xc4977210)
     at /usr/src/sys/kern/kern_descrip.c:1958
 #15 0xc0812d15 in kern_close (td=0xc4977210, fd=8)
     at /usr/src/sys/kern/kern_descrip.c:1054
 #16 0xc0812b82 in close (td=0xc4977210, uap=0xe6cb1ccc)
     at /usr/src/sys/kern/kern_descrip.c:1006
 #17 0xc0c4b3d4 in syscall (frame=0xe6cb1d38)
     at /usr/src/sys/i386/i386/trap.c:1035
 #18 0xc0c29340 in Xint0x80_syscall ()
     at /usr/src/sys/i386/i386/exception.s:196
 #19 0x00000033 in ?? ()
 Previous frame inner to this frame (corrupt stack?)
 (kgdb) 
 (kgdb) quit
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# exit
 exit
 
 Script done on Sat May 24 22:19:18 2008
 
 ===
 
 #cat /var/crash/info.9
 Dump header from device /dev/ad0s2b
   Architecture: i386
   Architecture Version: 2
   Dump Length: 65564672B (62 MB)
   Blocksize: 512
   Dumptime: Sat May 24 22:12:53 2008
   Hostname: hius.local.home
   Magic: FreeBSD Kernel Dump
   Version String: FreeBSD 7.0-RELEASE-p1 #0: Sat May 24 21:41:59 EEST 2008
     terminus@hius.local.home:/usr/obj/usr/src/sys/GENERIC_COPY
   Panic String: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
   Dump Parity: 4246574967
   Bounds: 9
   Dump Status: good
 
 ===
 

From: Volker <volker@vwsoft.com>
To: bug-followup@FreeBSD.org, dima_bsd@inbox.lv
Cc:  
Subject: Re: kern/121962: [snd_emu10k1] [panic] Kernel panics with device
 polling and snd_emu10k1.ko enabled and network load
Date: Sun, 25 May 2008 00:35:02 +0200

 Dmitry,
 
 I've just seen, you've enabled DEVICE_POLLING in kernel config. Can you
 please try to remove that option and instead use `ifconfig em0 polling'?
 
 The use of 'option DEVICE_POLLING' is deprecated.
 
 Does that make your box not panicing?
 
 Thanks!
 
 Volker

From: Dmitry Demidov <dima_bsd@inbox.lv>
To: volker@vwsoft.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and  snd_emu10k1.ko enabled and network load
Date: Sun, 25 May 2008 10:58:34 +0300

 >Dmitry,
 >
 >I've just seen, you've enabled DEVICE_POLLING in kernel config. Can you
 >please try to remove that option and instead use `ifconfig em0 polling'?
 >
 >The use of 'option DEVICE_POLLING' is deprecated.
 >
 >Does that make your box not panicing?
 >
 >Thanks!
 >
 >Volker
 
 Sorry, it did not works at all. Then option DEVICE_POLLING is removed from the 
 kernel, I'm unabled to start polling mode. 
 
 # ifconfig em0
 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 	ether 00:20:ed:11:11:11
 	inet 7.8.2.5 netmask 0xffffe000 broadcast 255.255.255.255
 	media: Ethernet autoselect (100baseTX <full-duplex>)
 	status: active
 
 # ifconfig em0 polling
 
 # ifconfig em0
 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 	ether 00:20:ed:11:11:11
 	inet 7.8.2.5 netmask 0xffffe000 broadcast 255.255.255.255
 	media: Ethernet autoselect (100baseTX <full-duplex>)
 	status: active
 
 # sysctl -a | grep pol
 kern.dcons.poll_hz: 100
 kern.sched.topology: 0
 debug.acpi.ec.polled: 0

From: Volker <volker@vwsoft.com>
To: Dmitry Demidov <dima_bsd@inbox.lv>
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and  snd_emu10k1.ko
 enabled and network load
Date: Sun, 25 May 2008 22:12:38 +0200

 Dmitry,
 
 On 05/25/08 09:58, Dmitry Demidov wrote:
 >> Dmitry,
 >>
 >> I've just seen, you've enabled DEVICE_POLLING in kernel config. Can you
 >> please try to remove that option and instead use `ifconfig em0 polling'?
 >>
 >> The use of 'option DEVICE_POLLING' is deprecated.
 
 ouch... did I really write something that stupid? I took notice while
 reading your reply.
 
 Of course, you need to have DEVICE_POLLING in kernel, but the use of
 sysctl kern.polling.enable is deprecated.
 
 > 
 > Sorry, it did not works at all. Then option DEVICE_POLLING is removed from the 
 > kernel, I'm unabled to start polling mode. 
 > 
 > # ifconfig em0
 > em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 > 	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 > 	ether 00:20:ed:11:11:11
 > 	inet 7.8.2.5 netmask 0xffffe000 broadcast 255.255.255.255
 > 	media: Ethernet autoselect (100baseTX <full-duplex>)
 > 	status: active
 > 
 > # ifconfig em0 polling
 > 
 > # ifconfig em0
 > em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
 > 	options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
 > 	ether 00:20:ed:11:11:11
 > 	inet 7.8.2.5 netmask 0xffffe000 broadcast 255.255.255.255
 > 	media: Ethernet autoselect (100baseTX <full-duplex>)
 > 	status: active
 > 
 > # sysctl -a | grep pol
 > kern.dcons.poll_hz: 100
 > kern.sched.topology: 0
 > debug.acpi.ec.polled: 0
 > 
 
 Clearly because of my wrong hint. Please try the following:
 
 include DEVICE_POLLING in your kernel config
 make sure, you don't use kern.polling.enable
 enable polling for your em0 device by using `ifconfig em0 polling'.
 
 Can you please try that?
 
 Sorry for my misinformation. Working on too much things in parallel.
 
 Volker

From: Dmitry Demidov <dima_bsd@inbox.lv>
To: volker@vwsoft.com
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: kern/121962: Kernel panics with device polling and  snd_emu10k1.ko enabled and network load
Date: Mon, 26 May 2008 22:37:46 +0300

 >Please try the following:
 >
 >include DEVICE_POLLING in your kernel config
 >make sure, you don't use kern.polling.enable
 >enable polling for your em0 device by using `ifconfig em0 polling'.
 >
 >Can you please try that?
 >
 >Sorry for my misinformation. Working on too much things in parallel.
 
 It's ok ;) 
 
 >
 >Volker
 
 I have recompilled the kernel with POLLING and HZ options, and done the tests 
 again. So, the results is:
 
 1) if polling mode are enabled using 'ifconfig em0 polling'
 
 Script started on Mon May 26 20:59:50 2008
 
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# kgdb kernel.debug /us      
 var/crash/vmcore.10
 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
 Undefined symbol "ps_pglobal_lookup"]
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-marcel-freebsd".
 
 Unread portion of the kernel message buffer:
 panic: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
 cpuid = 0
 Uptime: 4m32s
 Physical memory: 1007 MB
 Dumping 62 MB: 47 31 15
 
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 241		dumptid = curthread->td_tid;
 (kgdb) bt
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 #1  0xc0852d7f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409
 #2  0xc08531ad in panic (fmt=Could not find the frame base for "panic".
 ) at /usr/src/sys/kern/kern_shutdown.c:563
 #3  0xc08bce07 in sbflush_internal (sb=0xc48cbcb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:815
 #4  0xc08bce1a in sbflush_locked (sb=0xc48cbcb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:824
 #5  0xc08bcebb in sbflush (sb=0xc48cbcb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:832
 #6  0xc0a1d011 in tcp_disconnect (tp=0xc4be1000)
     at /usr/src/sys/netinet/tcp_usrreq.c:1491
 #7  0xc0a1a902 in tcp_usr_disconnect (so=0xc48cbc60)
     at /usr/src/sys/netinet/tcp_usrreq.c:578
 #8  0xc08bf5d1 in sodisconnect (so=0xc48cbc60)
     at /usr/src/sys/kern/uipc_socket.c:787
 #9  0xc08bec08 in soclose (so=0xc48cbc60)
     at /usr/src/sys/kern/uipc_socket.c:642
 #10 0xc08a083b in soo_close (fp=0xc481fe10, td=0xc4977630)
     at /usr/src/sys/kern/sys_socket.c:274
 #11 0xc0816377 in fo_close (fp=0xc481fe10, td=0xc4977630) at file.h:297
 #12 0xc081629c in fdrop_locked (fp=0xc481fe10, td=0xc4977630)
     at /usr/src/sys/kern/kern_descrip.c:2175
 #13 0xc0816153 in fdrop (fp=0xc481fe10, td=0xc4977630)
     at /usr/src/sys/kern/kern_descrip.c:2140
 #14 0xc08158e2 in closef (fp=0xc481fe10, td=0xc4977630)
     at /usr/src/sys/kern/kern_descrip.c:1958
 #15 0xc0812d15 in kern_close (td=0xc4977630, fd=8)
     at /usr/src/sys/kern/kern_descrip.c:1054
 #16 0xc0812b82 in close (td=0xc4977630, uap=0xe6cabccc)
     at /usr/src/sys/kern/kern_descrip.c:1006
 #17 0xc0c4b3d4 in syscall (frame=0xe6cabd38)
     at /usr/src/sys/i386/i386/trap.c:1035
 #18 0xc0c29340 in Xint0x80_syscall ()
     at /usr/src/sys/i386/i386/exception.s:196
 #19 0x00000033 in ?? ()
 Previous frame inner to this frame (corrupt stack?)
 (kgdb) quit
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# exit
 exit
 
 Script done on Mon May 26 21:00:46 2008
 
 =============
 
 2) if polling mode are enabled using '/etc/sysctl.conf kern.polling.enable=1'
 
 Script started on Mon May 26 21:10:15 2008
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# kgdb 
 kernel.debug /var/crash/vmcore.11
 [GDB will not be able to debug user-mode threads: /usr/lib/libthread_db.so: 
 Undefined symbol "ps_pglobal_lookup"]
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for details.
 This GDB was configured as "i386-marcel-freebsd".
 
 Unread portion of the kernel message buffer:
 panic: sbflush_internal: cc 4294967230 || mb 0 || mbcnt 0
 cpuid = 0
 Uptime: 3m17s
 Physical memory: 1007 MB
 Dumping 62 MB: 47 31 15
 
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 241		dumptid = curthread->td_tid;
 (kgdb) bt
 #0  doadump () at /usr/src/sys/kern/kern_shutdown.c:241
 #1  0xc0852d7f in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:409
 #2  0xc08531ad in panic (fmt=Could not find the frame base for "panic".
 ) at /usr/src/sys/kern/kern_shutdown.c:563
 #3  0xc08bce07 in sbflush_internal (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:815
 #4  0xc08bce1a in sbflush_locked (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:824
 #5  0xc08bcebb in sbflush (sb=0xc48c8cb0)
     at /usr/src/sys/kern/uipc_sockbuf.c:832
 #6  0xc0a1d011 in tcp_disconnect (tp=0xc4c11000)
     at /usr/src/sys/netinet/tcp_usrreq.c:1491
 #7  0xc0a1a902 in tcp_usr_disconnect (so=0xc48c8c60)
     at /usr/src/sys/netinet/tcp_usrreq.c:578
 #8  0xc08bf5d1 in sodisconnect (so=0xc48c8c60)
     at /usr/src/sys/kern/uipc_socket.c:787
 #9  0xc08bec08 in soclose (so=0xc48c8c60)
     at /usr/src/sys/kern/uipc_socket.c:642
 #10 0xc08a083b in soo_close (fp=0xc481fe10, td=0xc4977000)
     at /usr/src/sys/kern/sys_socket.c:274
 #11 0xc0816377 in fo_close (fp=0xc481fe10, td=0xc4977000) at file.h:297
 #12 0xc081629c in fdrop_locked (fp=0xc481fe10, td=0xc4977000)
     at /usr/src/sys/kern/kern_descrip.c:2175
 #13 0xc0816153 in fdrop (fp=0xc481fe10, td=0xc4977000)
     at /usr/src/sys/kern/kern_descrip.c:2140
 #14 0xc08158e2 in closef (fp=0xc481fe10, td=0xc4977000)
     at /usr/src/sys/kern/kern_descrip.c:1958
 #15 0xc0812d15 in kern_close (td=0xc4977000, fd=8)
     at /usr/src/sys/kern/kern_descrip.c:1054
 #16 0xc0812b82 in close (td=0xc4977000, uap=0xe6c9fccc)
     at /usr/src/sys/kern/kern_descrip.c:1006
 #17 0xc0c4b3d4 in syscall (frame=0xe6c9fd38)
     at /usr/src/sys/i386/i386/trap.c:1035
 #18 0xc0c29340 in Xint0x80_syscall ()
     at /usr/src/sys/i386/i386/exception.s:196
 #19 0x00000033 in ?? ()
 Previous frame inner to this frame (corrupt stack?)
 (kgdb) qy   uit
 [root@hius /usr/obj/usr/src/sys/GENERIC_COPY]# exit
 exit
 
 Script done on Mon May 26 21:11:04 2008
 
 ============
 
 So, there is no difference in the way how polling are enabled - result is 
 always the same...
 
 I just note, that em0 and pcm0 shares the same virtual IRQ in my system.
 pcm0: <Creative EMU10K1> port 0x9000-0x901f irq 21 at device 1.0 on pci2
 em0: <Intel(R) PRO/1000 Network Connection Version - 6.7.3> port 0xa000-0xa03f 
 mem 0xdb100000-0xdb11ffff irq 21 at device 9.0 on pci2
 
 So I repluged soundcard into another PCI slot on motherboard. The result is:
 
 # dmesg | grep em0
 em0: <Intel(R) PRO/1000 Network Connection Version - 6.7.3> port 0xa000-0xa03f 
 mem 0xdb100000-0xdb11ffff irq 21 at device 9.0 on pci2
 em0: Ethernet address: 00:20:ed:11:11:11
 em0: [FILTER]
 # dmesg | grep pcm0
 pcm0: <Creative EMU10K1> port 0x9400-0x941f irq 16 at device 3.0 on pci2
 pcm0: <TriTech TR28602 AC97 Codec>
 pcm0: [ITHREAD]
 
 And no panics any more!
 
 
 Anyway, if FreeBSD team is interested to solve this bug, I will be happy to 
 take part. It is not critical for me - this box is my home system used just 
 as KDE desktop/test system.
 Before I installed 7.0 RELEASE (it was a clean install - not upgrade), I been 
 using 6.2 RELEASE of Beastie, that did not have that panics (same hardware 
 config + polling mode + audio + internet).
 
 Thanks Volker!
 
 
 
 
 
 
>Unformatted:
