From nobody Sat Sep 11 08:03:48 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A7B6F17C2CC2 for ; Sat, 11 Sep 2021 08:03:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H64xw4F43z3pNP for ; Sat, 11 Sep 2021 08:03:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 71F451CC73 for ; Sat, 11 Sep 2021 08:03:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 18B83m2v048717 for ; Sat, 11 Sep 2021 08:03:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 18B83mAD048716 for bugs@FreeBSD.org; Sat, 11 Sep 2021 08:03:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 258421] panic when smbiodX exits Date: Sat, 11 Sep 2021 08:03:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258421 Bug ID: 258421 Summary: panic when smbiodX exits Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rtm@lcs.mit.edu Some of the time, when an smbiod kernel thread exits due to an unmount or an error on the server connection, the kernel panics.=20=20 # uname -a FreeBSD xxx 14.0-CURRENT FreeBSD 14.0-CURRENT #0 main-n248636-d20e9e02db3: = Thu Aug 12 05:47:18 UTC 2021=20=20=20=20 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64 # mount_smbfs -I 10.0.0.115 -N -W XXX //guest@samba/test /mnt # umount /mnt panic: Assertion stp->st_flags =3D=3D 0 failed at /usr/src/sys/kern/sys_generic.c:2027 cpuid =3D 1 time =3D 1631309875 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe009bb2a= 9d0 vpanic() at vpanic+0x187/frame 0xfffffe009bb2aa30 panic() at panic+0x43/frame 0xfffffe009bb2aa90 seltdfini() at seltdfini+0xa0/frame 0xfffffe009bb2aab0 exit1() at exit1+0x492/frame 0xfffffe009bb2ab20 kproc_exit() at kproc_exit+0xaa/frame 0xfffffe009bb2ab50 smb_iod_thread() at smb_iod_thread+0x383/frame 0xfffffe009bb2abb0 fork_exit() at fork_exit+0x80/frame 0xfffffe009bb2abf0 fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe009bb2abf0 I suspect the problem is that selsocket() in kern/sys_generic.c can return without calling seltdclear(): seltdinit(td); for (;;) { selfdalloc(td, NULL); error =3D sopoll(so, events, NULL, td); if (error) { /**** need seltdclear(td) here? ****/ return (0); } error =3D seltdwait(td, asbt, precision); if (error) break; } seltdclear(td); Another way to provoke the panic is to have the server run samba but not support an early enough protocol, i.e. to omit the server min protocol =3D LANMAN1 from smb4.conf. Then (when I try it) the panic occurs during the execution of mount_smbfs. --=20 You are receiving this mail because: You are the assignee for the bug.=