Other XFS + LKLFUSE - is this broken?

I need XFS filesystem under FreeBSD.

So I have created a partition or two:
Code:
root@fb13:/home/willy # gpart show /dev/ada2
=>         40  35156656048  ada2  GPT  (16T)
           40  17179869184     1  linux-data  (8.0T)
  17179869224  17976786864     2  linux-data  (8.4T)

Created Filesystem:
Code:
root@fb13:/home/willy # mkfs.xfs -m crc=0 -L LABEL00XFS /dev/ada2p1
meta-data=/dev/ada2p1            isize=256    agcount=8, agsize=268435455 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=0        finobt=0
data     =                       bsize=4096   blocks=2147483640, imaxpct=5
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=0
log      =internal log           bsize=4096   blocks=521728, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

And try to use it:
Code:
root@fb13:/home/willy # kldload fusefs
root@fb13:/home/willy # lklfuse -o type=xfs /dev/ada2p1 /home/willy/xfs/

So far so good ...

So from now issuing ANY command that would try to read from this filesystem permanently hung this session/system and is not responding.

ls - hung
df - hung

Only Hard Reset is possible. (I think one time I managed to kill something from another session and got the control back)

Logs are clear, nothing.

Partition is OK. I can mount and use it under Linux.
xfs-repair under Linux does not detect any issues.

The same behavior has been observed under FreeBSD 13 (fresh install) as well as Xigmans ( based on FreeBSD 12.3 - fresh install)
Linux used to test the FS is Debian Live 11.2

Do I something wrong or something is really broken?

Best.
willy.
 
Yes. That's the port.

But if it's not working for root I would be VERY surprised if it would work for a normal user.
 
I don't know about recently on FreeBSD, but certainly years ago: some things FUSE-related on Mac OS X had the option (maybe a default) to deny root.
 
Thats not the case:

Code:
willy@nks3000:~ % sysctl vfs.usermount
vfs.usermount: 1
willy@nks3000:~ % sudo chmod 0666 /dev/ada2p2
willy@nks3000:~ % ll /dev/ada2p2
crw-rw-rw-  1 root  operator  0x93 Feb 13 08:30 /dev/ada2p2
willy@nks3000:~ % lklfuse -o type=xfs /dev/ada2p2 /home/willy/xfs
willy@nks3000:~ % ll
Hung.

From another session:
Code:
willy@nks3000:~ % ps ux
USER   PID %CPU %MEM    VSZ   RSS TT  STAT STARTED    TIME COMMAND
willy 1309  0.0  0.1  21392  9304  -  S    08:27   0:00.12 sshd: willy@pts/0 (sshd)
willy 1316  0.0  0.0  14896  5652  -  Ss   08:27   0:00.52 tmux: server (/tmp/tmux-1001/default) (tmux)
willy 1370  0.0  0.1 126276 15344  -  Is   08:37   0:01.53 lklfuse -o type=xfs /dev/ada2p2 /home/willy/xfs
willy 1372  0.0  0.0  13980  4008  2  Is   08:38   0:00.01 -tcsh (tcsh)
willy 1395  0.0  0.0  13352  2904  2  D+   08:53   0:00.00 ls -lAF
willy 1396  0.0  0.0  16540  4180  3  Ss   08:53   0:00.04 -tcsh (tcsh)
willy 1446  0.0  0.0  13468  3056  3  R+   09:00   0:00.00 ps ux
willy 1310  0.0  0.0  13980  4004  0  Is   08:27   0:00.01 -tcsh (tcsh)
willy 1314  0.0  0.0  14896  4668  0  I+   08:27   0:00.01 tmux: client (/tmp/tmux-1001/default) (tmux)
willy 1317  0.0  0.0  16540  4180  1  Is   08:27   0:00.05 -tcsh (tcsh)
willy 1371  0.0  0.0  13352  2904  1  D+   08:37   0:00.00 ls -lAF
willy@nks3000:~ % kill -9 1370
willy@nks3000:~ %

I'm not able to kill ls process, but
Killing the lklfuse process allows me to regain control.
 
