Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Feb 2021 15:53:15 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Juraj Lutter <otis@FreeBSD.org>, freebsd-current <freebsd-current@freebsd.org>
Cc:        Mateusz Guzik <mjg@FreeBSD.org>
Subject:   Re: -CURRENT panics in NFS
Message-ID:  <YQXPR0101MB0968CF8BCCD34DB340879F44DD9C9@YQXPR0101MB0968.CANPRD01.PROD.OUTLOOK.COM>
In-Reply-To: <560DD7DF-B1C0-432B-BFCA-9D00819E0C28@FreeBSD.org>
References:  <E173E60B-D0AF-4315-A99F-ABA1F3D5BBEF@FreeBSD.org> <FBDA3107-00AF-4CF3-B6FA-F09EA8163D7B@FreeBSD.org>, <560DD7DF-B1C0-432B-BFCA-9D00819E0C28@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--_002_YQXPR0101MB0968CF8BCCD34DB340879F44DD9C9YQXPR0101MB0968_
Content-Type: text/plain; charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

I reproduced the problem and the attached trivial patch=0A=
seems to fix it. Please test the patch if you can.=0A=
=0A=
Mateusz, I assume the directory shouldn't try and add=0A=
a cache entry for itself?=0A=
I don't test NFSv3 much and I don't test "rdirplus"=0A=
much, so it slipped through the cracks.=0A=
=0A=
Thanks for reporting it, rick=0A=
=0A=
________________________________________=0A=
From: owner-freebsd-current@freebsd.org <owner-freebsd-current@freebsd.org>=
 on behalf of Juraj Lutter <otis@FreeBSD.org>=0A=
Sent: Saturday, February 27, 2021 9:31 AM=0A=
To: freebsd-current=0A=
Subject: Re: -CURRENT panics in NFS=0A=
=0A=
CAUTION: This email originated from outside of the University of Guelph. Do=
 not click links or open attachments unless you recognize the sender and kn=
ow the content is safe. If in doubt, forward suspicious emails to IThelp@uo=
guelph.ca=0A=
=0A=
=0A=
And a kgdb backtrace:=0A=
=0A=
(kgdb) bt=0A=
#0  __curthread () at /usr/src/sys/amd64/include/pcpu_aux.h:55=0A=
#1  doadump (textdump=3Dtextdump@entry=3D0) at /usr/src/sys/kern/kern_shutd=
own.c:399=0A=
#2  0xffffffff804c7b2a in db_dump (dummy=3D<optimized out>, dummy2=3D<unava=
ilable>, dummy3=3D<unavailable>, dummy4=3D<unavailable>) at /usr/src/sys/dd=
b/db_command.c:575=0A=
#3  0xffffffff804c78ee in db_command (last_cmdp=3D<optimized out>, cmd_tabl=
e=3D<optimized out>, dopager=3Ddopager@entry=3D1) at /usr/src/sys/ddb/db_co=
mmand.c:482=0A=
#4  0xffffffff804c762d in db_command_loop () at /usr/src/sys/ddb/db_command=
.c:535=0A=
#5  0xffffffff804cac36 in db_trap (type=3D<optimized out>, code=3D<optimize=
d out>) at /usr/src/sys/ddb/db_main.c:270=0A=
#6  0xffffffff80c59d04 in kdb_trap (type=3Dtype@entry=3D3, code=3Dcode@entr=
y=3D0, tf=3D<optimized out>, tf@entry=3D0xfffffe00d01c3d40) at /usr/src/sys=
/kern/subr_kdb.c:727=0A=
#7  0xffffffff810bc1ee in trap (frame=3D0xfffffe00d01c3d40) at /usr/src/sys=
/amd64/amd64/trap.c:576=0A=
#8  <signal handler called>=0A=
#9  kdb_enter (why=3D0xffffffff812accc9 "panic", msg=3D<optimized out>) at =
/usr/src/sys/kern/subr_kdb.c:506=0A=
#10 0xffffffff80c0d5d2 in vpanic (fmt=3D<optimized out>, ap=3D<optimized ou=
t>, ap@entry=3D0xfffffe00d01c3ea0) at /usr/src/sys/kern/kern_shutdown.c:907=
=0A=
#11 0xffffffff80c0d363 in panic (fmt=3D0xffffffff81e9a178 <cnputs_mtx> "\17=
7\256&\201\377\377\377\377") at /usr/src/sys/kern/kern_shutdown.c:843=0A=
#12 0xffffffff80cd6d74 in cache_enter_time (dvp=3D0xfffff80079321e00, vp=3D=
0xfffff80079321e00, cnp=3Dcnp@entry=3D0xfffffe00d01c4030, tsp=3Dtsp@entry=
=3D0xfffffe00d01c40e0, dtsp=3D<optimized out>)=0A=
    at /usr/src/sys/kern/vfs_cache.c:2274=0A=
