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

shutdown hooks nondeterministic on windows? #11536

Open
adriaanm opened this issue May 16, 2019 · 1 comment

Comments

Projects
None yet
4 participants
@adriaanm
Copy link
Member

commented May 16, 2019

From https://scala-ci.typesafe.com/job/scala-2.13.x-integrate-windows/976/consoleFull

!!  733 - run/shutdownhooks.scala                   [output differs][duration 5.87s]
% diff Y:\jenkins\workspace\scala-2.13.x-integrate-windows\test\files\run\shutdownhooks.check Y:\jenkins\workspace\scala-2.13.x-integrate-windows\test\files\run\shutdownhooks-run.log--- shutdownhooks.check
+++ shutdownhooks-run.log
@@ -1,3 +1,3 @@
 Fooblitzky!
-main#shutdown.
 Test#shutdown.
+main#shutdown.
##### Log file 'Y:\jenkins\workspace\scala-2.13.x-integrate-windows\test\files\run\shutdownhooks-run.log' from failed test #####

Fooblitzky!
Test#shutdown.
main#shutdown.

@adriaanm adriaanm referenced this issue May 16, 2019

Closed

Release 2.13.0-RC2 #626

53 of 53 tasks complete
@lrytz

This comment has been minimized.

Copy link
Member

commented May 16, 2019

https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#addShutdownHook-java.lang.Thread- says

When the virtual machine begins its shutdown sequence it will start all registered shutdown hooks in some unspecified order and let them run concurrently

I think we just need to give the test a bit more slack in timing (https://github.com/scala/scala/blob/2.13.x/test/files/run/shutdownhooks.scala#L3)

@eed3si9n eed3si9n self-assigned this May 31, 2019

eed3si9n added a commit to eed3si9n/scala that referenced this issue May 31, 2019

Sleep longer to overcome shutdown hook concurrency
Fixes scala/bug#11536

https://docs.oracle.com/javase/8/docs/api/java/lang/Runtime.html#addShutdownHook-java.lang.Thread-

> When the virtual machine begins its shutdown sequence it will start all registered shutdown hooks in some unspecified order and let them run concurrently

@eed3si9n eed3si9n added the has PR label May 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.