From owner-freebsd-current@FreeBSD.ORG Tue Apr 23 20:47:24 2013 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 058FC841 for ; Tue, 23 Apr 2013 20:47:24 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 89DEE1E38 for ; Tue, 23 Apr 2013 20:47:23 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r3NKlMwW057387 for ; Wed, 24 Apr 2013 00:47:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r3NKlM2T057386 for current@FreeBSD.org; Wed, 24 Apr 2013 00:47:22 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 24 Apr 2013 00:47:22 +0400 From: Gleb Smirnoff To: current@FreeBSD.org Subject: Re: panic on a NULL turnstile on boot on r249810 Message-ID: <20130423204722.GM76816@FreeBSD.org> References: <20130423202502.GL76816@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130423202502.GL76816@glebius.int.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Tue, 23 Apr 2013 20:47:24 -0000 More investigation. AFAIU, we can't come to this point if __mtx_lock_sleep() passed a NULL ts. So ts wasn't NULL before call to propagate_priority(). The turnstile_wait() saves ts on td: 738: td->td_blocked = ts; So I can obtain it: (kgdb) fr 11 #11 0xffffffff805206b2 in turnstile_wait (ts=, owner=, queue=) at /usr/src/head/sys/kern/subr_turnstile.c:743 743 propagate_priority(td); (kgdb) p *td->td_blocked $8 = {ts_lock = {lock_object = {lo_name = 0xffffffff8077f1eb "turnstile lock", lo_flags = 720896, lo_data = 0, lo_witness = 0x0}, mtx_lock = 18446741874883377440}, ts_blocked = {{ tqh_first = 0xfffffe000bbf3920, tqh_last = 0xfffffe000bbf3960}, { tqh_first = 0x0, tqh_last = 0xfffffe000ba82ab0}}, ts_pending = { tqh_first = 0x0, tqh_last = 0xfffffe000ba82ac0}, ts_hash = {le_next = 0x0, le_prev = 0xffffffff80aaee38}, ts_link = {le_next = 0x0, le_prev = 0xfffffe000bf42120}, ts_free = {lh_first = 0x0}, ts_lockobj = 0xffffffff80af5f30, ts_owner = 0xfffffe000bf42000} (kgdb) Ok, let's see who is the owner: (kgdb) p td->td_blocked->ts_owner->td_proc->p_comm $21 = "sysctl", '\0' I can't find it in info threads... Yep, it is zombie: (kgdb) p td->td_blocked->ts_owner->td_proc->p_state $22 = PRS_ZOMBIE Could that happen that a zombie owns turnstile? -- Totus tuus, Glebius.