From owner-freebsd-threads@FreeBSD.ORG Sun Mar 1 10:00:12 2009 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 445201065672 for ; Sun, 1 Mar 2009 10:00:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 774628FC22 for ; Sun, 1 Mar 2009 10:00:09 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n21A09VQ061172 for ; Sun, 1 Mar 2009 10:00:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n21A09oV061171; Sun, 1 Mar 2009 10:00:09 GMT (envelope-from gnats) Resent-Date: Sun, 1 Mar 2009 10:00:09 GMT Resent-Message-Id: <200903011000.n21A09oV061171@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stephane Legrand Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B90041065672 for ; Sun, 1 Mar 2009 09:56:21 +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 A6FEF8FC13 for ; Sun, 1 Mar 2009 09:56:21 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n219uL9A083259 for ; Sun, 1 Mar 2009 09:56:21 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n219uLdu083246; Sun, 1 Mar 2009 09:56:21 GMT (envelope-from nobody) Message-Id: <200903010956.n219uLdu083246@www.freebsd.org> Date: Sun, 1 Mar 2009 09:56:21 GMT From: Stephane Legrand To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: threads/132215: Crash after running ppp X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2009 10:00:13 -0000 >Number: 132215 >Category: threads >Synopsis: Crash after running ppp >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 01 10:00:09 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Stephane Legrand >Release: 7.1-STABLE >Organization: >Environment: 7.1-STABLE i386 >Description: Hi, After trying to update my system to the 7.1-STABLE of 28th february 2009, when i run ppp, it crashes the system. Here is the backtrace : sequoia# kgdb kernel.debug /var/crash/vmcore.0 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: Sleeping thread (tid 100053, pid 516) owns a non-sleepable lock panic: sleeping thread cpuid = 0 Uptime: 37s Physical memory: 1002 MB Dumping 158 MB: 143 127 111 95 79 63 47 31 15 Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from /boot/kernel/linprocfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/linprocfs.ko Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done. done. Loaded symbols for /boot/kernel/linux.ko Reading symbols from /boot/kernel/linsysfs.ko...Reading symbols from /boot/kernel/linsysfs.ko.symbols...done. done. Loaded symbols for /boot/kernel/linsysfs.ko Reading symbols from /boot/kernel/snd_hda.ko...Reading symbols from /boot/kernel/snd_hda.ko.symbols...done. done. Loaded symbols for /boot/kernel/snd_hda.ko Reading symbols from /boot/kernel/sound.ko...Reading symbols from /boot/kernel/sound.ko.symbols...done. done. Loaded symbols for /boot/kernel/sound.ko Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done. done. Loaded symbols for /boot/kernel/acpi.ko Reading symbols from /boot/kernel/netgraph.ko...Reading symbols from /boot/kernel/netgraph.ko.symbols...done. done. Loaded symbols for /boot/kernel/netgraph.ko Reading symbols from /boot/kernel/ng_ether.ko...Reading symbols from /boot/kernel/ng_ether.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_ether.ko Reading symbols from /boot/kernel/ng_pppoe.ko...Reading symbols from /boot/kernel/ng_pppoe.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_pppoe.ko Reading symbols from /boot/kernel/ng_socket.ko...Reading symbols from /boot/kernel/ng_socket.ko.symbols...done. done. Loaded symbols for /boot/kernel/ng_socket.ko Reading symbols from /boot/kernel/ipfw.ko...Reading symbols from /boot/kernel/ipfw.ko.symbols...done. done. Loaded symbols for /boot/kernel/ipfw.ko Reading symbols from /usr/local/modules/fuse.ko...done. Loaded symbols for /usr/local/modules/fuse.ko Reading symbols from /boot/kernel/accf_http.ko...Reading symbols from /boot/kernel/accf_http.ko.symbols...done. done. Loaded symbols for /boot/kernel/accf_http.ko Reading symbols from /boot/kernel/i915.ko...done. Loaded symbols for /boot/kernel/i915.ko Reading symbols from /boot/kernel/drm.ko...done. Loaded symbols for /boot/kernel/drm.ko #0 doadump () at pcpu.h:196 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); (kgdb) bt #0 doadump () at pcpu.h:196 #1 0xc075c6df in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 #2 0xc075c9a4 in panic (fmt=Variable "fmt" is not available. ) at /usr/src/sys/kern/kern_shutdown.c:574 #3 0xc078eeec in propagate_priority (td=0xc444a690) at /usr/src/sys/kern/subr_turnstile.c:222 #4 0xc078fd11 in turnstile_wait (ts=0xc4260e60, owner=0xc444a690, queue=Variable "queue" is not available. ) at /usr/src/sys/kern/subr_turnstile.c:740 #5 0xc074f6b3 in _mtx_lock_sleep (m=0xc4267e7c, tid=3297722368, opts=0, file=0x0, line=0) at /usr/src/sys/kern/kern_mutex.c:420 #6 0xc0800fbe in rtalloc1_fib (dst=0xe6a1caa8, report=0, ignflags=0, fibnum=0) at /usr/src/sys/net/route.c:296 #7 0xc080194c in rtalloc1 (dst=0xe6a1caa8, report=0, ignflags=0) at /usr/src/sys/net/route.c:266 #8 0xc08b8c74 in selectroute (dstsock=0xc48367c0, opts=0x0, mopts=Variable "mopts" is not available. ) at /usr/src/sys/netinet6/in6_src.c:597 #9 0xc08b8ec8 in in6_selectif (dstsock=0xc48367c0, opts=0x0, mopts=0x0, ro=0x0, retifp=0xe6a1cb54) at /usr/src/sys/netinet6/in6_src.c:673 #10 0xc08b936d in in6_selectsrc (dstsock=0xc48367c0, opts=0x0, inp=0xc450a168, ro=0x0, cred=0xc49d1600, ifpp=0xe6a1cb9c, errorp=0xe6a1cba0) at /usr/src/sys/netinet6/in6_src.c:261 #11 0xc08b6acb in in6_pcbladdr (inp=0xc450a168, nam=0xc48367c0, plocal_addr6=0xe6a1cbd8) at /usr/src/sys/netinet6/in6_pcb.c:325 #12 0xc08b705d in in6_pcbconnect (inp=0xc450a168, nam=0xc48367c0, cred=0xc49d1600) at /usr/src/sys/netinet6/in6_pcb.c:370 #13 0xc08d0b4c in udp6_connect (so=0xc4a3c000, nam=0xc48367c0, td=0xc48f4000) at /usr/src/sys/netinet6/udp6_usrreq.c:867 #14 0xc07acda7 in soconnect (so=0xc4a3c000, nam=0xc48367c0, td=0xc48f4000) at /usr/src/sys/kern/uipc_socket.c:768 #15 0xc07b3ebc in kern_connect (td=0xc48f4000, fd=18, sa=0xc48367c0) at /usr/src/sys/kern/uipc_syscalls.c:570 #16 0xc07b4041 in connect (td=0xc48f4000, uap=0xe6a1ccfc) at /usr/src/sys/kern/uipc_syscalls.c:534 #17 0xc09fdd08 in syscall (frame=0xe6a1cd38) at /usr/src/sys/i386/i386/trap.c:1090 #18 0xc09e4910 in Xint0x80_syscall () at /usr/src/sys/i386/i386/exception.s:255 #19 0x00000033 in ?? () Previous frame inner to this frame (corrupt stack?) With a -STABLE kernel of 10th january 2009, ppp works fine. Regards, Stephane Legrand. >How-To-Repeat: - Install a -STABLE kernel of 28th february 2009. - run ppp. - after a few seconds, the system crashes. >Fix: Use a kernel of 10th january 2009. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Mon Mar 2 11:07:13 2009 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99A3D1065676 for ; Mon, 2 Mar 2009 11:07:13 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 94E708FCDE for ; Mon, 2 Mar 2009 11:07:01 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n22B71EA057473 for ; Mon, 2 Mar 2009 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n22B71H6057469 for freebsd-threads@FreeBSD.org; Mon, 2 Mar 2009 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 2 Mar 2009 11:07:01 GMT Message-Id: <200903021107.n22B71H6057469@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-threads@FreeBSD.org X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 11:07:45 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o threa/132215 threads Crash after running ppp o threa/128922 threads threads hang with xorg running o threa/127225 threads bug in lib/libthr/thread/thr_init.c o threa/122923 threads 'nice' does not prevent background process from steali o threa/121336 threads lang/neko threading ok on UP, broken on SMP (FreeBSD 7 o threa/118715 threads kse problem o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP o threa/116181 threads /dev/io-related io access permissions are not propagat o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/110636 threads [request] gdb(1): using gdb with multi thread applicat o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/101323 threads [patch] fork(2) in threaded programs broken. s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/83914 threads [libc] popen() doesn't work in static threaded program o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/80435 threads panic on high loads o threa/79887 threads [patch] freopen() isn't thread-safe o threa/79683 threads svctcp_create() fails if multiple threads call at the s threa/76694 threads fork cause hang in dup()/close() function in child (-l s threa/76690 threads fork hang in child for -lc_r o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/70975 threads [sysvipc] unexpected and unreliable behaviour when usi s threa/69020 threads pthreads library leaks _gc_mutex s threa/49087 threads Signals lost in programs linked with libc_r s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/34536 threads accept() blocks other threads s threa/32295 threads [libc_r] [patch] pthread(3) dont dequeue signals s threa/30464 threads pthread mutex attributes -- pshared s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o 38 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Mar 2 16:11:56 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E86910656DE; Mon, 2 Mar 2009 16:11:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 520EB8FC1C; Mon, 2 Mar 2009 16:11:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id D2EDF46B39; Mon, 2 Mar 2009 11:11:54 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n22GBa8I077859; Mon, 2 Mar 2009 11:11:48 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-threads@freebsd.org Date: Mon, 2 Mar 2009 11:11:32 -0500 User-Agent: KMail/1.9.7 References: <200903010956.n219uLdu083246@www.freebsd.org> In-Reply-To: <200903010956.n219uLdu083246@www.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200903021111.32643.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 02 Mar 2009 11:11:48 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9061/Mon Mar 2 04:28:18 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Stephane Legrand , freebsd-gnats-submit@freebsd.org, rwatson@freebsd.org Subject: Re: threads/132215: Crash after running ppp X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 16:11:57 -0000 On Sunday 01 March 2009 4:56:21 am Stephane Legrand wrote: > > >Number: 132215 > >Category: threads > >Synopsis: Crash after running ppp > >Confidential: no > >Severity: serious > >Priority: low > >Responsible: freebsd-threads > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Sun Mar 01 10:00:09 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Stephane Legrand > >Release: 7.1-STABLE > >Organization: > >Environment: > 7.1-STABLE i386 > >Description: > Hi, > > After trying to update my system to the 7.1-STABLE of 28th february 2009, when i run ppp, it crashes the system. Here is the backtrace : > > sequoia# kgdb kernel.debug /var/crash/vmcore.0 > 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: > Sleeping thread (tid 100053, pid 516) owns a non-sleepable lock > panic: sleeping thread > cpuid = 0 > Uptime: 37s > Physical memory: 1002 MB > Dumping 158 MB: 143 127 111 95 79 63 47 31 15 > > Reading symbols from /boot/kernel/linprocfs.ko...Reading symbols from /boot/kernel/linprocfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linprocfs.ko > Reading symbols from /boot/kernel/linux.ko...Reading symbols from /boot/kernel/linux.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linux.ko > Reading symbols from /boot/kernel/linsysfs.ko...Reading symbols from /boot/kernel/linsysfs.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/linsysfs.ko > Reading symbols from /boot/kernel/snd_hda.ko...Reading symbols from /boot/kernel/snd_hda.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/snd_hda.ko > Reading symbols from /boot/kernel/sound.ko...Reading symbols from /boot/kernel/sound.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/sound.ko > Reading symbols from /boot/kernel/acpi.ko...Reading symbols from /boot/kernel/acpi.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/acpi.ko > Reading symbols from /boot/kernel/netgraph.ko...Reading symbols from /boot/kernel/netgraph.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/netgraph.ko > Reading symbols from /boot/kernel/ng_ether.ko...Reading symbols from /boot/kernel/ng_ether.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/ng_ether.ko > Reading symbols from /boot/kernel/ng_pppoe.ko...Reading symbols from /boot/kernel/ng_pppoe.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/ng_pppoe.ko > Reading symbols from /boot/kernel/ng_socket.ko...Reading symbols from /boot/kernel/ng_socket.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/ng_socket.ko > Reading symbols from /boot/kernel/ipfw.ko...Reading symbols from /boot/kernel/ipfw.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/ipfw.ko > Reading symbols from /usr/local/modules/fuse.ko...done. > Loaded symbols for /usr/local/modules/fuse.ko > Reading symbols from /boot/kernel/accf_http.ko...Reading symbols from /boot/kernel/accf_http.ko.symbols...done. > done. > Loaded symbols for /boot/kernel/accf_http.ko > Reading symbols from /boot/kernel/i915.ko...done. > Loaded symbols for /boot/kernel/i915.ko > Reading symbols from /boot/kernel/drm.ko...done. > Loaded symbols for /boot/kernel/drm.ko > #0 doadump () at pcpu.h:196 > 196 __asm __volatile("movl %%fs:0,%0" : "=r" (td)); > (kgdb) bt > #0 doadump () at pcpu.h:196 > #1 0xc075c6df in boot (howto=260) at /usr/src/sys/kern/kern_shutdown.c:418 > #2 0xc075c9a4 in panic (fmt=Variable "fmt" is not available. > ) at /usr/src/sys/kern/kern_shutdown.c:574 > #3 0xc078eeec in propagate_priority (td=0xc444a690) at /usr/src/sys/kern/subr_turnstile.c:222 > #4 0xc078fd11 in turnstile_wait (ts=0xc4260e60, owner=0xc444a690, queue=Variable "queue" is not available. > ) at /usr/src/sys/kern/subr_turnstile.c:740 > #5 0xc074f6b3 in _mtx_lock_sleep (m=0xc4267e7c, tid=3297722368, opts=0, file=0x0, line=0) > at /usr/src/sys/kern/kern_mutex.c:420 Can you do something like this in kgdb: frame 5 set $td = (struct thread *)(m->mtx_lock & ~3) p $td->td_tid (This should print out a thread ID) thread $td->td_tid where This should give you the stack trace of the misbehaving thread which slept while holding a route lock. Also, this is a kernel bug, not a thread issue. -- John Baldwin From owner-freebsd-threads@FreeBSD.ORG Mon Mar 2 16:13:07 2009 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B8B10656E8; Mon, 2 Mar 2009 16:13:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 69DF08FC1D; Mon, 2 Mar 2009 16:13:07 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from freefall.freebsd.org (jhb@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n22GD7aG096059; Mon, 2 Mar 2009 16:13:07 GMT (envelope-from jhb@freefall.freebsd.org) Received: (from jhb@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n22GD7Xq096055; Mon, 2 Mar 2009 16:13:07 GMT (envelope-from jhb) Date: Mon, 2 Mar 2009 16:13:07 GMT Message-Id: <200903021613.n22GD7Xq096055@freefall.freebsd.org> To: jhb@FreeBSD.org, freebsd-threads@FreeBSD.org, freebsd-bugs@FreeBSD.org From: jhb@FreeBSD.org Cc: Subject: Re: kern/132215: [route locking] Crash after running ppp X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 16:13:10 -0000 Old Synopsis: Crash after running ppp New Synopsis: [route locking] Crash after running ppp Responsible-Changed-From-To: freebsd-threads->freebsd-bugs Responsible-Changed-By: jhb Responsible-Changed-When: Mon Mar 2 16:12:07 UTC 2009 Responsible-Changed-Why: This not a threads-specific bug, but a bug in the kernel's routing table locking. http://www.freebsd.org/cgi/query-pr.cgi?pr=132215 From owner-freebsd-threads@FreeBSD.ORG Mon Mar 2 16:52:39 2009 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D7E1065674; Mon, 2 Mar 2009 16:52:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5129E8FC1C; Mon, 2 Mar 2009 16:52:39 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id E1FC746B43; Mon, 2 Mar 2009 11:52:38 -0500 (EST) Date: Mon, 2 Mar 2009 16:52:38 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: John Baldwin In-Reply-To: <200903021111.32643.jhb@freebsd.org> Message-ID: References: <200903010956.n219uLdu083246@www.freebsd.org> <200903021111.32643.jhb@freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Stephane Legrand , freebsd-gnats-submit@freebsd.org, freebsd-threads@freebsd.org Subject: Re: threads/132215: Crash after running ppp X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 16:52:40 -0000 On Mon, 2 Mar 2009, John Baldwin wrote: >> Unread portion of the kernel message buffer: >> Sleeping thread (tid 100053, pid 516) owns a non-sleepable lock >> panic: sleeping thread ... > Can you do something like this in kgdb: > > frame 5 > set $td = (struct thread *)(m->mtx_lock & ~3) > p $td->td_tid > > (This should print out a thread ID) > > thread $td->td_tid > where > > This should give you the stack trace of the misbehaving thread which slept > while holding a route lock. > > Also, this is a kernel bug, not a thread issue. Actually, just a stack trace of tid 100053/pid 516 should be sufficient. This is the second report I've had of a panic along these lines relating to ppp, and it seems likely to me that the fixes to routing locking have introduced an edge case where the routing code sleeps allocating or waiting for a route while holding a lock where it didn't happen previously. If we can work out the stack trace leading to the sleep, we can probably fix this in short order. Robert N M Watson Computer Laboratory University of Cambridge From owner-freebsd-threads@FreeBSD.ORG Wed Mar 4 19:52:25 2009 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5595A1065696 for ; Wed, 4 Mar 2009 19:52:25 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id DE6518FC0C for ; Wed, 4 Mar 2009 19:52:24 +0000 (UTC) (envelope-from pawel.worach@gmail.com) Received: by fxm2 with SMTP id 2so2973560fxm.43 for ; Wed, 04 Mar 2009 11:52:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=yLPWxFNGZXaRvRCXrSSMZbiVZYBjZrawxhUgN7wMZVQ=; b=o01zVc9V+BfYxzEGs05DikjEfw80/6warYsTBE9P6asA/fmX5RVY8UThk26RGvHIEz vrjVrdVJnK09XMqDTQLDv2fnK5Np2XsXOhUh2iULU1ii/bYMuJbosMtNzyl0ZQ8OOV7U TNvNbLEEl+MV7MoQ6a8t/IHsi9Ix51RpIcsh8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=kn9kiercexG12fDlCTMPg8JXYpcUPiMPzEFcgm6oxMLTUabk2xhD7pmXydTn3gMKWO skXNYgUSUP3bPRFVUL4ucOCcsIx+O/6PtG8VTAonW5P7Rtd50DSJ2WzOGHm6lbZeHzLJ 1csSiiSRj3vy1DEyvZVEO7vpPd6udBRRBkyaU= MIME-Version: 1.0 Received: by 10.181.193.15 with SMTP id v15mr60451bkp.168.1236194614384; Wed, 04 Mar 2009 11:23:34 -0800 (PST) Date: Wed, 4 Mar 2009 20:23:34 +0100 Message-ID: From: Pawel Worach To: threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Subject: libthr does not obey WITHOUT_SYSCALL_COMPAT X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 19:52:26 -0000 Hi, If libc is built using WITHOUT_SYSCALL_COMPAT applications linked with libthr end up having unresolved symbols since libthr references __fcntl_compat unconditionally. Here is a patch to make libthr also obey WITHOUT_SYSCALL_COMPAT http://www.vlakno.cz/~pwo/libthr.diff Regards -- Pawel