In src/shared/multiprocessing.c, the server receive_thread() does not propagate failures from file_receive() or receive_chunk_enqueue(). When file_receive() returns NULL, the thread logs an error but continues to read the next status, which desynchronizes the protocol. When receive_chunk_enqueue() returns NULL (chunk receive failed), it simply returns without setting receiver_done, which can cause the writer thread to hang forever waiting on an empty queue.
Location
src/shared/multiprocessing.c:84-96 — receive_chunk_enqueue() returns without signaling on error.
src/shared/multiprocessing.c:121-127 — file_receive() failure is logged but not propagated.
Suggested fix
Introduce an error flag in PipelineContextReceiver.
On any receive error, set the flag and signal condition_not_empty so the writer thread can exit.
Return thrd_error from receive_thread() on failure.
Severity
Medium
Category
bug, quality
This issue was automatically generated by the issue-creator agent.
## Description
In `src/shared/multiprocessing.c`, the server `receive_thread()` does not propagate failures from `file_receive()` or `receive_chunk_enqueue()`. When `file_receive()` returns `NULL`, the thread logs an error but continues to read the next status, which desynchronizes the protocol. When `receive_chunk_enqueue()` returns `NULL` (chunk receive failed), it simply returns without setting `receiver_done`, which can cause the writer thread to hang forever waiting on an empty queue.
## Location
- `src/shared/multiprocessing.c:84-96` — `receive_chunk_enqueue()` returns without signaling on error.
- `src/shared/multiprocessing.c:121-127` — `file_receive()` failure is logged but not propagated.
## Suggested fix
1. Introduce an error flag in `PipelineContextReceiver`.
2. On any receive error, set the flag and signal `condition_not_empty` so the writer thread can exit.
3. Return `thrd_error` from `receive_thread()` on failure.
## Severity
Medium
## Category
bug, quality
---
_This issue was automatically generated by the issue-creator agent._
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
In
src/shared/multiprocessing.c, the serverreceive_thread()does not propagate failures fromfile_receive()orreceive_chunk_enqueue(). Whenfile_receive()returnsNULL, the thread logs an error but continues to read the next status, which desynchronizes the protocol. Whenreceive_chunk_enqueue()returnsNULL(chunk receive failed), it simply returns without settingreceiver_done, which can cause the writer thread to hang forever waiting on an empty queue.Location
src/shared/multiprocessing.c:84-96—receive_chunk_enqueue()returns without signaling on error.src/shared/multiprocessing.c:121-127—file_receive()failure is logged but not propagated.Suggested fix
PipelineContextReceiver.condition_not_emptyso the writer thread can exit.thrd_errorfromreceive_thread()on failure.Severity
Medium
Category
bug, quality
This issue was automatically generated by the issue-creator agent.