A share torn down while starting can stay published (test stream_audio_that_cannot_start… fails intermittently) #921

Closed
opened 2026-11-18 23:29:10 +00:00 by charles · 1 comment
Owner

CI run 393 (Linux, textchat 199b815) failed on apps/fluxer/tests/screenshare_runtime.rs stream_audio_that_cannot_start_ends_the_share_and_says_so (added for #751):

panicked at apps/fluxer/tests/screenshare_runtime.rs:555:5:
nothing is published

The test waits for the refusal notice, for the outgoing share to be Idle and for the capture to stop, then asserts at once that the room has no screen publication. On the runner the publication was still (or again) there.

Two possibilities, to tell apart by reproduction, not by guess.

  1. Test only: the unpublish is asynchronous and simply arrives a moment after the capture stops; the assertion should wait for it.
  2. A real race: the share's publish is still in flight when the stream-audio failure tears the share down, and completes afterwards, leaving a screen track published with nothing feeding it — other participants would then see a frozen or black stream from this user until they leave the call, and the sharer's UI says the share is over. (Same family as #908, where a late frame outlived its track.)

To do. Reproduce under parallel load (several niced copies of the same test binary, no synthetic burners); log the order of publish/unpublish against the teardown. If it is (2): fix at the root (a teardown that started before the publish completed must unpublish what the publish produces; one owner for "the share is over") with a test at the level where the race lives that fails before the fix; check the same for stop-by-user during start, source closed during start, and room lost during start. If it is (1): make the test wait, and say why the product is safe. Show 50 consecutive passes of screenshare_runtime under the same load.

CI run 393 (Linux, textchat 199b815) failed on `apps/fluxer/tests/screenshare_runtime.rs` `stream_audio_that_cannot_start_ends_the_share_and_says_so` (added for #751): ``` panicked at apps/fluxer/tests/screenshare_runtime.rs:555:5: nothing is published ``` The test waits for the refusal notice, for the outgoing share to be `Idle` and for the capture to stop, then asserts at once that the room has no screen publication. On the runner the publication was still (or again) there. **Two possibilities, to tell apart by reproduction, not by guess.** 1. Test only: the unpublish is asynchronous and simply arrives a moment after the capture stops; the assertion should wait for it. 2. A real race: the share's publish is still in flight when the stream-audio failure tears the share down, and completes afterwards, leaving a screen track published with nothing feeding it — other participants would then see a frozen or black stream from this user until they leave the call, and the sharer's UI says the share is over. (Same family as #908, where a late frame outlived its track.) **To do.** Reproduce under parallel load (several niced copies of the same test binary, no synthetic burners); log the order of publish/unpublish against the teardown. If it is (2): fix at the root (a teardown that started before the publish completed must unpublish what the publish produces; one owner for "the share is over") with a test at the level where the race lives that fails before the fix; check the same for stop-by-user during start, source closed during start, and room lost during start. If it is (1): make the test wait, and say why the product is safe. Show 50 consecutive passes of `screenshare_runtime` under the same load.
Author
Owner

Fixed by #922, published in nightly 2026.1119.395.

Fixed by #922, published in nightly 2026.1119.395.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#921
No description provided.