-
Notifications
You must be signed in to change notification settings - Fork 327
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
RuntimeManagementTest is not shutting down Threads properly #10804
Comments
Possible fix to give unnamed threads some name doesn't help as this test isn't leaking the threads: $ git diff
diff --git engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/semantic/RuntimeManagementTest.scala engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/semantic/RuntimeManagementTest.scala
index 876b42ab20..7f3b018f3a 100644
--- engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/semantic/RuntimeManagementTest.scala
+++ engine/runtime-integration-tests/src/test/scala/org/enso/interpreter/test/semantic/RuntimeManagementTest.scala
@@ -47,7 +47,7 @@ class RuntimeManagementTest extends InterpreterTest {
}
def runTest(n: Int = 5): Unit = {
- val threads = 0.until(n).map(_ => new Thread(runnable))
+ val threads = 0.until(n).map(_ => new Thread(runnable, "RuntimeManagementTest-Thread"))
threads.foreach(_.start())
var reportedCount = 0
while (reportedCount < n) { that names one of the testing threads. |
What do you mean. "Every time" it is run? I can:
however that runs the test only once. How do I reproduce "every time"? |
Taking heap dump shows the Thread-144 hanging there after
is a The Thread-143 is also |
There are four tests in
|
Culprit: |
Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-26): Progress: - note about run a node in different context: #10719 (comment)
|
At the end fixes the problem by finishing the threads when they become idle. |
Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-27): Progress: - minimizing moving parts: 3c28bc9
|
Jaroslav Tulach reports a new STANDUP for yesterday (2024-08-28): Progress: .
|
As revealed in the investigation related to memory leaks.
Seems like every time
RuntimeManagementTest
is run, we keep two threads up and running:Not sure if this is caused by the bug in a test or in the implementation (finalizers) of ManagedResource.
The text was updated successfully, but these errors were encountered: