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

Improve reproducibility of Lin/STM Thread modes #338

Open
jmid opened this issue Apr 26, 2023 · 0 comments
Open

Improve reproducibility of Lin/STM Thread modes #338

jmid opened this issue Apr 26, 2023 · 0 comments
Labels
test suite reliability Issue concerns tests that should behave more predictably

Comments

@jmid
Copy link
Collaborator

jmid commented Apr 26, 2023

The Lin and STM Thread modes do not work as well as the Domain modes.
Failures to trigger an issue (or unexpectedly triggering one for a change) adds noise to our CI results.

Some past history:

As part of the latter, I spent some more time banging my head against the Thread issue.
In the end I used custom runtime_events to record when Threads would spawn to understand what we were observing.
This meant I could get a nice diagram like this:

thread-screenshot (1)
Which confirmed to me that most of our Thread tests indeed had two Threads running concurrently (starting and ending roughly at the same time)

I then went one step further and added custom events for run of one cmd (a small and fast function). This is the result:

run_cmd_screenshot
The little arrows mark simultaneous call and return of run. There are two next to each other, because Thread.yield triggers right after one (on Thread 0) and then the next happens (on Thread 1). This tells me that the Threads are also interleaving - it just happens too deterministically - in between each run - but very very very rarely in the middle of it.

The above may be helpful to guide further improvement attempts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite reliability Issue concerns tests that should behave more predictably
Projects
None yet
Development

No branches or pull requests

1 participant