pbunzip2 1.1.8 uncompressing data compressed with bzip2 on 2-CPU system deadlocks on FreeBSD 10.1

Bug #1397765 reported by Jan Mikkelsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pbzip2
New
Undecided
Unassigned

Bug Description

Machine: Dell Optiplex 755 with an Intel Core-2 Duo running FreeBSD 10.1. pbunzip2 compiled with Clang 3.4 from FreeBSD ports.

Decompressing a file generated by bzip2 from a DVD hangs quickly, all threads showing waiting on "uwait". pbunzip2 consumes no CPU and no forward progress is made.

Running with "-p1" runs to completion.

Recompiling with DPBZIP_DEBUG runs to completion.

Running the code on different hardware with fast I/O runs to completion (eg. Xeon-based server reading from SSDs).

Examining the source code, the DPBZIP_DEBUG case as the following code in consumer_decompress():

                        #ifdef PBZIP_DEBUG
                        safe_cond_timed_wait(fifo->notEmpty, fifo->mut, 1, "consumer");
                        #else
                        safe_cond_wait(fifo->notEmpty, fifo->mut);
                        #endif

Modifying this code to not special-case the debug code reproduces the problem with log output. See attached file for log information.

Revision history for this message
Jan Mikkelsen (janm-ubuntu) wrote :
Revision history for this message
Yavor Nikolov (yavor-nikolov) wrote :

Thanks for reporting that. Could you check if the issue reproducible with pbzip2 1.1.10? (Or maybe even with the code on https://code.launchpad.net/~pbzip2/pbzip2/bug-1399589-crash-on-compress-on-os-x)

Revision history for this message
Jan Mikkelsen (janm-ubuntu) wrote :

Sorry about the delay -- ran into Christmas the the summer holidays in Australia.

Just tested against 1.1.12, same problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.