From owner-freebsd-net@freebsd.org Mon Sep 21 08:21:30 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 5CA999CFD1C for ; Mon, 21 Sep 2015 08:21:30 +0000 (UTC) (envelope-from julien@jch.io) Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) (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 EAFC513B9 for ; Mon, 21 Sep 2015 08:21:29 +0000 (UTC) (envelope-from julien@jch.io) Received: by wicge5 with SMTP id ge5so104510705wic.0 for ; Mon, 21 Sep 2015 01:21:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=yzKdGm2BB0aFxStvx27M+wji/t+GxfSrzOPybM16PW0=; b=KQsBsAmvoKqEeTU/IUQ7LpKiq4DmGztx7gAPg1WxThNgxrN1sJkgb3G1PNeY7au+jp gWu7BtUU58XxDJJraf+14tU+hpwETwXcvkcp4NHTAvJVSDqGiLw0w2CFFICSBgc442i+ 0C95Cq2XQvKdtHvZvTRD+xDjvkQv4BNp8fDNUlW8xeoPWF5VQ3fZxTclWquCa1nY6M5Y YKen5KzzwSW3XQrI6q7JNkzLIkgB6IOz+50T9kUwaQtnhVGLseMxHFcxxsdN7HeD+zMT VyQfaLZBhqk+2uhwyLnLX/5UQ5a+yACrywh8unPWml9doVtGuxJgaKRoo341V4nE5n36 A5Qg== X-Gm-Message-State: ALoCoQnJ8zZrszHUzwp2ega0WayGionm6+/ol7fX4jrpFMSyS3dsgWRiuIQZj9phjiuT0Rpf3NvI X-Received: by 10.180.86.232 with SMTP id s8mr12430588wiz.27.1442823687824; Mon, 21 Sep 2015 01:21:27 -0700 (PDT) Received: from res1momishra-l1.vcorp.ad.vrsn.com ([217.30.88.7]) by smtp.googlemail.com with ESMTPSA id p4sm12162122wia.15.2015.09.21.01.21.26 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Sep 2015 01:21:27 -0700 (PDT) Subject: Re: Kernel panics in tcp_twclose To: Konstantin Belousov References: <26B0FF93-8AE3-4514-BDA1-B966230AAB65@FreeBSD.org> <55FC1809.3070903@freebsd.org> <20150918160605.GN67105@kib.kiev.ua> Cc: freebsd-net@freebsd.org, Palle Girgensohn From: Julien Charbon X-Enigmail-Draft-Status: N1110 Message-ID: <55FFBE01.6060706@freebsd.org> Date: Mon, 21 Sep 2015 10:21:21 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <20150918160605.GN67105@kib.kiev.ua> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="0ehaFj5lButCRW2rORLCVxB4rePkEoGV8" 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: Mon, 21 Sep 2015 08:21:30 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --0ehaFj5lButCRW2rORLCVxB4rePkEoGV8 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Konstantin, Hi Palle, On 18/09/15 18:06, Konstantin Belousov wrote: > 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=3D203175 >>> >>> 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 ther= e >> are none). Few interesting facts (at least for me): >> >> - Your crash happens when unlocking a inp exclusive lock with INP_WUN= LOCK() >> >> - Something is already wrong before calling turnstile_broadcast() as = it >> is called with ts =3D NULL: > In the kernel without witness this is a 99%-sure indication of attempt = to > unlock not owned lock. Thanks, this is useful. So far I did not find any path where tcp_twclose() can call INP_WUNLOCK without having the exclusive lock held, that makes this issue interesting. >> 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 fo= r >> example a VIMAGE/VNET jail destruction. >> >> I will test that on my side on a 10.2 machine. I did not find any issues while testing 10.2 + VIMAGE on my side. Thus Palle what I would suggest: - First, test with stable/10 to see if by chance this issue has already been fixed in stable branch. - Second, if issue is still in stable/10, compile 10.2 kernel with these options: options DDB options DEADLKRES options INVARIANTS options INVARIANT_SUPPORT options WITNESS options WITNESS_SKIPSPIN To see where the original fault is coming from. Thanks. -- Julien --0ehaFj5lButCRW2rORLCVxB4rePkEoGV8 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJV/74JAAoJEKVlQ5Je6dhxkr4IAK+4UoTQ8JrDCbfESMDgExGB MLB/2yRhBvSh+5Wl6csKDrVhlt517/2fyJ1Qq9c7VACD88dYK0qiKuV/0lyHrcn+ i9KtnvryFNDvwfOpnyzoCuxneGhoL60mIk9vsTWFzWDACbc1qM+7H5nI7WYBlvcv qTgilD45m6XVbflA23RGTrycUSE3dvG0dkpE+9Eclz29aPwDjfBBcdv5mmzbPYET cBeudX+FHxTEMlfy1HiZo88P3XxHI9el1hM66gwEszWXN+duLaBK8K+WQPJMCCxv nCO5r+YpstK72zXPUAE6WUieoZR1rmVqRfFceFHCTKhdxJRBWDYfgP8gve7DdyM= =e0uJ -----END PGP SIGNATURE----- --0ehaFj5lButCRW2rORLCVxB4rePkEoGV8--