On Wed, May 04, 2022 at 05:58:14PM +0200, Martin Pieuchot wrote:
> I don't understand the mechanism around UVM_VNODE_CANPERSIST. I looked
> for missing uvm_vnp_uncache() and found the following two. I doubt
> those are the one triggering the bug because they are in NFS & softdep.
It crashes while compiling clang.
c++ -O2 -pipe -fno-ret-protector -std=c++14 -fvisibility-inlines-hidden
-fno-exceptions -fno-rtti -Wall -W -Wno-unused-parameter -Wwrite-strings
-Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long
-Wdelete-non-virtual-dtor -Wno-comment -fPIE -MD -MP
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../../../llvm/llvm/include
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../include
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/obj
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/obj/../include
-DNDEBUG -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-DLLVM_PREFIX="/usr"
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../../../llvm/lldb/include
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../../../llvm/lldb/source
-I/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../../../llvm/clang/include
-c
/usr/src/gnu/usr.bin/clang/liblldbPluginExpressionParser/../../../llvm/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
-o ClangExpressionParser.o
Timeout, server ot26 not responding.
No softdep, but NFS client. I use it to mount cvs mirror read-only.
This file system should not be used during make build.
/dev/wd0a on / type ffs (local)
/dev/wd0l on /home type ffs (local, nodev, nosuid)
/dev/wd0d on /tmp type ffs (local, nodev)
/dev/wd0f on /usr type ffs (local, nodev)
/dev/wd0g on /usr/X11R6 type ffs (local, nodev)
/dev/wd0h on /usr/local type ffs (local, nodev, wxallowed)
/dev/wd0k on /usr/obj type ffs (local, nodev, nosuid, wxallowed)
/dev/wd0j on /usr/src type ffs (local, nodev, nosuid)
/dev/wd0e on /var type ffs (local, nodev, nosuid)
regressmaster:/data/mirror/openbsd/cvs on /mount/openbsd/cvs type nfs (nodev,
nosuid, read-only, v3, udp, intr, wsize=32768, rsize=32768, rdirsize=32768,
timeo=100, retrans=101)
regressmaster:/data/mirror/openbsd/ftp on /mount/openbsd/ftp type nfs (nodev,
nosuid, read-only, v3, udp, intr, wsize=32768, rsize=32768, rdirsize=32768,
timeo=100, retrans=101)
regressmaster:/data/mirror/openbsd/distfiles on /mount/openbsd/distfiles type
nfs (nodev, nosuid, read-only, v3, udp, intr, wsize=32768, rsize=32768,
rdirsize=32768, timeo=100, retrans=101)
Should I test this diff?
> Index: nfs/nfs_serv.c
> ===================================================================
> RCS file: /cvs/src/sys/nfs/nfs_serv.c,v
> retrieving revision 1.120
> diff -u -p -r1.120 nfs_serv.c
> --- nfs/nfs_serv.c 11 Mar 2021 13:31:35 -0000 1.120
> +++ nfs/nfs_serv.c 4 May 2022 15:29:06 -0000
> @@ -1488,6 +1488,9 @@ nfsrv_rename(struct nfsrv_descript *nfsd
> error = -1;
> out:
> if (!error) {
> + if (tvp) {
> + (void)uvm_vnp_uncache(tvp);
> + }
> error = VOP_RENAME(fromnd.ni_dvp, fromnd.ni_vp, &fromnd.ni_cnd,
> tond.ni_dvp, tond.ni_vp, &tond.ni_cnd);
> } else {
> Index: ufs/ffs/ffs_inode.c
> ===================================================================
> RCS file: /cvs/src/sys/ufs/ffs/ffs_inode.c,v
> retrieving revision 1.81
> diff -u -p -r1.81 ffs_inode.c
> --- ufs/ffs/ffs_inode.c 12 Dec 2021 09:14:59 -0000 1.81
> +++ ufs/ffs/ffs_inode.c 4 May 2022 15:32:15 -0000
> @@ -172,11 +172,12 @@ ffs_truncate(struct inode *oip, off_t le
> if (length > fs->fs_maxfilesize)
> return (EFBIG);
>
> - uvm_vnp_setsize(ovp, length);
> oip->i_ci.ci_lasta = oip->i_ci.ci_clen
> = oip->i_ci.ci_cstart = oip->i_ci.ci_lastw = 0;
>
> if (DOINGSOFTDEP(ovp)) {
> + uvm_vnp_setsize(ovp, length);
> + (void) uvm_vnp_uncache(ovp);
> if (length > 0 || softdep_slowdown(ovp)) {
> /*
> * If a file is only partially truncated, then