Re: Deadlock, exclusive sx so_rcv_sx, amd64

From: John Baldwin <jhb_at_freebsd.org>
Date: Thu, 25 Oct 2007 14:35:58 -0400
On Sunday 21 October 2007 06:29:46 pm Gleb Kozyrev wrote:
> Hello.
> 
> Running rtorrent and ftp brings my system to a deadlock
> in a few hours. Kernel still responds to pings and sends some
> TCP acks.
> 
> The kernel is from fresh RELENG_7, userland is from 'CURRENT' of 20 Aug.
> 
> See <http://debug.files.googlepages.com/Serial-20071022-004528.txt>
> 
> Below are some snippets:
> 
> db> show alllocks
> Process 1406 (systat) thread 0xffffff002aa016a0 (100181)
> shared sx allproc r = 0 (0xffffffff80a72820) locked _at_
> /usr/src/sys/vm/vm_meter.c:130
> exclusive sx sysctl lock r = 0 (0xffffffff80a72f40) locked _at_
> /usr/src/sys/kern/kern_sysctl.c:1396
> Process 1129 (rtorrent) thread 0xffffff000a6ae000 (100163)
> exclusive sx user map r = 0 (0xffffff0001056890) locked _at_
> /usr/src/sys/vm/vm_map.c:2195
> Process 1105 (sshd) thread 0xffffff000a6ae350 (100162)
> exclusive sx so_rcv_sx r = 0 (0xffffff000a78a928) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> Process 1040 (cron) thread 0xffffff0001c61350 (100130)
> shared sx proctree r = 0 (0xffffffff80a72860) locked _at_
> /usr/src/sys/kern/kern_fork.c:286
> Process 998 (mysqld) thread 0xffffff002aa119f0 (100192)
> exclusive sx so_rcv_sx r = 0 (0xffffff0003858670) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> Process 998 (mysqld) thread 0xffffff002aa12000 (100191)
> exclusive sx so_rcv_sx r = 0 (0xffffff000abbb928) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> Process 932 (smbd) thread 0xffffff000140c000 (100068)
> shared sx proctree r = 0 (0xffffffff80a72860) locked _at_
> /usr/src/sys/kern/kern_fork.c:286
> 
> 
> kernel config:
> 
> ident RUN-071021
> include GENERIC
> options         INCLUDE_CONFIG_FILE
> nooption        SMP
> nocpu           I486_CPU
> nocpu           I586_CPU
> nooption        SCHED_4BSD
> options         SCHED_ULE
> device          crypto
> options         IPSEC
> options         LIBALIAS
> options         IPFIREWALL
> options         IPFIREWALL_VERBOSE
> options         IPFIREWALL_FORWARD
> options         IPFIREWALL_NAT
> options         GEOM_JOURNAL
> options         KDB
> options         DDB
> options         KDB_TRACE
> options         ALT_BREAK_TO_DEBUGGER
> options         INVARIANTS
> options         INVARIANT_SUPPORT
> options         WITNESS
> options         WITNESS_SKIPSPIN
> nodevice        umass
> device          ucom
> device          uplcom
> 
> 
> loader.conf:
> 
> vfs.root.mountfrom="zfs:base/system"
> if_bridge_load="YES"
> dummynet_load="YES"
> ipdivert_load="YES"
> zfs_load="YES"
> accf_http_load="YES"
> 
> 
> With an older kernel it once was just
> 
> db> show alllocks
> Process 1130 (rtorrent) thread 0xffffff000962e9f0 (100160)
> exclusive sx so_rcv_sx r = 0 (0xffffff000987e670) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> Process 1096 (sshd) thread 0xffffff000962a350 (100170)
> exclusive sx so_rcv_sx r = 0 (0xffffff00096f9100) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> Process 996 (mysqld) thread 0xffffff0031e0c000 (100191)
> exclusive sx so_rcv_sx r = 0 (0xffffff0009870be0) locked _at_
> /usr/src/sys/kern/uipc_sockbuf.c:145
> 
> <http://debug.files.googlepages.com/Serial-20071021-020559.txt>
> 
> 
> Please suggest any other commands to run in DDB if needed.
> Cores are saved.

show sleepchain <pid>  will show if it's a real deadlock or not.

-- 
John Baldwin
Received on Thu Oct 25 2007 - 17:19:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:20 UTC