#13 0xffffffff80ae2bd6 in nfsrpc_readdirplus (vp=3D<optimized out>, vp@entr=
y=3D0xfffff80079321e00, uiop=3D<optimized out>, uiop@entry=3D0xfffffe00d01c=
4540,=0A=
    cookiep=3Dcookiep@entry=3D0xfffffe00d01c44e0, cred=3Dcred@entry=3D0xfff=
ff80079307e00, p=3D<optimized out>, p@entry=3D0xfffffe00de06be00, nap=3Dnap=
@entry=3D0xfffffe00d01c4400,=0A=
    attrflagp=3D0xfffffe00d01c44f0, eofp=3D0xfffffe00d01c44f4, stuff=3D0x0)=
 at /usr/src/sys/fs/nfsclient/nfs_clrpcops.c:3766=0A=
#14 0xffffffff80aed4ec in ncl_readdirplusrpc (vp=3Dvp@entry=3D0xfffff800793=
21e00, uiop=3Duiop@entry=3D0xfffffe00d01c4540, cred=3D0xfffff80079307e00, t=
d=3Dtd@entry=3D0xfffffe00de06be00)=0A=
    at /usr/src/sys/fs/nfsclient/nfs_clvnops.c:2490=0A=
#15 0xffffffff80afdc93 in ncl_doio (vp=3Dvp@entry=3D0xfffff80079321e00, bp=
=3Dbp@entry=3D0xfffffe000ee1c610, cr=3D0xfffffe00d01c3d00, cr@entry=3D0xfff=
ff80079307e00, td=3Dtd@entry=3D0xfffffe00de06be00,=0A=
    called_from_strategy=3Dcalled_from_strategy@entry=3D0) at /usr/src/sys/=
fs/nfsclient/nfs_clbio.c:1686=0A=
#16 0xffffffff80afce3c in ncl_bioread (vp=3D<optimized out>, vp@entry=3D0xf=
ffff80079321e00, uio=3D<optimized out>, ioflag=3Dioflag@entry=3D0, cred=3D<=
optimized out>)=0A=
    at /usr/src/sys/fs/nfsclient/nfs_clbio.c:604=0A=
#17 0xffffffff80af1baf in nfs_readdir (ap=3Dap@entry=3D0xfffffe00d01c4918) =
at /usr/src/sys/fs/nfsclient/nfs_clvnops.c:2383=0A=
#18 0xffffffff80ce490f in vop_sigdefer (vop=3D<optimized out>, a=3D0xfffffe=
00d01c4918) at /usr/src/sys/kern/vfs_default.c:1471=0A=
#19 0xffffffff81181f38 in VOP_READDIR_APV (vop=3D0xffffffff81af00d8 <newnfs=
_vnodeops>, a=3Da@entry=3D0xfffffe00d01c4918) at vnode_if.c:1939=0A=
#20 0xffffffff80d0b23b in VOP_READDIR (vp=3D0xfffff80079321e00, uio=3D0xfff=
ffe00d01c48d0, cred=3D<optimized out>, eofflag=3D0xfffffe00d01c48cc, ncooki=
es=3D0x0, cookies=3D0x0) at ./vnode_if.h:985=0A=
#21 kern_getdirentries (td=3D<optimized out>, fd=3D<optimized out>, buf=3D0=
x801851000 <error: Cannot access memory at address 0x801851000>, count=3D40=
96, basep=3Dbasep@entry=3D0xfffffe00d01c49b0,=0A=
    residp=3Dresidp@entry=3D0x0, bufseg=3DUIO_USERSPACE) at /usr/src/sys/ke=
