Merge lp:~yavor-nikolov/pbzip2/bug-762464-consumer_decompress-hang-on-trailing-garbage-and-empty-queue into lp:pbzip2/1.1

Proposed by Yavor Nikolov
Status: Merged
Merged at revision: 20
Proposed branch: lp:~yavor-nikolov/pbzip2/bug-762464-consumer_decompress-hang-on-trailing-garbage-and-empty-queue
Merge into: lp:pbzip2/1.1
Diff against target: 50 lines (+10/-1)
2 files modified
ChangeLog (+2/-0)
pbzip2.cpp (+8/-1)
To merge this branch: bzr merge lp:~yavor-nikolov/pbzip2/bug-762464-consumer_decompress-hang-on-trailing-garbage-and-empty-queue
Reviewer Review Type Date Requested Status
Yavor Nikolov Approve
Review via email: mp+57994@code.launchpad.net

Description of the change

Fix of bug #762464 (hang on trailing garbage with relatively large -p#: consumers waiting for new blocks are waiting forever on empty queue when producer has been interrupted due to trailing garbage)

To post a comment you must log in.
Revision history for this message
Yavor Nikolov (yavor-nikolov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2011-04-01 20:13:21 +0000
+++ ChangeLog 2011-04-16 13:01:14 +0000
@@ -1,4 +1,6 @@
1Changes in 1.1.4 (NOT RELEASED YET)1Changes in 1.1.4 (NOT RELEASED YET)
2- Fixed hang on decompress with --ignore-trailing-garbage=1 when
3 producer is interrupted on trailing garbage (bug #762464)
2- Added example to help for decompression piped to tar (bug #746806)4- Added example to help for decompression piped to tar (bug #746806)
3- Fixed typo in Trailing Garbage printed message (bug #746799)5- Fixed typo in Trailing Garbage printed message (bug #746799)
4Changes in 1.1.3 (Mar 27, 2011)6Changes in 1.1.3 (Mar 27, 2011)
57
=== modified file 'pbzip2.cpp'
--- pbzip2.cpp 2011-04-01 20:13:21 +0000
+++ pbzip2.cpp 2011-04-16 13:01:14 +0000
@@ -192,6 +192,8 @@
192 * - Default extension on decompress of .tbz2 changed to .tar for 192 * - Default extension on decompress of .tbz2 changed to .tar for
193 * bzip2 compatibility (bug #743639)193 * bzip2 compatibility (bug #743639)
194 * - Print trailing garbage errors even when in quiet mode (bug #743635)194 * - Print trailing garbage errors even when in quiet mode (bug #743635)
195 * - Fixed hang on decompress with --ignore-trailing-garbage=1 when
196 * producer is interrupted on trailing garbage (bug #762464)
195 *197 *
196 *198 *
197 * Specials thanks for suggestions and testing: Phillippe Welsh,199 * Specials thanks for suggestions and testing: Phillippe Welsh,
@@ -1247,6 +1249,8 @@
12471249
1248 if (producerDecompressCheckInterrupt(hInfile, fileData, NumBlocks) != 0)1250 if (producerDecompressCheckInterrupt(hInfile, fileData, NumBlocks) != 0)
1249 {1251 {
1252 safe_cond_broadcast(fifo->notEmpty); // just in case
1253 syncSetProducerDone(1);
1250 return 0;1254 return 0;
1251 }1255 }
12521256
@@ -1272,6 +1276,8 @@
12721276
1273 if (producerDecompressCheckInterrupt(hInfile, fileData, NumBlocks) != 0)1277 if (producerDecompressCheckInterrupt(hInfile, fileData, NumBlocks) != 0)
1274 {1278 {
1279 safe_cond_broadcast(fifo->notEmpty); // just in case
1280 syncSetProducerDone(1);
1275 safe_mutex_unlock(fifo->mut);1281 safe_mutex_unlock(fifo->mut);
1276 return 0;1282 return 0;
1277 }1283 }
@@ -1344,7 +1350,8 @@
1344 #endif1350 #endif
1345 }1351 }
1346 if ( (syncGetLastGoodBlock() != -1) &&1352 if ( (syncGetLastGoodBlock() != -1) &&
1347 ( (lastElement == NULL) || (lastElement->blockNumber > syncGetLastGoodBlock()) ) )1353 ( (lastElement == NULL) || (lastElement->blockNumber > syncGetLastGoodBlock())
1354 || lastElement->isLastInSequence ) )
1348 {1355 {
1349 isInterrupted = true;1356 isInterrupted = true;
13501357

Subscribers

People subscribed via source and target branches