-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Sparse file support breaks pipe output on decompression. #110
Comments
Hi, @eborisch. Thanks for the report ! Recently, we have same reports
And it has been resolved by 58b5aad. So, could you try latest dev branch ?
EDIT : Fix wrong commit hash. |
note : xz has interesting comment for sparse file mode |
So sorry for the duplicate -- I thought I had searched, but clearly I missed it. Confirmed that latest dev branch works as advertised on FreeBSD 10.1. Closing. Thanks for the excellent SW & quick response! I'll contact the FreeBSD port maintainer to make sure they are aware. Any chance of a new tagged release with this fix? |
No problem 😄 I also need more smart search for issues on github. Anyway, thanks for confirming ! |
Thanks for reporting. I'm therefore inclined on selecting the stronger option to disable sparse support on For your comments |
FWIW, selfishly, I'd prefer if you kept/fixed sparse support on all output types on OSes that support it well if you can. Or, at the very least, on Linux... :-/ |
The short term proposal Default sparse support would remain enabled for direct write-to-file operations, which don't suffer above issues. Is that nonetheless a problem for you @ido ? |
Seems like a reasonable approach. The associated error message could also call out the fix. "Try --no-sparse." Corner cases (named pipe passed as output file argument?) likely still exist. To be truly robust, but still support sparse files, perhaps the seek on the output stream should be attempted and then gracefully handled (by disabling sparse) on EPIPE / SIGPIPE. Likely only needs to be tested at start of execution; perhaps during argument parsing. |
This is how it is currently handled within "dev" branch.
Good point ! |
…rection scenario reported by Takayuki Matsuoka (#110)
Latest update in "dev" branch acae59a One of the last remaining questions is : should it be made a hotfix (due to |
👍 for hotfix ! note : I've reopened this issue, for @Cyan4973's commit and future PR. |
Moved to master |
On FreeBSD; 'liblz4-129'; installed via portmaster.
This used to work, but fails with 129:
I can make the piped output version work again with --no-sparse on the decompression step; i.e. both of these work:
It seems to me that --no-sparse should be the default when outputting to a pipe; and to be compatible with other (bzip2, gzip, etc) filters that don't require an additional flag. This could be accomplished either via stat() and S_ISREG() testing, or by gracefully recovering on a skip error. (My guess is the former will be more straightforward to implement, and the latter a more robust solution for unexpected cases.)
The text was updated successfully, but these errors were encountered: