-
-
Notifications
You must be signed in to change notification settings - Fork 566
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
Sleep Sort in X86-64 Locks Up #4075
Comments
It is definitely something to do with the cpu timing differences between the machines and environments. I will work on it when I can again. Thank you. |
When I originally made the pull request, it passed all of the test cases, but when mulitiple threads are involved, there's more of a "randomness" to it, so that is likely why it wasn't passing the test cases for that instance. |
My approach might be to spinlock the main thread until the child is done preparing itself (instead of waiting), making the input iterations more strict (whitelisting input characters), and more gracefully terminating the threads (have main send a SIGTERM to the threads). |
It's missing the five, so that tells me it's an issue with how the last thread is getting handled, which is the same issue I had on my own machine while first writing this. |
This seems to happen pretty randomly. I can reproduce the issue locally maybe about half the time with this:
Here is an example of the failure. From the failure, it appears that the last entry is not being output. I'm moving
archive/x/x86-64/sleep-sort.asm
toneeds-attention/archive/x/x86-64/sleep-sort.asm
.Copying the original author: @RMarx1456
The text was updated successfully, but these errors were encountered: