I upgraded our package builder machine to 13.0-BETA2 to prepare our first 13.0 deployments, and when I tried to look at something, I got this: # lsof -p 43535 lsof: WARNING: no ZFS support has been defined. See 00FAQ for more information. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME find 43535 root 0u VCHR 0,181 0t3109790 181 /dev/pts/2 find 43535 root 1u VCHR 0,181 0t3109790 181 /dev/pts/2 find 43535 root 2u VCHR 0,181 0t3109790 181 /dev/pts/2 find 43535 root 3r unknown file system type: zfs find 43535 root 4r unknown file system type: zfs find 43535 root 5r unknown file system type: zfs I had a look at 00FAQ, but it is way beyond me.
Lsof looks for zfs_znode.h to determine whether to build ZFS support. Said file has moved from the contrib/opensolaris directory to contrib/openzfs etc., and since #include paths are hard coded in Configure, it doesn't get picked up, and the support isn't included. I tried playing around with it a bit today, but encountered include escalation and put it on hold. Include paths are set in the Makefile, but there are too many files in different subdirectories with identical names that get referenced that it was not immediately apparent which need to be included and which do not.
And progress on this? thanks in advance
Also, I would propose to install 00FAQ as a documentation file.
Workaround, thanks to covacat at <https://forums.FreeBSD.org/threads/80511/post-515499>: sh -c "ps ax -o pid= | xargs procstat -f 2>/dev/null"
Any update on this?
I need the Kernel/FS guys to look at it.
this also (Obviously) applies to 14 as well.
<https://github.com/lsof-org/lsof/pull/184> > Use user mode APIs on FreeBSD by DamjanJovanovic · Pull Request > #184 · lsof-org/lsof – in particular: > … > > Portability: the flagship platform is FreeBSD 13, where development > and most testing was done. …
Is this still being considered? The current package lsof-4.94.0,8 still reports: "unknown file system type: zfs" errors. Could the port maintainer possibly integrate this patch for the port until it's merged into lsof master?
Yes, we're waiting on completion of: https://github.com/lsof-org/lsof/pull/180
I think DamjanJovanovic closed 180 and opened 184: https://github.com/lsof-org/lsof/pull/184 It's still not completed tho.
Yeah -- my mistake.
For now, anyone wishing to use DamjanJovanovic's version on FreeBSD can use this port file: https://github.com/risner/freebsd_lsof
(In reply to risner from comment #13) <https://github.com/risner/freebsd_lsof/issues/1> > * reading xvnode list failed: No such file or directory > > * please, am I missing something?
Currently the lsof team is waiting for FreeBSD to re-enable the kern.vnode sysctl disabled in 2003 with commit acb18acfec97aa7fe26ff48f80a5c3f89c9b542d. The FreeBSD ports patch to support usermode is waiting waiting on the lsof team to merge the ABI change pull request. The warning is a reminder it failed on kern.vnode and had to fall back to reading /dev/kmem to get inode information (see NODE column): root@plot:isner # lsof /dev/gpt/slot_B12 lsof: WARNING: compiled for FreeBSD release 13.0-RELEASE-p3; this is 13.0-RELEASE. lsof: WARNING -- reading xvnode list failed: No such file or directory COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME dd 48721 root 3r VCHR 1,32 0x72c8200 288 /dev/gpt/slot_B12 More info available here: https://github.com/lsof-org/lsof/pull/184#issuecomment-1023556335 So both of use (FreeBSD ports and lsof team) are waiting on an action by the other. If you need this working in FreeBSD now, my temporary port works for ZFS files.
<https://github.com/lsof-org/lsof/pull/184#issuecomment-1249603161> | <https://github.com/lsof-org/lsof/commit/d5555d1006e930a8ebe37551b1c22257dda95ad2>
fixed as of 4.96.1 (16/September/2022)
Larry, thanks. However, it fails to build for me on 13.1-RELEASE-p2 with amd64 in poudriere, reopening PR: 131amd64 13.1-RELEASE-p2 amd64 http 2022-09-03 15:49:18 /usr/local/poudriere/jails/131amd64 cc -pipe -fstack-protector-strong -fno-strict-aliasing -DNEEDS_BOOL_TYPEDEF -DHASTASKS -DHAS_PAUSE_SBT -DHAS_DUP2 -DHAS_CLOSEFROM -DHASEFFNLINK=i_effnlink -DHASF_VNODE -DHAS_FILEDESCENT -DHAS_TMPFS -DHASWCTYPE_H -DHASSBSTATE -DHAS_KVM_VNODE -DHAS_UFS1_2 -DHAS_NO_IDEV -DHAS_VM_MEMATTR_T -DNEEDS_DEVICE_T -DHAS_CDEV2PRIV -DHAS_NO_SI_UDEV -DHAS_SYS_SX_H -DHASFUSEFS -DHASMSDOSFS -DHAS_V_LOCKF -DHAS_LOCKF_ENTRY -DHAS_NO_6PORT -DHAS_NO_6PPCB -DNEEDS_BOOLEAN_T -DHAS_SB_CCC -DHAS_FDESCENTTBL -DFREEBSDV=13000 -DHASFDESCFS=2 -DHASPROCFS -DHASPSEUDOFS -DHASNULLFS -DHAS9660FS -DHAS_NO_ISO_DEV -DHASIPv6 -DHASUTMPX -DHAS_XTCPCB_TMAXSEG -DHAS_KF_SOCK_SENDQ -DHAS_STRFTIME -DLSOF_VSTR=\"13.1-RELEASE-p2\" -I/usr/src/sys -O2 -c dnode.c -o dnode.o dnode.c:174:16: error: variable has incomplete type 'struct kqueue' struct kqueue kq; /* kqueue structure */ ^ /usr/src/sys/sys/event.h:221:8: note: forward declaration of 'struct kqueue' struct kqueue; ^ 1 error generated. *** Error code 1 Stop. make[1]: stopped in /wrkdirs/usr/ports/sysutils/lsof/work/lsof-4.96.2-freebsd *** Error code 1 Stop. make: stopped in /usr/ports/sysutils/lsof =>> Cleaning up wrkdir ===> Cleaning for lsof-4.96.2.f,8 build of sysutils/lsof | lsof-4.96.2.f,8 ended at Fri Sep 16 22:17:29 CEST 2022
mjg is working on it. Expect a release in the next little bit
the build is not fixed, but the "unknown file system type: zfs" issue persists. Earlier today a significant revamp of FreeBSD support was committed to lsof which fixes the problem on the main branch, but I'm afraid it also makes it not feasible to fix the problem in this release.
Erm, the build is *now* fixed. :)
zfs now works on 13.1: ✔️0 ❯ lsof -p $$ lsof: WARNING: device cache mismatch: /dev/consolectl COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zsh 72146 ler txt VREG 3651033389,4196982310 833200 311433 /usr/local/bin/rzsh (zroot/ROOT/default) zsh 72146 ler ctty VCHR 0,198 0t0 198 /dev/pts/0 (devfs) zsh 72146 ler cwd VDIR 1837990949,1646255689 54 2 /usr/home/ler (zroot/usr/home) zsh 72146 ler rtd VDIR 3651033389,4196982310 26 34 / (zroot/ROOT/default) zsh 72146 ler 0u VCHR 0,198 0t5205 198 /dev/pts/0 (devfs) zsh 72146 ler 1u VCHR 0,198 0t5205 198 /dev/pts/0 (devfs) zsh 72146 ler 2u VCHR 0,198 0t5205 198 /dev/pts/0 (devfs) zsh 72146 ler 10u VCHR 0,198 0t2511 198 /dev/pts/0 (devfs) zsh 72146 ler 12r VREG 3651033389,4196982310 206904 312675 /usr/local/share/zsh/5.9/functions/Misc.zwc (zroot/ROOT/default) zsh 72146 ler 13r VREG 3651033389,4196982310 191816 311514 /usr/local/share/zsh/5.9/functions/Completion.zwc (zroot/ROOT/default) zsh 72146 ler 14r VREG 3651033389,4196982310 298600 311694 /usr/local/share/zsh/5.9/functions/Completion/Base.zwc (zroot/ROOT/default) zsh 72146 ler 16r VREG 3651033389,4196982310 197904 312834 /usr/local/share/zsh/5.9/functions/Zle.zwc (zroot/ROOT/default) lsof: WARNING: /home/ler/.lsof_oldtbh2 was updated. ler in oldtbh2 in ~ via C v13.0.0-clang as 🧙 ✔️0 ❯ uname 0a usage: uname [-abiKmnoprsUv] ler in oldtbh2 in ~ via C v13.0.0-clang as 🧙 ✖1 ❯ uname -a FreeBSD oldtbh2.lerctr.org 13.1-RELEASE-p2 FreeBSD 13.1-RELEASE-p2 GENERIC amd64 ler in oldtbh2 in ~ via C v13.0.0-clang as 🧙 ✔️0 ❯ ❯ uname -a FreeBSD thebighonker.lerctr.org 13.1-STABLE FreeBSD 13.1-STABLE #45 ler/freebsd13-updates-n252409-d20f393b1828: Thu Sep 15 16:58:18 CDT 2022 root@thebighonker.lerctr.org:/usr/obj/usr/src/amd64.amd64/sys/LER-MINIMAL amd64 ler in thebighonker in ~ via ☕ v1.8.0 via 🐪 v5.32.1 via 💎 v3.0.4 ❯ lsof -p $$ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME zsh 95076 ler txt VREG 1287696945,2748505807 830872 1971100 /usr/local/bin/zsh-5.9 (zroot/local) zsh 95076 ler ctty VCHR 0,208 0t0 208 /dev/pts/0 (devfs) zsh 95076 ler cwd VDIR 1042165292,1249435356 459 4 /home/ler (zroot/home/ler) zsh 95076 ler rtd VDIR 3536223283,2923814514 33 4 / (zroot/ROOT/13-s-2022_09_15-1658) zsh 95076 ler 0u VCHR 0,208 0t1733 208 /dev/pts/0 (devfs) zsh 95076 ler 1u VCHR 0,208 0t1733 208 /dev/pts/0 (devfs) zsh 95076 ler 2u VCHR 0,208 0t1733 208 /dev/pts/0 (devfs) zsh 95076 ler 10u VCHR 0,208 0t1370 208 /dev/pts/0 (devfs) zsh 95076 ler 13r VREG 1287696945,2748505807 197904 1977337 /usr/local/share/zsh/5.9/functions/Zle.zwc (zroot/local) zsh 95076 ler 14r VREG 1287696945,2748505807 206904 1976928 /usr/local/share/zsh/5.9/functions/Misc.zwc (zroot/local) zsh 95076 ler 15r VREG 1287696945,2748505807 191816 1971280 /usr/local/share/zsh/5.9/functions/Completion.zwc (zroot/local) zsh 95076 ler 17r VREG 1287696945,2748505807 298600 1974088 /usr/local/share/zsh/5.9/functions/Completion/Base.zwc (zroot/local) ler in thebighonker in ~ via ☕ v1.8.0 via 🐪 v5.32.1 via 💎 v3.0.4 ❯