From owner-freebsd-stable@freebsd.org Thu Oct 13 16:21:47 2016 Return-Path: Delivered-To: freebsd-stable@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 B3122C101B7 for ; Thu, 13 Oct 2016 16:21:47 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: from mail-lf0-f54.google.com (mail-lf0-f54.google.com [209.85.215.54]) (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 2AEBE864 for ; Thu, 13 Oct 2016 16:21:46 +0000 (UTC) (envelope-from julien.charbon@gmail.com) Received: by mail-lf0-f54.google.com with SMTP id l131so104751084lfl.2 for ; Thu, 13 Oct 2016 09:21:46 -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; bh=all5m+BTK7kD5RX1fkFFwz3PP+wUgvlobKnibh+sRyA=; b=kWk7nwFYQv0faoMp8elkS1iuGLaiC4lPS8eOtoMs5YvsJ0BxnE2uACDGbPEXDkEk2A Vd6XDFCBwheOGN3A1jypiXFkLs2luHXFiLTKxmG0BWn4BbTR6trGulQdeB2N6aFWKYqG 7ayW61XzcowCeGYrjE1+dBn7ZPWKlhj5Trs8CbtfQr4SJ0td6+MEV9Ug9WbWYcr/uYUp xt5J2ddpphV0c0KUMejgRnIsFe4wSDBoWYIY4Q20sEaIoBns+hyDBbq6uOG9HvZ2ay4B fR1lfskHWv/po0utCIRnRTIQXw0eZKqOGX61NbMNjx8QLUPCPYc8yDiNPuMfPMravhBn dcCQ== X-Gm-Message-State: AA6/9Rm5a1jPL/dg+HZKaGTEYs724VGFwPO97XHx/r52t7zENMX76i+xlqV+JPKjzcFmHA== X-Received: by 10.25.20.228 with SMTP id 97mr1420974lfu.93.1476375277688; Thu, 13 Oct 2016 09:14:37 -0700 (PDT) Received: from [10.100.64.26] ([217.30.88.7]) by smtp.gmail.com with ESMTPSA id u68sm4018876lfg.31.2016.10.13.09.14.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Oct 2016 09:14:36 -0700 (PDT) Subject: Re: 11.0 stuck on high network load To: Slawa Olhovchenkov References: <20161012095233.GC57714@zxy.spb.ru> <20161012121322.GB57876@zxy.spb.ru> <62d8861c-673e-6d86-e96e-751399e505e5@freebsd.org> <20161012130103.GD57714@zxy.spb.ru> <20161012154229.GC57876@zxy.spb.ru> <20161013143825.GK57714@zxy.spb.ru> <33ab0bfc-7009-95a7-7752-c2c439092e85@freebsd.org> <20161013151715.GL57714@zxy.spb.ru> Cc: Konstantin Belousov , freebsd-stable@FreeBSD.org, hiren panchasara From: Julien Charbon Message-ID: Date: Thu, 13 Oct 2016 18:14:29 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161013151715.GL57714@zxy.spb.ru> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="77t2wdg15S3ivEXxVVQvo5c8JV1DO52u6" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2016 16:21:47 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --77t2wdg15S3ivEXxVVQvo5c8JV1DO52u6 Content-Type: multipart/mixed; boundary="o2IrimuSsOFSk8pIWPSFxEP7aw5M0QFgs"; protected-headers="v1" From: Julien Charbon To: Slawa Olhovchenkov Cc: Konstantin Belousov , freebsd-stable@FreeBSD.org, hiren panchasara Message-ID: Subject: Re: 11.0 stuck on high network load References: <20161012095233.GC57714@zxy.spb.ru> <20161012121322.GB57876@zxy.spb.ru> <62d8861c-673e-6d86-e96e-751399e505e5@freebsd.org> <20161012130103.GD57714@zxy.spb.ru> <20161012154229.GC57876@zxy.spb.ru> <20161013143825.GK57714@zxy.spb.ru> <33ab0bfc-7009-95a7-7752-c2c439092e85@freebsd.org> <20161013151715.GL57714@zxy.spb.ru> In-Reply-To: <20161013151715.GL57714@zxy.spb.ru> --o2IrimuSsOFSk8pIWPSFxEP7aw5M0QFgs Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 10/13/16 5:17 PM, Slawa Olhovchenkov wrote: > On Thu, Oct 13, 2016 at 05:06:00PM +0200, Julien Charbon wrote: >=20 >>>> will give you that trace in the core, and without INVARIANT then it = is >>>> better to use dtrace: >>>> >>>> $ cat tcp-twstart-dropped.d >>>> fbt::tcp_twstart:entry >>>> /args[0]->t_inpcb->inp_flags & 0x04000000/ >>>> { >>>> stack(); >>>> printf("INP_DROPPED in tcp_twstart: %x", args[0]->t_inpcb->inp_fla= gs); >>>> } >>> >>> Same code may be insert there too, IMHO. >> >> Hmm, I don't think so: >> >> - If you have INVARIANT, the kernel will panic in tcp_twstart() or >> tcp_detach() and you will have everything you need to debug. >> - If you don't, dtrace is the right tool to use in all cases anyway. >=20 > dtrace don't executed in may case w/ diagnostic "dtrace: processing > aborted: Abort due to systemic unresponsiveness". This is for > tcp_close. May be tcp_twstart will be more successuful, may be not. It does and will. > Also, using dtrace too complex in production (need complex startup > under screen and capture output) and for many peoples. > kdb_backtrace() have too less administrative overhead. I still think it is overkill. The main goal of this change is to fix a quite tricky and old TCP stack locking issue. Let's try to do that first, it is complex enough by itself. Once the fix is validated and pushed, feel free to propose your own patch/review to add kdb_backtrace(), log(), etc.. to get other devs point of view. I don't remember who said: "Never ever optimize error cases"... -- Julien --o2IrimuSsOFSk8pIWPSFxEP7aw5M0QFgs-- --77t2wdg15S3ivEXxVVQvo5c8JV1DO52u6 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 iQEcBAEBCgAGBQJX/7LtAAoJEKVlQ5Je6dhxl0gH/1exUJnXktv5wXl3Pt9u41Sq stw7JS2C3l1TSk5m1cIw9U2vfD0Ok7iY/ksmXEnNtUlOB3MLF5Z954AVdghUtBt2 D7gGpcTYbxyiU8MxKsT6I4UO0aEQoQBkJqPDLQUMpS3QLc73tYzypkj8PO7ype6m HsY4ONga5GlP/WoeKovHmAxocXL8mgz+xYAbuovqtgy6yEhc1w6bRI9/u/5lONQb tjiOcgwZAB+erJqNXoZ/8WllgbwJ/ujBl3XzLXqMEvy82infmZ+luvaCkAACbbJV OWTeqiA8PW6+6MxGnhkaGu8iSf2X0tGLsfDck0ny9TZkO4xwEfxvIaszqMxj6Jw= =g/dO -----END PGP SIGNATURE----- --77t2wdg15S3ivEXxVVQvo5c8JV1DO52u6--