Skip to content

[SYCL] fix for flaky ~event failure in Win unit tests #19762

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

Open
wants to merge 1 commit into
base: sycl
Choose a base branch
from

Conversation

cperkinsintel
Copy link
Contributor

Windows shutdown/teardown doesn't have the exact same timing as on Linux, and even more in the the unit tests which are statically compiled ( so no DllMain() call, which means no space between the calls to shutdown_early() and shutdown_late() ). Here we remove a race between the platform deletion in the mock and the win shutdown. This fixes a flaky failure we are seeing in a couple of the unit tests.

@uditagarwal97
Copy link
Contributor

uditagarwal97 commented Aug 11, 2025

Windows shutdown/teardown doesn't have the exact same timing as on Linux, and even more in the the unit tests which are statically compiled ( so no DllMain() call, which means no space between the calls to shutdown_early() and shutdown_late() ). Here we remove a race between the platform deletion in the mock and the win shutdown.

Can you please elaborate more on how the race happens? Like rough thread interleavings?
I'm trying to think of an alternative approach, somewhat along the lines of: can we use mutexes to enforce an ordering between shutdown_late and shutdown_early, on Windows? To avoid any overhead, this mutex based shutdown ordering can be put under a special macro, that we define only when building unittests.

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.

2 participants