From owner-freebsd-current@FreeBSD.ORG Sun Feb 20 08:56:01 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8764D16A4CE for ; Sun, 20 Feb 2005 08:56:01 +0000 (GMT) Received: from relay.bestcom.ru (relay.bestcom.ru [217.72.144.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8E31243D48 for ; Sun, 20 Feb 2005 08:56:00 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (root@cell.sick.ru [217.72.144.68]) by relay.bestcom.ru (8.13.1/8.12.9) with ESMTP id j1K8twK7090096 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 20 Feb 2005 11:55:58 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id j1K8tvJo087038 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 20 Feb 2005 11:55:57 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id j1K8tvDt087037 for current@freebsd.org; Sun, 20 Feb 2005 11:55:57 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Sun, 20 Feb 2005 11:55:57 +0300 From: Gleb Smirnoff To: current@freebsd.org Message-ID: <20050220085557.GA87007@cell.sick.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline User-Agent: Mutt/1.5.6i X-Virus-Scanned: ClamAV version devel-20050125, clamav-milter version 0.80ff on relay.bestcom.ru X-Virus-Status: Clean Subject: deadlock and LOR with threads X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 08:56:01 -0000 Today I've upgraded my edsktop to the new CURRENT and experienced the following problem. I'm running gkrellm (linked against libpthread) with gkrellmms plugin. When I started xmms using gkrellmms button, gkrellm freezed. After gkrellm was killed with SIGKILL, new instances of gkrellm freezed on start before drawing a window. I tried to gdb gkrellm with the followin result: glebius@morannon:~:|>gdb `which gkrellm` 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"...(no debugging symbols found)... (gdb) run Starting program: /usr/X11R6/bin/gkrellm (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...^C Program received signal SIGINT, Interrupt. [Switching to Thread 2 (LWP 100150)] 0x282ba38b in pthread_testcancel () from /usr/lib/libpthread.so.1 (gdb) Then I looked into dmesg and found this LOR: lock order reversal 1st 0xc07bdd80 sched lock (sched lock) @ /usr/src/sys/kern/sys_process.c:657 2nd 0xc07c1ac4 sleepq chain (sleepq chain) @ /usr/src/sys/kern/subr_sleepqueue.c:219 KDB: stack backtrace: kdb_backtrace(c075c7bd,c07c1ac4,c075b8d7,c075b8d7,c075b8e4) at kdb_backtrace+0x2e witness_checkorder(c07c1ac4,9,c075b8e4,db,c15964b4) at witness_checkorder+0x6aa _mtx_lock_spin_flags(c07c1ac4,0,c075b8e4,db,d1a22b74) at _mtx_lock_spin_flags+0x8d sleepq_lock(c15964b4,c1da57f0,c1da5858,c1955060,d1a22b98) at sleepq_lock+0x39 wakeup(c15964b4,1,c0756e2e,5ad,c1e60000) at wakeup+0x12 thread_continued(c1da57f0,0,c075d149,291,a) at thread_continued+0x9c kern_ptrace(c1e37190,7,8cc,1,0) at kern_ptrace+0xadf ptrace(c1e37190,d1a22d14,10,3ff,4) at ptrace+0xf0 syscall(2f,2f,2f,0,1871d) at syscall+0x270 Xint0x80_syscall() at Xint0x80_syscall+0x1f --- syscall (26, FreeBSD ELF32, ptrace), eip = 0x28346fff, esp = 0xbfbfdf2c, ebp = 0xbfbfdfe8 --- -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE