You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix deadlock in band-callback backpressure for reduced images
The incremental band-write callback's empty-row handler used a
strict in-order check (tileY == nextBandTileY_) with an early
return. When Taskflow completed tile rows out of order — common
with tiny tiles from high resolution reduction (-r 4 on a
5-resolution image) — empty rows finishing before prior rows
silently lost their nextBandTileY_ advancement. This left the
parser thread's backpressure loop (bandDrainCV_.wait_for)
spinning forever, blocking decompressWorker_ and causing the
main thread to hang on join().
Replace the early-return path with sentinel entries in
pendingBands_. The existing drain loop now processes empty rows
in order alongside non-empty ones, skipping compositing and
the band callback but still advancing nextBandTileY_ and
waking the parser thread. This handles out-of-order row
completion correctly regardless of scheduling order.
Reproduces ~30-50% of the time on p1_06.j2k with -r 4;
verified fixed over 150 consecutive iterations with zero
hangs.
0 commit comments