P0 correctness & shutdown safety (Epics #2–#5) #10
No reviewers
Labels
No labels
area:ci
area:compression
area:demux
area:metadata
area:packaging
area:session
area:sink
area:src
breaking-change
bug
documentation
duplicate
enhancement
epic
good first issue
help wanted
invalid
P0
P1
P2
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
marcpardo/gst-plugin-zenoh!10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/p0-correctness-0.5.0"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements the four P0 bug epics from the 0.5.0 milestone — the report's coherent "correctness" group. Self-contained fixes; no dependency or toolchain changes. One commit per epic.
Closes #2. Closes #3. Closes #4. Closes #5.
Epic #2 — Concurrency & shutdown safety
The
statemutex was held across blocking Zenoh I/O, serializing stat/state reads against publish/receive and defeating the source's lock-free flush design.render()/render_list()take a short lock to cloneArchandles, release it, then hand the payload to the worker and wait — bounded by a newpublish-timeout-msand cancellable via anunlockedatomic (unlock()/unlock_stop()+ flush events). The NULL/flush transition no longer hangs under defaultcongestion-control=blockwith no subscriber.flushingmoved ontoself(set lock-free); subscriberArc-wrapped;recv_timeoutloop runs withstatereleased.zenoh::open(...); poison-tolerant hot-path locks.Epic #3 — Error handling & session lifecycle
format!("{:?}", e).contains("Timeout"), deadcontains("timeout"|...)) with typed handling —recv_timeoutalready maps timeouts toOk(None), soErris a true disconnect.SessionWrapper::SharedGroupDrop.Epic #4 — zenohdemux correctness
DefaultHasher.unwrap()panics in the receiver thread (surfaces a GStreamer error).no_more_pads()emitted via a quiescence window (no-more-pads-timeout-ms);errorsstat exposed; demux session leak fixed.Epic #5 — Compression & batched-render correctness
Breaking vs 0.4.x compression wire format (0.4.0 unpublished — intentional).
HIGHCOMPRESSIONfixes the inverted level semantics.gst.compressionmetadata field (no moreuser.*smuggling).render_listparity: sharedencode_and_publish()so batched buffers get identical compression + buffer-timing metadata (previously sent raw, dropping both).droppedstatistic.Verification
--features compression; eachcompression-*feature builds individually; release build green.cargo fmt --checkclean;cargo clippy --all-targets --all-featuresclean for the new code.🤖 Generated with Claude Code