From owner-freebsd-current@FreeBSD.ORG Wed Oct 19 16:37:24 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39810106566C for ; Wed, 19 Oct 2011 16:37:24 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) by mx1.freebsd.org (Postfix) with ESMTP id BC5B68FC12 for ; Wed, 19 Oct 2011 16:37:23 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id B73CF25D386D; Wed, 19 Oct 2011 16:37:22 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id EC5DEBD3C9A; Wed, 19 Oct 2011 16:37:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id TI63V6JlnwXa; Wed, 19 Oct 2011 16:37:20 +0000 (UTC) Received: from orange-en1.sbone.de (orange-en1.sbone.de [IPv6:fde9:577b:c1a9:31:cabc:c8ff:fecf:e8e3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id B9C4CBD3C38; Wed, 19 Oct 2011 16:37:20 +0000 (UTC) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Bjoern A. Zeeb" In-Reply-To: <314699164.103050.1319040049406.JavaMail.root@erie.cs.uoguelph.ca> Date: Wed, 19 Oct 2011 16:37:19 +0000 Content-Transfer-Encoding: 7bit Message-Id: <3C2E7852-5063-4955-BF62-AEB111B1425C@lists.zabbadoz.net> References: <314699164.103050.1319040049406.JavaMail.root@erie.cs.uoguelph.ca> To: Rick Macklem X-Mailer: Apple Mail (2.1084) Cc: FreeBSD-Current Current Subject: Re: mtx_lock() of destroyed mutex on NFS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 19 Oct 2011 16:37:24 -0000 On 19. Oct 2011, at 16:00 , Rick Macklem wrote: > Bjoern A. Zeeb wrote: >> Hi, >> >> as a result of a make buildkernel && make installkernel && reboot all >> on NFS I got this with a HEAD SVN source at r226465. I cannot dump >> unfortunately and it seems I just killed the obj tree for this kernel >> though it should be very close. >> >> Oct 18 10:03:22 lion3 reboot: rebooted by test >> Oct 18 10:03:22 panic: mtx_lock() of destroyed mutex @ >> /zoo/bz/HEAD.svn/sys/kern/uipc_socket.c:1022 >> cpuid = 2 >> ... >> > This seems to have been caused by a premature soclose(), which in > turn implies a premature call to it from clnt_dg_destroy(). The only > race I can see is that the socket buffer lock is used to protect > checking for so_upcall being set (which it then uses to decide if > a new cs_XXX structure is needed), but this lock isn't held when > it decides to throw it away and close the socket. > > You could try the attached patch, which I've tested minimally. > (I think it fixes this race.) Great, will do. I couldn't reproduce it every time but I have hit it again the last 24 hours. Thanks a lot! /bz -- Bjoern A. Zeeb You have to have visions! Stop bit received. Insert coin for new address family.