From owner-freebsd-net@freebsd.org Fri Sep 18 16:06:12 2015 Return-Path: Delivered-To: freebsd-net@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 6056E9CE3D0 for ; Fri, 18 Sep 2015 16:06:12 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEB501B4E; Fri, 18 Sep 2015 16:06:11 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id t8IG65Gu040171 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 18 Sep 2015 19:06:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua t8IG65Gu040171 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id t8IG65j4040169; Fri, 18 Sep 2015 19:06:05 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 18 Sep 2015 19:06:05 +0300 From: Konstantin Belousov To: Julien Charbon Cc: Palle Girgensohn , freebsd-net@freebsd.org Subject: Re: Kernel panics in tcp_twclose Message-ID: <20150918160605.GN67105@kib.kiev.ua> References: <26B0FF93-8AE3-4514-BDA1-B966230AAB65@FreeBSD.org> <55FC1809.3070903@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55FC1809.3070903@freebsd.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Sep 2015 16:06:12 -0000 On Fri, Sep 18, 2015 at 03:56:25PM +0200, Julien Charbon wrote: > Hi Palle, > > On 18/09/15 11:12, Palle Girgensohn wrote: > > We see daily panics on our production systems (web server, apache > > running MPM event, openjdk8. Kernel with VIMAGE. Jails using netgraph > > interfaces [not epair]). > > > > The problem started after the summer. Normal port upgrades seems to > > be the only difference. The problem occurs with 10.2-p2 kernel as > > well as 10.1-p4 and 10.1-p15. > > > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=203175 > > > > Any ideas? > > Thanks for you detailed report. I am not aware of any tcp_twclose() > related issues (without VIMAGE) since FreeBSD 10.0 (does not mean there > are none). Few interesting facts (at least for me): > > - Your crash happens when unlocking a inp exclusive lock with INP_WUNLOCK() > > - Something is already wrong before calling turnstile_broadcast() as it > is called with ts = NULL: In the kernel without witness this is a 99%-sure indication of attempt to unlock not owned lock. > > turnstile_broadcast (ts=0x0, queue=1) at > /usr/src/sys/kern/subr_turnstile.c:838 > __rw_wunlock_hard () at /usr/src/sys/kern/kern_rwlock.c:988 > tcp_twclose () at /usr/src/sys/netinet/tcp_timewait.c:540 > tcp_tw_2msl_scan () at /usr/src/sys/netinet/tcp_timewait.c:748 > tcp_slowtimo () at /usr/src/sys/netinet/tcp_timer.c:198 > > I won't go to far here as I am not expert enough in VIMAGE, but one > question anyway: > > - Can you correlate this kernel panic to a particular event? Like for > example a VIMAGE/VNET jail destruction. > > I will test that on my side on a 10.2 machine. > > -- > Julien >