From nobody Fri Jan 19 16:04:21 2024 X-Original-To: fs@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 4TGkvT4nY4z56nsx for ; Fri, 19 Jan 2024 16:04:21 +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 4TGkvT26xMz3xV4 for ; Fri, 19 Jan 2024 16:04:21 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705680261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kVGHsfC5q2agiYd8IEr7xbAGUlAoz5aIDtLrNupN4IY=; b=S5cFpDb3/JCOM3Ix6uvmAb6XT8u4BBqhPdXDEVgQLDHGk0Ns0LQ05XV0wPl6pSgz0cVvSY nC45/YBrP3sXMozdmJq4WMIlX+Naw4Gq8LV4AMZ4ESFscb9lNJygjayDP2s0JnoFvXjLem lXSvc2D68acn+54sHRnz1SfGXM2U+ETGA360bZlJLm14Tciboi9KDE2Xtb1+l0pJSr1mFz C3xoJCJsXnDP7qDN12xBFdXDookbaf5+Q6rhl6t7D7J8GGI+N7C4sEJysR5+hpJFTNe6e6 gRfcdZ3IRRW+Kvr9hpL2d/ZKIyk7YyNd6DiSJhh0gBNJ/OwftVHKY/z7zL85iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705680261; a=rsa-sha256; cv=none; b=j2TkMnn8c4U7/dXgUQFBes60lCfIBadpgqIEO0ynHo3GhYaCJBq057ZtqJF9yE8HB8Xzag wBooshY5hp3t1VRGVSqFGKlYJzRUjKrfgrDHGAbp+/nQpA6MlU4yQD5mjjIVx6L5145KzX 81AmQktgyNkY4kIZ7TwU/ccCHffgacCLZlnOn831k2j/BvQJzY1GZm0MW+ab9XuxliawVD 73Wg2YfZ6wNpvhUGYSD19A5SGsOu207D9FMiMc8ozQ5ruBJ4/oMBzKJuLcdkCwRfo5NFJP VGiPq5PJIv7Rk3B8+xpO3v4xAQhzzBdIsF71ej9/kY+XUdDwmE4ltiYbITX3Tw== 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 4TGkvT19vXzxXF for ; Fri, 19 Jan 2024 16:04:21 +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 40JG4Lct047550 for ; Fri, 19 Jan 2024 16:04:21 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40JG4L3N047549 for fs@FreeBSD.org; Fri, 19 Jan 2024 16:04:21 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: fs@FreeBSD.org Subject: [Bug 276408] panic: Assertion error == EJUSTRETURN failed at msdosfs_vnops.c:1195 Date: Fri, 19 Jan 2024 16:04:21 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.2-STABLE X-Bugzilla-Keywords: crash X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: fs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: Filesystems List-Archive: https://lists.freebsd.org/archives/freebsd-fs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-fs@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D276408 --- Comment #5 from John F. Carr --- I applied the patches from main to my (now) 13.3-PRERELEASE system. The initial error handling worked, converting the filesystem to read-only and failing the system call in progress. When I unmounted the filesystem my system crashed because the mnt_lockref f= ield was negative. I can report this crash as a separate bug if it is insufficiently related to the original bug. From the crash dump analysis: Unread portion of the kernel message buffer: MPASSERT mp 0xfffffe03ae86f5c0 failed: mp->mnt_ref > 0 && mp->mnt_lockref >= =3D 0 && mp->mnt_writeopcount >=3D 0 not true at /usr/home/jfc/freebsd/src/sys/kern/vfs_mount.c:1718 (vfs_op_enter) panic: invalid count(s): ref 2314 lockref -1 writeopcount 0 cpuid =3D 17 time =3D 1705678821 KDB: stack backtrace: #0 0xffffffff80c1a7d5 at kdb_backtrace+0x65 #1 0xffffffff80bcfa12 at vpanic+0x152 #2 0xffffffff80bcf813 at panic+0x43 #3 0xffffffff80ca51e7 at vfs_op_enter+0x1a7 #4 0xffffffff80ca496f at dounmount+0xff #5 0xffffffff80ca4812 at kern_unmount+0x312 #6 0xffffffff8108ded0 at amd64_syscall+0x140 #7 0xffffffff8106258b at fast_syscall_common+0xf8 Uptime: 4h1m2s Dumping 6801 out of 163636 MB:..1%..11%..21%..31%..41%..51%..61%..71%..81%.= .91% __curthread () at /usr/home/jfc/freebsd/src/sys/amd64/include/pcpu_aux.h:53 53 __asm("movq %%gs:%P1,%0" : "=3Dr" (td) : "n" (offsetof(stru= ct pcpu, (kgdb) #0 __curthread () at /usr/home/jfc/freebsd/src/sys/amd64/include/pcpu_aux.h:53 td =3D #1 doadump (textdump=3D) at /usr/home/jfc/freebsd/src/sys/kern/kern_shutdown.c:394 error =3D 0 coredump =3D #2 0xffffffff80bcf622 in kern_reboot (howto=3D260) at /usr/home/jfc/freebsd/src/sys/kern/kern_shutdown.c:482 once =3D 0 #3 0xffffffff80bcfa7f in vpanic ( fmt=3D0xffffffff8126ea0e "invalid count(s): ref %d lockref %d writeopco= unt %d", ap=3Dap@entry=3D0xfffffe03b0c70c10) at /usr/home/jfc/freebsd/src/sys/kern/kern_shutdown.c:921 buf =3D "invalid count(s): ref 2314 lockref -1 writeopcount 0", '\0= 00' other_cpus =3D {__bits =3D {281474976579583, 0, 0, 0}} td =3D 0xfffff801cda27740 bootopt =3D newpanic =3D #4 0xffffffff80bcf813 in panic (fmt=3D) at /usr/home/jfc/freebsd/src/sys/kern/kern_shutdown.c:845 ap =3D {{gp_offset =3D 32, fp_offset =3D 48,=20 overflow_arg_area =3D 0xfffffe03b0c70c40,=20 reg_save_area =3D 0xfffffe03b0c70be0}} #5 0xffffffff80ca51e7 in vfs_op_enter (mp=3D0xfffffe03ae86f5c0) at /usr/home/jfc/freebsd/src/sys/kern/vfs_mount.c:1715 cpu =3D mpcpu =3D #6 0xffffffff80ca496f in dounmount (mp=3D0xfffffe03ae86f5c0,=20 flags=3Dflags@entry=3D134217728, td=3Dtd@entry=3D0xfffff801cda27740) at /usr/home/jfc/freebsd/src/sys/kern/vfs_mount.c:1934 coveredvp =3D 0xfffff801cdf8bb70 mnt_gen_r =3D error =3D rootvp =3D async_flag =3D #7 0xffffffff80ca4812 in kern_unmount (td=3D0xfffff801cda27740,=20 path=3D, flags=3D134217728) at /usr/home/jfc/freebsd/src/sys/kern/vfs_mount.c:1635 nd =3D {ni_dirp =3D 0xe7 ,=20 ni_segflg =3D UIO_USERSPACE, ni_rightsneeded =3D 0xfffff802b5b615= 28,=20 ni_startdir =3D 0x3, ni_rootdir =3D 0x0,=20 ni_topdir =3D 0xfffffe03af3ea3f0, ni_dirfd =3D 58975744,=20 ni_lcf =3D -2047, ni_filecaps =3D {fc_rights =3D {cr_rights =3D {= 52, 0}},=20 fc_ioctls =3D 0xcda2774211000000, fc_nioctls =3D 1, fc_fcntls = =3D 0},=20 ni_vp =3D 0xfffffe03af3ea3f0, ni_dvp =3D 0x1ab485eaa000,=20 ni_resflags =3D 2965835520, ni_debugflags =3D 65027,=20 ni_loopcnt =3D 65535, ni_pathlen =3D 0,=20 ni_next =3D 0xfffffe03b0c70db0 "\020\016=C7=B0\003\376\377\377w\327\b\201\377\377\377\377", ni_cnd =3D {cn= _origflags =3D 18446744071577972639,=20 cn_flags =3D 18446741890537033476, cn_thread =3D 0xfffffe03b0c7= 0f40,=20 cn_cred =3D 0x1, cn_nameiop =3D LOOKUP, cn_lkflags =3D 0,=20 cn_pnbuf =3D 0xfffff801cda27740 "\300\200\370\n\001\376\377\377\020p\357\260\003\376\377\377",=20 cn_nameptr =3D 0x1ab485eaa558 , cn_namelen =3D -2183172518384}, ni_cap_tracker =3D { tqh_first =3D 0xffffffff8108d777 ,=20 tqh_last =3D 0x0}, ni_dvp_seqc =3D 4, ni_vp_seqc =3D 0} id0 =3D 231 id1 =3D 50 error =3D pathbuf =3D 0xfffff80105479400 "\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\2= 55\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\= 300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336= \336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\25= 5\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\3= 00\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\= 336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255= \336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\30= 0\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\3= 36\300\255\336\336\300\255\336\336\300\255\336\336\300\255\336\336\300\255\= 336\336\300\255\336\336\300\255\336\336\300\255", ... mp =3D 0xfffffe03ae86f5c0 #8 0xffffffff8108ded0 in syscallenter (td=3D) at /usr/home/jfc/freebsd/src/sys/amd64/amd64/../../kern/subr_syscall.c:= 188 se =3D 0xffffffff81abd8a0 p =3D 0xfffffe03b0ef7010 sa =3D 0xfffff801cda27b18 error =3D sy_thr_static =3D true traced =3D _audit_entered =3D #9 amd64_syscall (td=3D0xfffff801cda27740, traced=3D0) at /usr/home/jfc/freebsd/src/sys/amd64/amd64/trap.c:1181 ksi =3D {ksi_link =3D {tqe_next =3D 0xfffffe03b0c70f30,=20 tqe_prev =3D 0xffffffff8108d043 }, ksi_info =3D { si_signo =3D -844990656, si_errno =3D -2047, si_code =3D -13291= 31712,=20 si_pid =3D -509, si_uid =3D 2965835376, si_status =3D -509,=20 si_addr =3D 0x46, si_value =3D {sival_int =3D -1329131920,=20 sival_ptr =3D 0xfffffe03b0c70e70, sigval_int =3D -1329131920,= =20 sigval_ptr =3D 0xfffffe03b0c70e70}, _reason =3D {_fault =3D { _trapno =3D -2135246730}, _timer =3D {_timerid =3D -2135246= 730,=20 _overrun =3D -1}, _mesgq =3D {_mqd =3D -2135246730}, _poll = =3D { _band =3D -2135246730}, __spare__ =3D {__spare1__ =3D -2135= 246730,=20 __spare2__ =3D {-2114969952, -1, 70, 0, 0, 0, 725966195}}}}= ,=20 ksi_flags =3D -1329131856,=20 ksi_sigq =3D 0xffffffff80b5f242 } Here are selected fields from the struct mount object: mnt_vfs_ops =3D 1 mnt_kern_flag =3D 0x4100 mnt_flag =3D 0x1001 mnt_rootvnode =3D 0 mnt_gen =3D 1 --=20 You are receiving this mail because: You are the assignee for the bug.=