One step forward:

Code:
willy@nks3000:~ % lklfuse -d -o type=xfs /dev/ada2p2 ~/xfs
FUSE library version: 2.9.9
nullpath_ok: 1
nopath: 1
utime_omit_ok: 1
[    0.000000] Linux version 4.16.0 (root@130amd64-quarterly-job-13) (gcc version 10.3.0 (FreeBSD Ports Collection)) #1 Sat Jan 15 10:53:54 UTC 2022
[    0.000000] bootmem address range: 0x802c01000 - 0x806c00000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16159
[    0.000000] Kernel command line: mem=64M virtio_mmio.device=292@0x1000000:1
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory available: 64496k/65532k RAM
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 4096
[    0.000000] lkl: irqs initialized
[    0.000000] clocksource: lkl: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000000] lkl: time and timers initialized (irq2)
[    0.000005] pid_max: default: 4096 minimum: 301
[    0.000019] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.000022] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.002687] console [lkl_console0] enabled
[    0.002697] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.002700] xor: automatically using best checksumming function   8regs     
[    0.002737] random: get_random_u32 called from bucket_table_alloc+0x8b/0x250 with crng_init=0
[    0.002764] NET: Registered protocol family 16
[    0.186798] raid6: int64x1  gen()  6567 MB/s
[    0.373805] raid6: int64x1  xor()  3841 MB/s
[    0.560806] raid6: int64x2  gen()  7935 MB/s
[    0.747801] raid6: int64x2  xor()  4861 MB/s
[    0.934825] raid6: int64x4  gen()  6839 MB/s
[    1.121803] raid6: int64x4  xor()  4487 MB/s
[    1.308809] raid6: int64x8  gen()  6226 MB/s
[    1.425803] random: fast init done
[    1.513800] raid6: int64x8  xor()  4421 MB/s
[    1.513803] raid6: using algorithm int64x2 gen() 7935 MB/s
[    1.513804] raid6: .... xor() 4861 MB/s, rmw enabled
[    1.513805] raid6: using intx1 recovery algorithm
[    1.513873] clocksource: Switched to clocksource lkl
[    1.513939] NET: Registered protocol family 2
[    1.514025] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[    1.514028] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.514031] TCP bind hash table entries: 512 (order: 0, 4096 bytes)
[    1.514033] TCP: Hash tables configured (established 512 bind 512)
[    1.514069] UDP hash table entries: 128 (order: 0, 4096 bytes)
[    1.514072] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
[    1.514126] virtio-mmio: Registering device virtio-mmio.0 at 0x1000000-0x1000123, IRQ 1.
[    1.514218] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    1.514853] SGI XFS with ACLs, security attributes, no debug enabled
[    1.515779] io scheduler noop registered
[    1.515782] io scheduler deadline registered
[    1.515807] io scheduler cfq registered (default)
[    1.515809] io scheduler mq-deadline registered
[    1.515810] io scheduler kyber registered
[    1.515817] virtio-mmio virtio-mmio.0: Failed to enable 64-bit or 32-bit DMA.  Trying to continue, but this might not work.
[    1.517769] virtio_blk virtio0: [vda] 17976786864 512-byte logical blocks (9.20 TB/8.37 TiB)
[    1.518156] NET: Registered protocol family 10
[    1.518298] Segment Routing with IPv6
[    1.518310] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.518520] Btrfs loaded, crc32c=crc32c-generic
[    1.518541] Warning: unable to open an initial console.
[    1.518551] This architecture does not have kernel memory protection.
[    1.519299] XFS (vda): Mounting V4 Filesystem
[    1.519548] XFS (vda): Log inconsistent or not a log (last==0, first!=1)
[    1.519551] XFS (vda): empty log check failed
[    1.519552] XFS (vda): log mount/recovery failed: error -22
[    1.519562] XFS (vda): log mount failed
can't mount disk: Invalid argument
[    1.519729] reboot: Restarting system
 
Same effect with ext4:

