Bug 276050 - pijul clone on ZFS (Error: No error: 0 (os error 0))
Summary: pijul clone on ZFS (Error: No error: 0 (os error 0))
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 14.0-RELEASE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-fs (Nobody)
Depends on:
Reported: 2024-01-01 08:13 UTC by Mike
Modified: 2024-01-13 05:07 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Mike 2024-01-01 08:13:11 UTC
hi all,

standard distro, GENERIC
affected systems: 13.2-RELEASE-p8, 14.0-RELEASE-p3
affected rust: 1.75, nightly

How to repeat:
# cargo install pijul --version "~1.0.0-beta"
# pijul -V
pijul 1.0.0-beta.8
# pijul clone https://nest.pijul.com/pijul/pijul pijul
Repository created at /pijul/data/pijul
Downloading changes [====>                                             ] 80/990                                                          
           Applying [==>                                               ] 52/990                                                          
Error: No error: 0 (os error 0)

0. pijul clones under UFS (!)
1. pijul clones on COW FS under Linux - btrfs, bcachefs, zfs (2.0.6)
Comment 1 Mike 2024-01-02 13:38:38 UTC

pkg install libsodium xxhash pkgcon
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2024-01-02 22:15:24 UTC
I'm sorry, but I don't see what is actionable here.

What output is expected?
Comment 3 Mike 2024-01-02 23:06:48 UTC
Clone must finish successfully like on ufs mountpoint on freebsd.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2024-01-02 23:14:37 UTC
^Triage: note feedback received.
Comment 5 Mike 2024-01-06 07:10:52 UTC
Correct package is pkgconf. Thank you.
Comment 6 Mark Johnston freebsd_committer freebsd_triage 2024-01-12 19:09:04 UTC
This isn't a FreeBSD base system bug, at least not without more debugging.

There is an official pijul package available - have you tested that?  Do you get the same result?
Comment 7 Mike 2024-01-12 19:24:22 UTC
Right, of course, install pijul from ports. Failed the same way.
How can you explain these error since UFS is ok?
Comment 8 Mark Johnston freebsd_committer freebsd_triage 2024-01-12 20:43:12 UTC
(In reply to Mike from comment #7)
Well, clearly there is a bug in pijul, since it says "No error" but exits anyway.

If I run the example under truss, I see:

posix_fallocate(0xb,0x0,0x300000)                ERR#22 'Invalid argument'

and indeed, ZFS does not implement fallocate on FreeBSD.  There is a Linux implementation, but FreeBSD has ".vop_allocate = VOP_EINVAL".

Assuming that this is the root cause of the problem, either pijul needs to tolerate such errors from posix_fallocate() if possible, or OpenZFS needs to implement fallocate on FreeBSD.

cc'ed the devel/pijul maintainer in the hopes that this can be worked around somehow. :)
Comment 11 Mateusz Guzik freebsd_committer freebsd_triage 2024-01-13 05:07:07 UTC
btw https://github.com/openzfs/zfs/pull/13958