Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions cpp/obs/src/moq-output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ void MoQOutput::OnConnect(const std::shared_ptr<Attempt> &current, moq::expected
auto ms = static_cast<int>(std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count());
const int connects = static_cast<int>((*result)->connects());

// OBS and older dock paths treat connect_time_ms == 0 as "never connected".
// Clamp sub-millisecond connects to 1 so that sentinel stays honest. Set before
// the session reads as live, so nothing sees a live session that never connected.
connect_time_ms = ms > 0 ? ms : 1;

current->session = *result;
current->connected = true;
current->live = true;
Expand All @@ -290,9 +295,6 @@ void MoQOutput::OnConnect(const std::shared_ptr<Attempt> &current, moq::expected
last_failure_code = MoQError::None;
last_failure_reason.clear();
}
// OBS and older dock paths treat connect_time_ms == 0 as "never connected".
// Clamp sub-millisecond connects to 1 so that sentinel stays honest.
connect_time_ms = ms > 0 ? ms : 1;

LOG_INFO("MoQ session connected (%d ms, connect %d): %s", ms, connects, MoQRedactUrl(current->url).c_str());

Expand Down
7 changes: 5 additions & 2 deletions cpp/obs/test/moq-output-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,12 @@ int main()
auto first = TestOk(next.get(), "first frame");
CHECK(first.has_value());

// Large enough that it is still in flight when Stop() runs.
// Large enough to be in flight when Stop() runs, so a Stop() that cancels
// rather than drains cuts it off (256 KiB can land first under TSan). Small
// enough to drain well inside moq-net's one-second drain deadline, which cuts
// the track off by design, even under TSan on a loaded host.
auto large = keyframe;
large.resize(large.size() + 16 * 1024 * 1024, 0xff);
large.resize(large.size() + 2 * 1024 * 1024, 0xff);
auto last = videoPacket(large, 1);
o->Data(&last);
// OBS may destroy the output right after stopping it.
Expand Down
9 changes: 6 additions & 3 deletions cpp/obs/test/tsan.supp
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
# (tokio's atomics and parking, the handoffs between its threads) is invisible and
# reads as a race wherever memory crosses it. That includes the generated bindings'
# future plumbing, which hands its state to Rust on one thread and gets it back in a
# Rust callback on another. This matches reports with a Rust frame on either stack:
# the symbolizer leaves Rust's v0-mangled names as they are, and every one starts
# with _R, which no demangled C++ name does.
# Rust callback on another. These match reports with a Rust frame on either stack.
# A frame's name depends on how it was symbolized: from the symbol table it is a
# v0-mangled name starting with _R, which no demangled C++ name does, but from an
# inlined call's debug info it is a demangled one. Its source file ends in .rs
# either way.
race:^_R
race:.rs$

# aws-lc is C built inside moq-ffi without the sanitizer too. A TLS connection's
# state moves between moq-ffi's worker threads through tokio's handoffs, so its
Expand Down
8 changes: 2 additions & 6 deletions quest/m1/test-flakes-2/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# More tests hold up under load
# [S] More tests hold up under load

## Goal

Expand Down Expand Up @@ -33,14 +33,10 @@ The redundant failover drift moved to m0 on 2026-10-20 (maintainer) and is
fixed by [moq-dev/moq#6113](https://github.com/moq-dev/moq/pull/6113).

Added 2026-10-21 (maintainer): small flakes from the m0/m1 merge run, kept
in one child; only the OBS stop drain remains.
in one child.

Public API: none. Wire: none.

## Required

- [OBS drain under load](/quest/m1/test-flakes-2/three-flakes.md) - verify the existing close-tail fix against the reproduced OBS stop-drain failure; the merged JS allocation replacement passed under load

## Related

- [Controlled time](/quest/m1/time/README.md) - the systemic fix these rules ask for: every crate on a controlled clock
Expand Down
36 changes: 0 additions & 36 deletions quest/m1/test-flakes-2/three-flakes.md

This file was deleted.

Loading