Code:
willy@nks3000:~ % lklfuse -d -o type=ext4 /dev/ada3p2 ~/xfs
FUSE library version: 2.9.9
nullpath_ok: 1
nopath: 1
utime_omit_ok: 1
[    0.000000] Linux version 4.16.0 (root@130amd64-quarterly-job-13) (gcc version 10.3.0 (FreeBSD Ports Collection)) #1 Sat Jan 15 10:53:54 UTC 2022
[    0.000000] bootmem address range: 0x802c01000 - 0x806c00000
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16159
[    0.000000] Kernel command line: mem=64M virtio_mmio.device=292@0x1000000:1
[    0.000000] Dentry cache hash table entries: 8192 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory available: 64496k/65532k RAM
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 4096
[    0.000000] lkl: irqs initialized
[    0.000000] clocksource: lkl: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000000] lkl: time and timers initialized (irq2)
[    0.000005] pid_max: default: 4096 minimum: 301
[    0.000020] Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.000023] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes)
[    0.002631] console [lkl_console0] enabled
[    0.002641] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.002644] xor: automatically using best checksumming function   8regs     
[    0.002678] random: get_random_u32 called from bucket_table_alloc+0x8b/0x250 with crng_init=0
[    0.002700] NET: Registered protocol family 16
[    0.186842] raid6: int64x1  gen()  6567 MB/s
[    0.373840] raid6: int64x1  xor()  3848 MB/s
[    0.560845] raid6: int64x2  gen()  7946 MB/s
[    0.747843] raid6: int64x2  xor()  4854 MB/s
[    0.934839] raid6: int64x4  gen()  6838 MB/s
[    1.121842] raid6: int64x4  xor()  4479 MB/s
[    1.308846] raid6: int64x8  gen()  6226 MB/s
[    1.407838] random: fast init done
[    1.495154] raid6: int64x8  xor()  4011 MB/s
[    1.495157] raid6: using algorithm int64x2 gen() 7946 MB/s
[    1.495158] raid6: .... xor() 4854 MB/s, rmw enabled
[    1.495159] raid6: using intx1 recovery algorithm
[    1.495230] clocksource: Switched to clocksource lkl
[    1.495300] NET: Registered protocol family 2
[    1.495385] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes)
[    1.495388] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.495391] TCP bind hash table entries: 512 (order: 0, 4096 bytes)
[    1.495394] TCP: Hash tables configured (established 512 bind 512)
[    1.495429] UDP hash table entries: 128 (order: 0, 4096 bytes)
[    1.495432] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes)
[    1.495484] virtio-mmio: Registering device virtio-mmio.0 at 0x1000000-0x1000123, IRQ 1.
[    1.495580] workingset: timestamp_bits=62 max_order=14 bucket_order=0
[    1.496217] SGI XFS with ACLs, security attributes, no debug enabled
[    1.497129] io scheduler noop registered
[    1.497132] io scheduler deadline registered
[    1.497158] io scheduler cfq registered (default)
[    1.497160] io scheduler mq-deadline registered
[    1.497161] io scheduler kyber registered
[    1.497168] virtio-mmio virtio-mmio.0: Failed to enable 64-bit or 32-bit DMA.  Trying to continue, but this might not work.
[    1.499128] virtio_blk virtio0: [vda] 17976786864 512-byte logical blocks (9.20 TB/8.37 TiB)
[    1.499515] NET: Registered protocol family 10
[    1.499654] Segment Routing with IPv6
[    1.499667] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    1.499869] Btrfs loaded, crc32c=crc32c-generic
[    1.499889] Warning: unable to open an initial console.
[    1.499899] This architecture does not have kernel memory protection.
[    1.601934] EXT4-fs error (device vda): ext4_find_extent:902: inode #8: comm host1: pblk 1123057663 bad header/extent: invalid magic - magic 0, entries 0, max 0(0), depth 0(0)
[    1.602067] jbd2_journal_init_inode: Cannot locate journal superblock
[    1.602070] EXT4-fs (vda): Could not load journal inode
can't mount disk: Invalid argument
[    1.602367] reboot: Restarting system
^C
willy@nks3000:~ %
 
Back
Top