Date: Thu, 13 Oct 2016 17:06:00 +0200 From: Julien Charbon <jch@freebsd.org> To: Slawa Olhovchenkov <slw@zxy.spb.ru> Cc: Konstantin Belousov <kostikbel@gmail.com>, freebsd-stable@FreeBSD.org, hiren panchasara <hiren@strugglingcoder.info> Subject: Re: 11.0 stuck on high network load Message-ID: <33ab0bfc-7009-95a7-7752-c2c439092e85@freebsd.org> In-Reply-To: <20161013143825.GK57714@zxy.spb.ru> References: <20161012092945.GB57714@zxy.spb.ru> <4b0d4b58-6d13-3cd5-6991-27163f27acca@freebsd.org> <20161012095233.GC57714@zxy.spb.ru> <e4f1343c-636a-0970-856b-e65955f79e1a@freebsd.org> <20161012121322.GB57876@zxy.spb.ru> <62d8861c-673e-6d86-e96e-751399e505e5@freebsd.org> <20161012130103.GD57714@zxy.spb.ru> <e8a46471-576d-e074-8a50-5c316fb98bce@freebsd.org> <20161012154229.GC57876@zxy.spb.ru> <bc6810d8-af4c-1716-cbc7-e64819b78ccd@freebsd.org> <20161013143825.GK57714@zxy.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --a85w2Ti06SRN3wnPEEmo3Nli51ICXgk05 Content-Type: multipart/mixed; boundary="eS5gOKKhWQfOwIqLPd6aU4a7ATAckBMFo"; protected-headers="v1" From: Julien Charbon <jch@freebsd.org> To: Slawa Olhovchenkov <slw@zxy.spb.ru> Cc: Konstantin Belousov <kostikbel@gmail.com>, freebsd-stable@FreeBSD.org, hiren panchasara <hiren@strugglingcoder.info> Message-ID: <33ab0bfc-7009-95a7-7752-c2c439092e85@freebsd.org> Subject: Re: 11.0 stuck on high network load References: <20161012092945.GB57714@zxy.spb.ru> <4b0d4b58-6d13-3cd5-6991-27163f27acca@freebsd.org> <20161012095233.GC57714@zxy.spb.ru> <e4f1343c-636a-0970-856b-e65955f79e1a@freebsd.org> <20161012121322.GB57876@zxy.spb.ru> <62d8861c-673e-6d86-e96e-751399e505e5@freebsd.org> <20161012130103.GD57714@zxy.spb.ru> <e8a46471-576d-e074-8a50-5c316fb98bce@freebsd.org> <20161012154229.GC57876@zxy.spb.ru> <bc6810d8-af4c-1716-cbc7-e64819b78ccd@freebsd.org> <20161013143825.GK57714@zxy.spb.ru> In-Reply-To: <20161013143825.GK57714@zxy.spb.ru> --eS5gOKKhWQfOwIqLPd6aU4a7ATAckBMFo Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Slawa, On 10/13/16 4:38 PM, Slawa Olhovchenkov wrote: > On Thu, Oct 13, 2016 at 01:56:21PM +0200, Julien Charbon wrote: >>>> Something like: >>> >>> Yes, thanks! >> >> Proposed changes added in the review: >> >> https://reviews.freebsd.org/D8211 >> >> tell me when you have three days without issue with this change. >> >>>> tcp_detach() { >>>> >>>> ... >>>> if (inp->inp_flags & INP_TIMEWAIT) { >>>> >>>> ... >>>> if (inp->inp_flags & INP_DROPPED) { >>>> >>>> in_pcbdetach(inp); >>>> if (__predict_true(tp =3D=3D NULL)) { >>>> in_pcbfree(inp); >>>> } else { >>>> #ifdef INVARIANTS >>>> panic("tcp_detach: tp !=3D NULL, That's not good because 'bl= ah'\n"); >>>> #else >>>> log(LOG_ERR, "tcp_detach: tp !=3D NULL, That's not good beca= use >>>> 'blah'\n"); >>> >>> May be some more info in log can help to detect root cause of issuse?= >>> I am don't know what info, may be flags or number of references? >> >> For this kind of issue, the useful part is the stacktrace. INVARIANT= >=20 > Like this? >=20 > #ifdef KDB > kdb_backtrace(); > #endif >=20 > as found in sys/netgraph/ng_base.c It is overkill dtrace can do that. >> 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_flags= ); >> } >=20 > 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. -- Julien --eS5gOKKhWQfOwIqLPd6aU4a7ATAckBMFo-- --a85w2Ti06SRN3wnPEEmo3Nli51ICXgk05 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/6LcAAoJEKVlQ5Je6dhxlUAH/jHhMvvTBIoxoK8eodIPzE8m +5quGdpDvht+3mRfY6fGpYGCTT60rT3xMsN2L0xNJ8i6qXiY9oB48nTO8P9359Nk 5oolU1L7WCFeKAeTkmOCWim9YxTGT9f+4MQxVliKsMa3uDlR09RMj1JLucVLAXZ1 tbc6u96+AlhTZu21EzGiejv4otp+KbLEbDCmFS1jbufLd8tnN2A3S/olMzv4kadi plhwDu+wAXk5cu0hK8ETDwjlmVV+MXY7r2yAZp3jk5QXvh3wSbDK+2Re8WQpnaze Ee2N7zdibXVpOTCdACK02srQZlAASC8DwRy41cCLVV8mvmEoG8ijJxKYLXL0KBw= =oU3g -----END PGP SIGNATURE----- --a85w2Ti06SRN3wnPEEmo3Nli51ICXgk05--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33ab0bfc-7009-95a7-7752-c2c439092e85>