Skip to content

Commit 17bf0d9

Browse files
committed
fix(smoke): _exit the C client once it has its frame
libmoq.a statically bundles moq-video (openh264/vaapi/cuda). Those worker threads use priority-protected mutexes, and tearing them down at normal process exit can trip glibc's __pthread_tpp_change_priority assertion and abort with a core dump, even though the moq data path already delivered a frame. The client only needs to confirm receipt, so _exit(0) right after, skipping the dependency's atexit teardown. Fixes the flaky rust -> c leg. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QfH4fCnLu9WHGdAjwW8L3Y
1 parent 6008782 commit 17bf0d9

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

test/smoke/clients/c/subscribe.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,13 @@ int main(int argc, char **argv) {
159159

160160
if (got) {
161161
fprintf(stderr, "received a frame from %s\n", broadcast);
162-
moq_session_close((uint32_t)session);
163-
return 0;
162+
// The data path succeeded, which is all this smoke client verifies.
163+
// libmoq statically bundles moq-video (openh264/vaapi/cuda), whose
164+
// worker threads use priority-protected mutexes; tearing them down at
165+
// normal exit can trip a glibc pthread priority assertion and abort.
166+
// Skip that atexit teardown with _exit now that we have our result.
167+
fflush(stderr);
168+
_exit(0);
164169
}
165170
fprintf(stderr, "error: timed out waiting for data\n");
166171
return 1;

0 commit comments

Comments
 (0)