kern/121962: Kernel panics with device polling and snd_emu10k1.ko enabled and network load

Dmitry Demidov dima_bsd at inbox.lv
Mon May 26 19:40:04 UTC 2008


The following reply was made to PR kern/121962; it has been noted by GNATS.

From: Dmitry Demidov <dima_bsd at inbox.lv>
To: volker at vwsoft.com
Cc: freebsd-gnats-submit at 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 at 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 at 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 at 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 at 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!
 
 
 
 
 
 


More information about the freebsd-bugs mailing list