pbunzip2 --ignore-trailing-garbage=1 hangs with large enough -p# - consumers hang after producer is interrupted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pbzip2 |
Fix Released
|
Medium
|
Yavor Nikolov |
Bug Description
I'm seeing regular hangs with pbzip2 on a 16 core machine when using pbzip2 to decompress lots of portage packages. I can reproduce the hang about once every 200 decompresses if 5 or more processors are used. With 4 processors or less, I can't reproduce the issue. Specifying -p4 works around the issue, but -p5 or higher leads to crashes...
Reproduction recipe:
$ pbzip2 --version
Parallel BZIP2 v1.1.3 - by: Jeff Gilchrist [http://
[Mar. 27, 2011] (uses libbzip2 by Julian Seward)
Major contributions: Yavor Nikolov <email address hidden>
$ wget http://
$ for i in $(seq 1 1000); do echo $i; pbzip2 -dc --ignore-
After 103 tries, pbzip2 hung on the archive, without using any CPU. I can exit by hitting CTRL-C. Here is example output:
pbzip2: *WARNING: Trailing garbage after EOF ignored!
^C
*Control-C or similar caught [sig=2], quitting...
Terminator thread: premature exit requested - quitting..
I've attached a sample archive that reproduces the crash. I've reproduced the crash with several different archives, all of which have trailing garbage in xpak format (from Gentoo Portage).
Changed in pbzip2: | |
status: | Confirmed → In Progress |
summary: |
- pbunzip2 --ignore-trailing-garbage=1 still hangs with 1.1.3 + pbunzip2 --ignore-trailing-garbage=1 hangs with large enough -p# - + consumers hang after producer is interrupted |
Changed in pbzip2: | |
status: | In Progress → Fix Committed |
Changed in pbzip2: | |
status: | Fix Committed → Fix Released |
Thanks for reporting that. Does the issue also occur with --ignore- trailing- garbage= 0?