|
From: | Antonio Diaz Diaz |
Subject: | Re: File ends unexpectedly at pos XXX when compressing |
Date: | Sun, 20 Aug 2023 15:44:35 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
Scott Mcdermott wrote:
You are right, I did not think it were possible, but there were read errors on the NVME device in the kernel log, which I was able to reproduce with 'dd' skip to the LBA and issue reads. Interestingly, "tar | pbzip2" finished the whole thing without error, although repeated attempts with "tarlz" always produced errors.
This might be because tarlz reads and compresses files in parallel (multithreaded) when creating a compressed archive, while tar reads files sequentially (one at a time). You can make tarlz read files sequentially by passing option -n0 in the command line:
-n N --threads=NSet the number of (de)compression threads, overriding the system's default. Valid values range from 0 to "as many as your system can support". A value of 0 disables threads entirely.
I have just added to my list of pending tasks to improve the diagnostic above to specify whether the cause is EOF or some error.Excellent, strerror() would be useful to print in latter case...
I have already implemented the improved diagnostic. It will appear in the next version of tarlz.
Best regards, Antonio.
[Prev in Thread] | Current Thread | [Next in Thread] |