Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SEEK_HOLE in coreutils 9.0 #143208

Closed
dasJ opened this issue Oct 27, 2021 · 6 comments
Closed

Enable SEEK_HOLE in coreutils 9.0 #143208

dasJ opened this issue Oct 27, 2021 · 6 comments
Labels
2.status: wait-for-upstream Waiting for upstream fix (or their other action).

Comments

@dasJ
Copy link
Member

dasJ commented Oct 27, 2021

Issue description

#143097 will disable SEEK_HOLE in coreutils to fix regressions on ZFS (and potentially other filesystems?).
This issue is to track progress on us re-enabling the feature since it gives us a potential performance boost.
This issue is also to move the discussion around this problem from #141684 since it will probably outlive the staging-next cycle.

Useful links (maintainers feel free to edit and add):

@dasJ dasJ added the 2.status: wait-for-upstream Waiting for upstream fix (or their other action). label Oct 27, 2021
@mohe2015
Copy link
Contributor

Followup on the peertube issue I and others investigated further:

If you build the esbuild_locked derivation in peertube on top of the buggy staging-next you should be able to reproducibly get a segfaulting esbuild. If you now do an arbitrary derivation-hash changing change on the esbuild_locked derivation you should (with likely high probability) get a working esbuild.
This shows that the issue seems to be rare (but reproducible). Also if you diff these two build results you will see that lots of data was overwritten with zeros which is the cause of the segfault. This symptom is closely matching with the SEEK_HOLE (holes are filled with zeros) issue in coreutils and reverting that commit in coreutils also fixes the issue with esbuild.
The problem was mostly that not many derivations of esbuild on top of the buggy coreutils exhibit the buggy behaviour so it's hard to investigate.

It's interesting that changing the derivation also usually hides the problem and currently not really known why that happens (reproducibly even)

@eggert
Copy link

eggert commented Oct 28, 2021

My guess is that coreutils is falling victim to a kernel or file system bug of some sort. (Of course I could be wrong.) See my recent comments in coreutils bug#51433.

@dasJ
Copy link
Member Author

dasJ commented Oct 28, 2021

@eggert One thing that I just remembered tonight is the Nix substitution mechanism which may be causing some of the non-ZFS issues. When building something locally (no matter the filesystem), Nix tries to query the builds results from the cache.nixos.org (where the builders are at least partially ZFS-backed iirc).
This means that even when somebody is building locally on ext4, they may get substituions for intermediate build products (like the Go compiler) that were built on ZFS.

The problem is that it's really hard to tell what happened here since paths that are substituted and paths that are built locally cannot really be told from each other and disabling substitution entirely means huge local rebuilds.

@mohe2015
Copy link
Contributor

Cross-Ref #143097 (comment)

TLDR: The peertube issue's root cause is extremely likely zfs on the binary cache as dasJ explained.

@dasJ
Copy link
Member Author

dasJ commented Feb 3, 2022

Looks like we can drop the patch for the next coreutils release, the coreutils maintainers deem this as fixed: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51433#58

@dasJ
Copy link
Member Author

dasJ commented Jul 13, 2022

Going to close this, as it's enabled now

@dasJ dasJ closed this as completed Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: wait-for-upstream Waiting for upstream fix (or their other action).
Projects
None yet
Development

No branches or pull requests

3 participants