From owner-freebsd-current@freebsd.org Sat Aug 8 09:28:54 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ED4B39B3DF8 for ; Sat, 8 Aug 2015 09:28:53 +0000 (UTC) (envelope-from julien@jch.io) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com [209.85.215.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 75B80E49 for ; Sat, 8 Aug 2015 09:28:53 +0000 (UTC) (envelope-from julien@jch.io) Received: by lahi9 with SMTP id i9so3243530lah.2 for ; Sat, 08 Aug 2015 02:28:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=Ez0m1+09Hpd3tWT39XOtSBWIsaOgsM04gloqlSJxdTc=; b=BvQzcbq+ci5ivyTrB1rAOaTDshpaoTat73SC2/BrzBEsyEJMKrTsewn8yuP0DqD8Sd 4Rg2s0umwUTzrI1eBRw1nviOctMITfUO0SiTT1+wIbQO8yx6oz+A3bc1HKbktXTB09bX MrTOXEkf437Gxd8rCFTW2xhAlsrnwAWIgeGoS5nOn6HT7VUTHiISaZLQU0rVcT6uvXGt +9Ied4y9JSoYVZUtqbpNAo5gA6diH3cIfvktRqlwMeLwjtwBXQQ4PU3xLwEI/wiVza/+ MAlM9MdODTGNb5wAhB+DXopWGYyAYlQMrwrngWsGb++8i4VWi1vOyEAhD+x6vQ6pHVL/ 4MhA== X-Gm-Message-State: ALoCoQkkxgctI/g4J/YY8rOUkJGhdh3cVcN48fDwTf0pODc0JGcNZJXDJJFl+l+2mFUnWri7uxzF X-Received: by 10.152.20.196 with SMTP id p4mr12151183lae.121.1439026130314; Sat, 08 Aug 2015 02:28:50 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by smtp.googlemail.com with ESMTPSA id d7sm2339508lag.23.2015.08.08.02.28.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Aug 2015 02:28:50 -0700 (PDT) Received: by lbbpu9 with SMTP id pu9so45055476lbb.3 for ; Sat, 08 Aug 2015 02:28:49 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.153.8.137 with SMTP id dk9mr12257080lad.57.1439026129644; Sat, 08 Aug 2015 02:28:49 -0700 (PDT) Reply-To: jch@freebsd.org Received: by 10.25.42.21 with HTTP; Sat, 8 Aug 2015 02:28:49 -0700 (PDT) X-Originating-IP: [178.197.230.88] Received: by 10.25.42.21 with HTTP; Sat, 8 Aug 2015 02:28:49 -0700 (PDT) In-Reply-To: <55C59872.8070701@freebsd.org> References: <20150808010324.GA1392@borg.lerctr.org> <20150808032521.GA66493@raichu> <55C59872.8070701@freebsd.org> Date: Sat, 8 Aug 2015 11:28:49 +0200 Message-ID: Subject: Re: traceroute6: panic: pcb not read locked From: Julien Charbon To: Larry Rosenman , Mark Johnston Cc: freebsd-current@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Sat, 08 Aug 2015 09:28:54 -0000 On Aug 8, 2015 07:49, "Julien Charbon" wrote: > > On 08/08/15 05:25, Mark Johnston wrote: > > On Fri, Aug 07, 2015 at 08:04:01PM -0500, Larry Rosenman wrote: > >> Trying to debug TimeWarner IPV6 to my HE.NET tunnel, and running traceroute6, > >> got the following panic: > >> > >> borg.lerctr.org dumped core - see /var/crash/vmcore.0 > >> > >> Fri Aug 7 19:58:40 CDT 2015 > >> > >> FreeBSD borg.lerctr.org 11.0-CURRENT FreeBSD 11.0-CURRENT #32 r286338: Wed Aug 5 15:57:55 CDT 2015 root@borg.lerctr.org:/usr/obj/usr/src/sys/VT-LER amd64 > >> > >> panic: Lock tcp not read locked @ /usr/src/sys/netinet/tcp_subr.c:1189 > >> > >> 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 "amd64-marcel-freebsd"... > >> > >> Unread portion of the kernel message buffer: > >> panic: Lock tcp not read locked @ /usr/src/sys/netinet/tcp_subr.c:1189 > > > > This appears to be fallout from r286227: the tcpinfo lock assertion in > > tcp_notify() is too strong, since tcp_notify() can still be called from > > c with the tcpinfo write lock held. > > Nice catch, I agree these tcpinfo lock assertion are too strong. I am > fixing and testing that as in top of tcp_notify() and tcp_drop(), you > also need to update also tcp_close() and tcp_detach(). I pushed a fix in r286443. I am checking if other less common paths have the same issue of kernel assertions being too strict with INP_INFO read/write lock checks. Thanks for the detailed report and patch proposal. -- Julien