rn/vfs_syscalls.c:4142=0A=
#22 0xffffffff80d0b449 in sys_getdirentries (td=3D0xffffffff81e9a178 <cnput=
s_mtx>, uap=3D0xfffffe00de06c1e8) at /usr/src/sys/kern/vfs_syscalls.c:4089=
=0A=
#23 0xffffffff810bd00e in syscallenter (td=3D<optimized out>) at /usr/src/s=
ys/amd64/amd64/../../kern/subr_syscall.c:189=0A=
#24 amd64_syscall (td=3D0xfffffe00de06be00, traced=3D0) at /usr/src/sys/amd=
64/amd64/trap.c:1156=0A=
#25 <signal handler called>=0A=
#26 0x00000008012a83fa in ?? ()=0A=
Backtrace stopped: Cannot access memory at address 0x7fffffffd928=0A=
=0A=
=97=0A=
Juraj Lutter=0A=
XMPP: juraj (at) lutter.sk=0A=
GSM: +421907986576=0A=
=0A=
> On 27 Feb 2021, at 15:18, Juraj Lutter <otis@FreeBSD.org> wrote:=0A=
>=0A=
> Reliably reproducible:=0A=
>=0A=
=0A=
_______________________________________________=0A=
freebsd-current@freebsd.org mailing list=0A=
https://lists.freebsd.org/mailman/listinfo/freebsd-current=0A=
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"=
=0A=

--_002_YQXPR0101MB0968CF8BCCD34DB340879F44DD9C9YQXPR0101MB0968_
Content-Type: application/octet-stream; name="rdirplus.patch"
Content-Description: rdirplus.patch
Content-Disposition: attachment; filename="rdirplus.patch"; size=468;
	creation-date="Sat, 27 Feb 2021 15:52:55 GMT";
	modification-date="Sat, 27 Feb 2021 15:52:55 GMT"
Content-Transfer-Encoding: base64

LS0tIHN5cy9mcy9uZnNjbGllbnQvbmZzX2NscnBjb3BzLmMuc2F2MgkyMDIxLTAyLTI3IDA3OjIx
OjA0LjAxNzM3MzAwMCAtMDgwMAorKysgc3lzL2ZzL25mc2NsaWVudC9uZnNfY2xycGNvcHMuYwky
MDIxLTAyLTI3IDA3OjIzOjIxLjIxMzU1NTAwMCAtMDgwMApAQCAtMzc2MSw2ICszNzYxLDcgQEAg
bmZzcnBjX3JlYWRkaXJwbHVzKHZub2RlX3QgdnAsIHN0cnVjdCB1aW8gKnVpb3AsIG5mc3VpCiAJ
CQkJICAgIG5kcC0+bmlfdnAgPSBuZXd2cDsKIAkJCQkgICAgTkZTQ05IQVNIKGNucCwgSEFTSElO
SVQpOwogCQkJCSAgICBpZiAoY25wLT5jbl9uYW1lbGVuIDw9IE5DSE5BTUxFTiAmJgorCQkJCQlu
ZHAtPm5pX2R2cCAhPSBuZHAtPm5pX3ZwICYmCiAJCQkJCShuZXd2cC0+dl90eXBlICE9IFZESVIg
fHwKIAkJCQkJIGRjdGltZS50dl9zZWMgIT0gMCkpIHsKIAkJCQkJY2FjaGVfZW50ZXJfdGltZShu
ZHAtPm5pX2R2cCwK

--_002_YQXPR0101MB0968CF8BCCD34DB340879F44DD9C9YQXPR0101MB0968_--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?YQXPR0101MB0968CF8BCCD34DB340879F44DD9C9>