Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garbage Collector thread can block forever if system time is set back #729

Closed
jeandube opened this issue Jun 10, 2019 · 0 comments · Fixed by #733
Closed

Garbage Collector thread can block forever if system time is set back #729

jeandube opened this issue Jun 10, 2019 · 0 comments · Fixed by #733
Labels
[core] Area: Changes in SRT library core

Comments

@jeandube
Copy link
Collaborator

Problem discovered on Linux aarch64 (was not present on armv7l). Thanks to @StephaneStH for diagnostic and fix for this problem. Our firmware monitors all threads and asserts if anyone of them stops looping. The problem is reproduced with a SRT listener in listening state while system time is set in the past: the pthread_cond_timedwait() scheduled to timeout every 1 sec. will never timeout. This is probably not critical to most systems but it shows a design flaw. The fix that will be submitted in a pull request is to use clock_gettime(CLOCK_MONOTONIC, &timeout); instead of gettimeofday(&now,0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core
Projects
None yet
2 participants