Repository navigation
ChunkerFixed: ignore posix_fadvise() errors, e.g. ESPIPE for a FIFO (1.2-maint) - #10570
Merged
ThomasWaldmann merged 1 commit intoOct 29, 2026
Merged
Conversation
posix_fadvise() fails with ESPIPE for a pipe / FIFO (e.g. on Linux and FreeBSD), so "borg create --read-special" with the fixed chunker could not read a FIFO at all: the OSError made borg skip it with an error. posix_fadvise() is only an optimization of the cache usage, so ignore its errors, like safe_fadvise() does (it can not be used here due to an import cycle on Linux). master uses safe_fadvise since 2025. Also add a test reading from a real pipe. See borgbackup#10565. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Port of the 1.4-maint fix.
dread()inchunker.pyxcalledos.posix_fadvise()on the file handle after each read. That fails withESPIPEfor a pipe / FIFO (e.g. on Linux and FreeBSD), so withborg create --read-special --chunker-params fixed,...borg could not read a FIFO at all and skipped it with an error.posix_fadvise()is only an optimization of the page cache usage, so its errors are now ignored, likesafe_fadvise()does.safe_fadvise()itself can not be imported inchunker.pyx, due to an import cycle on Linux (helpers -> chunker -> platform -> platform.linux -> helpers). master usessafe_fadvise()since 2025 and is not affected; its test PR is #10568.Tests: the new
test_chunkify_pipechunks a real pipe's file handle withChunkerFixed. On Linux it failed before this fix withOSError: [Errno 29] Illegal seekand passes with it.See #10565. The short-read fix for the same scenario was merged in #10563 (1.4-maint) / #10564 (1.2-maint).
🤖 Generated with Claude Code