From nobody@FreeBSD.org  Thu Dec 17 04:37:48 2009
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 B51A71065672
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Dec 2009 04:37:48 +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 A3A6F8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Dec 2009 04:37:48 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBH4bmqJ021342
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Dec 2009 04:37:48 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nBH4bmG4021341;
	Thu, 17 Dec 2009 04:37:48 GMT
	(envelope-from nobody)
Message-Id: <200912170437.nBH4bmG4021341@www.freebsd.org>
Date: Thu, 17 Dec 2009 04:37:48 GMT
From: Bruce Cran <bruce@cran.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [sctp] [panic] lock (sleep mutex) sctp-tcb not locked
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         141697
>Category:       kern
>Synopsis:       [sctp] [panic] lock (sleep mutex) sctp-tcb not locked
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-net
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 17 04:40:00 UTC 2009
>Closed-Date:    Mon Jul 05 00:37:38 UTC 2010
>Last-Modified:  Mon Jul 05 00:37:38 UTC 2010
>Originator:     Bruce Cran
>Release:        9.0-CURRENT
>Organization:
>Environment:
FreeBSD tau.draftnet 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Thu Dec 17 03:49:11 GMT 2009 brucec@tau.draftnet:/usr/obj/usr/src/sys/GENERIC_DBG amd64
>Description:
I got the following panic when running "killall api_tests" when a large number of api_tests processes were running.

panic: lock (sleep mutex) sctp-tcb not locked @ /usr/src/sys/netinet/sctp_pcb.c:4617

kdb_enter() at kdb_enter+0x3d
panic() at panic+0x17b
witness_unlock() at witness_unlock+0x297
_mtx_unlock_flags() at _mtx_unlock_flags+0x87
sctp_free_assoc() at sctp_free_assoc+0xaf1
sctp_process_control() at sctp_process_control+0x1329
sctp_common_input_processing() at sctp_common_input_processing+0x1b1
sctp_input_with_port() at sctp_input_with_port+0x388
ip_input() at ip_input+0xbc
swi_net() at swi_net+0x151
intr_event_execute_handlers() at intr_event_execute_handlers+0x66
ithread_loop() at ithread_loop+0xb2
fork_exit() at fork_exit+0x12a
fork_trampoline() at fork_trampoline+0xe
--- trap 0, rip = 0, rsp = 0xffffff8000047d30, rbp = 0 ---
>How-To-Repeat:
Run lots (around 100-300) api_tests processes started with the following command line:

./api_tests -l -r > /dev/null

Then, kill all the api_tests processes with "killall api_tests"
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: brucec 
Responsible-Changed-When: Thu Dec 17 04:42:17 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141697 
State-Changed-From-To: open->closed  
State-Changed-By: brucec 
State-Changed-When: Mon Jul 5 00:37:22 UTC 2010 
State-Changed-Why:  
Fixed in stable/8 and head. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141697 
>Unformatted:
