[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Indeterminism in tarlz's test suite
From: |
Antonio Diaz Diaz |
Subject: |
Re: Indeterminism in tarlz's test suite |
Date: |
Mon, 19 Apr 2021 19:18:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 |
Hi Florian,
Florian Schmaus wrote:
testing bad input...tarlz: Exiting with failure status due to previous
errors.
1108(5)
Thank you very much for reporting this.
The problem is in fact a race happening on a test archive with a format
violation put there on purpose, and only can happen when more than 2 threads
are being used.
The archive in question contains a directory with a long name requiring an
extended header, and a global header has been inserted in its own lzip
member between the extended header and the ustar header like this:
+=================+===============+==============+
| extended header | global header | ustar header |
+=================+===============+==============+
The problem happens when the thread decoding the ustar header finishes
before the thread decoding the extended header has time to realize that its
lzip member is incomplete.
I have fixed the problem by making the thread decoding the ustar header
signal the error in a way that can later be overridden by another thread.
The underlying problem is that the pax format is not really adequate for
parallel decoding, forcing tarlz to jump through a lot of hoops to achieve
it. I hope a new tar format can be designed with parallel decoding in mind.
I'll release a fixed version as soon as I test the fix and finish a couple
more things.
Best regards,
Antonio.