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

Fix race condition in timeout handling #1460

Merged

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Jan 6, 2025

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
Copy link
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this fixes a race condition I encountered when testing #1450, where the {ok, Pid} response would get stuck in the stack and a timeout returned when the port was opened too fast after closing it.

@pguyot
Copy link
Collaborator Author

pguyot commented Jan 7, 2025

It doesn't fix all flakiness, including one timeout issue on test_exit2, but first run only had 3 fails on 38.

@bettio bettio merged commit 78a4ee1 into atomvm:release-0.6 Jan 7, 2025
96 of 97 checks passed
@pguyot pguyot deleted the w02/fix-race-condition-in-timeout branch January 7, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants