Fix receiver FIFO race condition and improve error handling
This pull request fixes a rare race condition in the receiver FIFO queue and improves error handling in the librist library.
Summary of changes:
Protect FIFO access with a mutex in rist_receiver_data_read2 to ensure thread safety and prevent desynchronization when accessed from multiple threads. Replace the assertion with error logging and a return code (-3) in case of FIFO desynchronization, allowing the application to handle the error gracefully instead of aborting. Remove detailed debug logs used during development, keeping only essential error messages for release builds. Update the changelog (NEWS) to document the fix and the improved error handling.
Commits included:
3d71cf9e: Protect FIFO access with a mutex in rist_receiver_data_read2. e267115a: Remove detailed debug logs for release. f352d343: Add changelog entry for the FIFO race condition fix. 180c6708: Replace assertion with error logging and return code in case of FIFO desynchronization.
How to test:
Run the full test suite (meson test or via CI). All tests should pass, including those involving packet loss and concurrent access to the receiver.
Related issues:
(If applicable, reference any related issue or ticket here, e.g. Closes #123 (closed).)
Notes:
All code changes follow the project’s coding style (see CONTRIBUTING.md and Coding-style wiki). Please review the commit messages for detailed explanations of each change.