From owner-svn-src-head@freebsd.org Tue Oct 23 09:23:24 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D643107261E; Tue, 23 Oct 2018 09:23:24 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::600]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "forwards.mail.yandex.net", Issuer "Yandex CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A409072459; Tue, 23 Oct 2018 09:23:23 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward100o.mail.yandex.net (Yandex) with ESMTP id E6EBA2A20D4F; Tue, 23 Oct 2018 12:22:00 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 7wGAzBMxi9-M0riAj03; Tue, 23 Oct 2018 12:22:00 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1540286520; bh=WsKcp1BtD+6RyxHyxb9f51cJ8GFh6+1BoISlEtJsnqI=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=V+iCFpJ+CaU6KE5lcncKYUA0BiLjkcaKk0aC7/+4oZAlt2iRNBq6GrPXQ/rpf+wGv fvBygj2egmLaqf36qN6aAs5vIHbVev+4b/qAxeSUb14nwulRo9CGkk4WxS5rl9USeY x+qYVO4Iuffm16gVNQJtttLOBfOMAzypRbUcIkLo= Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id TGTL59o6rL-LxD878qU; Tue, 23 Oct 2018 12:21:59 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1540286519; bh=WsKcp1BtD+6RyxHyxb9f51cJ8GFh6+1BoISlEtJsnqI=; h=Subject:To:References:From:Message-ID:Date:In-Reply-To; b=SIi73MnS1lyWdKwKURxaZybm3uCsDmSrbrTn4ZhjU3EwfmjOjYgzk3NjvgVIVqhmr NSeSWchbf9lN5G0180x8CgJdHff9YLWb3EFtTTtWA+f1rWadDXfjgIg0F/OshOC8Al UkmqpsMuVIUZiqjxHBR0sIcbjNhD/qqV5/+w+bRg= Authentication-Results: smtp3o.mail.yandex.net; dkim=pass header.i=@yandex.ru Subject: Re: svn commit: r339634 - in head/sys: kern net To: Eric Joyner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201810230437.w9N4bTxf050789@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= xsBNBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAHNIkFuZHJleSBWLiBFbHN1a292IDxhZUBmcmVlYnNkLm9yZz7CwHsEEwECACUCGwMGCwkI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KNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: <6536ef10-5749-144d-dbd9-91addd2f38e4@yandex.ru> Date: Tue, 23 Oct 2018 12:20:19 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <201810230437.w9N4bTxf050789@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fuupesl9eOG2kZuZpK35X7y4hoNR1UUVg" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2018 09:23:24 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --fuupesl9eOG2kZuZpK35X7y4hoNR1UUVg Content-Type: multipart/mixed; boundary="PeJZkjwDB9ds7P29gjielr2Tyss0Br2vC"; protected-headers="v1" From: "Andrey V. Elsukov" To: Eric Joyner , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <6536ef10-5749-144d-dbd9-91addd2f38e4@yandex.ru> Subject: Re: svn commit: r339634 - in head/sys: kern net References: <201810230437.w9N4bTxf050789@repo.freebsd.org> In-Reply-To: <201810230437.w9N4bTxf050789@repo.freebsd.org> --PeJZkjwDB9ds7P29gjielr2Tyss0Br2vC Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 23.10.2018 07:37, Eric Joyner wrote: > Author: erj > Date: Tue Oct 23 04:37:29 2018 > New Revision: 339634 > URL: https://svnweb.freebsd.org/changeset/base/339634 >=20 > Log: > iflib: drain enqueued tasks before detaching from taskqgroup > =20 > The taskqgroup_detach function does not check if task is already enqu= eued when > detaching it. This may lead to kernel panic if enqueued task starts a= fter > context state lock is destroyed. Ensure that the already enqueued adm= in tasks > are executed before detaching them. > =20 > The issue was discovered during validation of D16429. Unloading of if= _ixlv > followed by immediate removal of VFs with iovctl -D may lead to panic= on > NODEBUG kernel. > =20 > As well, check if iflib is in detach before enqueueing new admin or i= ov > tasks, to prevent new tasks from executing while the taskqgroup tasks= > are being drained. > =20 > Submitted by: Krzysztof Galazka > Reviewed by: shurd@, erj@ > Sponsored by: Intel Corporation > Differential Revision: https://reviews.freebsd.org/D17404 Hi, with this revision my system panics at boot. Reverting only this revision helps. % pciconf -l | grep ^em em0@pci0:0:25:0: class=3D0x020000 card=3D0x20088086 chip=3D0x15028086 rev= =3D0x04 hdr=3D0x00 <6>lo0: link state changed to UP panic: mtx_lock() by idle thread 0xfffff800035eb000 on sleep mutex em0 @ /home/devel/freebsd/base/head/sys/net/iflib.c:2084 cpuid =3D 2 time =3D 1540283649 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe0077964610 vpanic() at vpanic+0x1a3/frame 0xfffffe0077964670 panic() at panic+0x43/frame 0xfffffe00779646d0 __mtx_lock_flags() at __mtx_lock_flags+0x15a/frame 0xfffffe0077964720 iflib_admin_intr_deferred() at iflib_admin_intr_deferred+0x2a/frame 0xfffffe0077964750 em_intr() at em_intr+0x72/frame 0xfffffe0077964780 iflib_fast_intr_ctx() at iflib_fast_intr_ctx+0x21/frame 0xfffffe00779647a= 0 intr_event_handle() at intr_event_handle+0xbb/frame 0xfffffe00779647f0 intr_execute_handlers() at intr_execute_handlers+0x58/frame 0xfffffe0077964820 lapic_handle_intr() at lapic_handle_intr+0x5f/frame 0xfffffe0077964840 Xapic_isr1() at Xapic_isr1+0xd9/frame 0xfffffe0077964840 --- interrupt, rip =3D 0xffffffff811dfab6, rsp =3D 0xfffffe0077964910, rb= p =3D 0xfffffe0077964910 --- acpi_cpu_c1() at acpi_cpu_c1+0x6/frame 0xfffffe0077964910 acpi_cpu_idle() at acpi_cpu_idle+0x23d/frame 0xfffffe0077964960 cpu_idle_acpi() at cpu_idle_acpi+0x3f/frame 0xfffffe0077964980 cpu_idle() at cpu_idle+0xa7/frame 0xfffffe00779649a0 sched_idletd() at sched_idletd+0x517/frame 0xfffffe0077964a70 fork_exit() at fork_exit+0x84/frame 0xfffffe0077964ab0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0077964ab0 --- trap 0, rip =3D 0, rsp =3D 0, rbp =3D 0 --- KDB: enter: panic __curthread () at ./machine/pcpu.h:230 230 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (OFFSETOF_CURTHREAD)); (kgdb) #0 __curthread () at ./machine/pcpu.h:230 #1 doadump (textdump=3D1) at /home/devel/freebsd/base/head/sys/kern/kern_shutdown.c:366 #2 0xffffffff8046586c in db_fncall_generic (addr=3D, rv=3D, nargs=3D, args=3D= ) at /home/devel/freebsd/base/head/sys/ddb/db_command.c:609 #3 db_fncall (dummy1=3D, dummy2=3D, dummy3=3D, dummy4=3D) at /home/devel/freebsd/base/head/sys/ddb/db_command.c:657 #4 0xffffffff804653a9 in db_command (last_cmdp=3D, cmd_table=3D, dopager=3D) at /home/devel/freebsd/base/head/sys/ddb/db_command.c:481 #5 0xffffffff80465124 in db_command_loop () at /home/devel/freebsd/base/head/sys/ddb/db_command.c:534 #6 0xffffffff8046833f in db_trap (type=3D, code=3D) at /home/devel/freebsd/base/head/sys/ddb/db_main.c:252 #7 0xffffffff80be69a7 in kdb_trap (type=3D3, code=3D0, tf=3D0xfffffe0077= 964540) at /home/devel/freebsd/base/head/sys/kern/subr_kdb.c:693 #8 0xffffffff81073be6 in trap (frame=3D0xfffffe0077964540) at /home/devel/freebsd/base/head/sys/amd64/amd64/trap.c:619 #9 #10 kdb_enter (why=3D0xffffffff81309de7 "panic", msg=3D) at /home/devel/freebsd/base/head/sys/kern/subr_kdb.c:479 #11 0xffffffff80b9e670 in vpanic (fmt=3D, ap=3D0xfffffe00779646b0) at /home/devel/freebsd/base/head/sys/kern/kern_shutdown.c:861 #12 0xffffffff80b9e413 in panic ( fmt=3D0xffffffff81e8e1a8 "g\344,\201\377\377\377\377") at /home/devel/freebsd/base/head/sys/kern/kern_shutdown.c:799 #13 0xffffffff80b7d85a in __mtx_lock_flags (c=3D0xfffff800039cc598, opts=3D, file=3D0xffffffff8134fa4e "/home/devel/freebsd/base/head/sys/net/iflib.c", line=3D2084) at /home/devel/freebsd/base/head/sys/kern/kern_mutex.c:2= 40 #14 0xffffffff80cb968a in iflib_in_detach (ctx=3D0xfffff800039cc400) at /home/devel/freebsd/base/head/sys/net/iflib.c:2084 #15 iflib_admin_intr_deferred (ctx=3D0xfffff800039cc400) at /home/devel/freebsd/base/head/sys/net/iflib.c:5977 #16 0xffffffff805d7382 in em_intr (arg=3D0xfffffe0000665000) at /home/devel/freebsd/base/head/sys/dev/e1000/if_em.c:1361 #17 0xffffffff80cb8831 in iflib_fast_intr_ctx (arg=3D) at /home/devel/freebsd/base/head/sys/net/iflib.c:1549 #18 0xffffffff80b60f8b in intr_event_handle (ie=3D0xfffff80003980700, frame=3D0xfffffe0077964850) at /home/devel/freebsd/base/head/sys/kern/kern_intr.c:1225 #19 0xffffffff811e3208 in intr_execute_handlers (isrc=3D0xfffff8000396af0= 0, frame=3D0xfffffe0077964850) at /home/devel/freebsd/base/head/sys/x86/x86/intr_machdep.c:358 #20 0xffffffff811e929f in lapic_handle_intr (vector=3D, frame=3D0xfffffe0077964850) at /home/devel/freebsd/base/head/sys/x86/x86/local_apic.c:1293 #21 #22 acpi_cpu_c1 () at /home/devel/freebsd/base/head/sys/x86/x86/cpu_machdep.c:140 #23 0xffffffff80489cad in acpi_cpu_idle (sbt=3D) at /home/devel/freebsd/base/head/sys/dev/acpica/acpi_cpu.c:1187 #24 0xffffffff811e00cf in cpu_idle_acpi (sbt=3D1792802261) at /home/devel/freebsd/base/head/sys/x86/x86/cpu_machdep.c:433 #25 0xffffffff811e0187 in cpu_idle (busy=3D0) at /home/devel/freebsd/base/head/sys/x86/x86/cpu_machdep.c:581 #26 0xffffffff80bce5c7 in sched_idletd (dummy=3D) at /home/devel/freebsd/base/head/sys/kern/sched_ule.c:2829 #27 0xffffffff80b5e574 in fork_exit ( callout=3D0xffffffff80bce0b0 , arg=3D0x0, frame=3D0xfffffe0077964ac0) at /home/devel/freebsd/base/head/sys/kern/kern_fork.c:1057 #28 (kgdb) --=20 WBR, Andrey V. Elsukov --PeJZkjwDB9ds7P29gjielr2Tyss0Br2vC-- --fuupesl9eOG2kZuZpK35X7y4hoNR1UUVg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAlvO59MACgkQAcXqBBDI oXoElggAhtfF6OfDdjTPM8XmpNqB/G+GknoBjbEDzJtIcS7y2zqw3wO4+VB6CELj jL1e6AAs53BD5qHn0emO0bjfFi92+fbgk7P7/txFfdNDlYWjnasOxbeSmX1ZStk3 6jMj53eK7HDnfJhZnuTM9JOBndvxXWK/QQl37u4P1cIkcvxIU1dZcgkhCMBHYxov SZhBckTrg+SLmU5X2hp+gi412yMYdOHoHaHzwLfDnpyOCtc7uj5AkFZpfOIV/icK Fu7pSWcLg11HwgvEKBq3/8IPzI2m9lUSSg+HzE39lNeWI0b+j1e5XzZoa0bMP2wd LESHY2A71E3D5+xedXaNWqiHZr5jxw== =e8jM -----END PGP SIGNATURE----- --fuupesl9eOG2kZuZpK35X7y4hoNR1UUVg--