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

Fixes #24968: Upgrade to ZIO 2.1.2 #5989

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

clarktsiory
Copy link
Contributor

@clarktsiory clarktsiory commented Nov 4, 2024

https://issues.rudder.io/issues/24968
[ ] TODO: use EagerShiftBack
It seems to work when disabling test runs with the Runtime.enableAutoBlockingExecutor, but in tests there are memory errors :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.028 sec
Running com.normation.rudder.services.queries.TestStringQueryParser
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.008 sec
Running com.normation.rudder.services.queries.TestNodeFactQueryProcessor
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e82f2000, 16384, 0) failed; error='Not enough space' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 16384 bytes. Error detail: committing reserved memory.
# An error report file with more information is saved as:
# /home/clarkenciel/IdeaProjects/rudder/webapp/sources/rudder/rudder-core/hs_err_pid23970.log
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e81f2000, 16384, 0) failed; error='Not enough space' (errno=12)
[thread 58859 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e80f2000, 16384, 0) failed; error='Not enough space' (errno=12)
[thread 58860 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e7ff2000, 16384, 0) failed; error='Not enough space' (errno=12)
[thread 58861 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e7ef2000, 16384, 0) failed; error='Not enough space' (errno=12)
[thread 58862 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e7df2000, 16384, 0) failed; error='Not enough space' (errno=12)
[thread 58863 also had an error]
[thread 58864 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e7cf2000, 16384, 0) failed; error='Not enough space' (errno=12)
[36.910s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[thread 58865 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f37e7bf2000, 16384, 0) failed; error='Not enough space' (errno=12)
[36.910s][warning][os,thread] Failed to start the native thread for java.lang.Thread "ZScheduler-Worker-18"
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
        at java.base/java.lang.Thread.start0(Native Method)
        at java.base/java.lang.Thread.start(Thread.java:809)
        at zio.internal.ZScheduler.<init>(ZScheduler.scala:52)
        at zio.RuntimePlatformSpecific.$anonfun$enableAutoBlockingExecutor$1(RuntimePlatformSpecific.scala:59)
        at zio.ZLayer.$anonfun$scope$17(ZLayer.scala:431)
        at zio.ZLayer$MemoMap$$anon$25.$anonfun$getOrElseMemoize$17(ZLayer.scala:1986)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1077)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:413)
        at zio.internal.FiberRuntime.start(FiberRuntime.scala:1393)
        at zio.Runtime$UnsafeAPIV1.runOrFork(Runtime.scala:160)
        at zio.Runtime$UnsafeAPIV1.run(Runtime.scala:133)
        at zio.Runtime$unsafe$.fromLayer(Runtime.scala:309)
        at com.normation.zio$ZioRuntime$.$anonfun$unsafeRun$1(ZioCommons.scala:444)
        at zio.Unsafe$.unsafe(Unsafe.scala:37)
        at com.normation.zio$ZioRuntime$.unsafeRun(ZioCommons.scala:442)
        at com.normation.ldap.listener.InMemoryDsConnectionProvider.semaphore(InMemoryDsConnectionProvider.scala:57)
        at com.normation.ldap.sdk.OneConnectionProvider.getInternalConnection(LDAPConnectionProvider.scala:204)
        at com.normation.ldap.sdk.OneConnectionProvider.getInternalConnection$(LDAPConnectionProvider.scala:203)
        at com.normation.ldap.listener.InMemoryDsConnectionProvider.getInternalConnection(InMemoryDsConnectionProvider.scala:37)
        at com.normation.ldap.sdk.LDAPConnectionProvider.$anonfun$withCon$1(LDAPConnectionProvider.scala:117)
        at zio.ZIO$ReleaseExit.$anonfun$apply$21(ZIO.scala:5555)
        at zio.ZIO$.$anonfun$interruptionMasked$1(ZIO.scala:3940)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1067)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1097)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.runLoop(FiberRuntime.scala:1162)
        at zio.internal.FiberRuntime.evaluateEffect(FiberRuntime.scala:413)
        at zio.internal.FiberRuntime.evaluateMessageWhileSuspended(FiberRuntime.scala:489)
        at zio.internal.FiberRuntime.drainQueueOnCurrentThread(FiberRuntime.scala:250)
        at zio.internal.FiberRuntime.run(FiberRuntime.scala:138)
        at zio.internal.ZScheduler$$anon$3.run(ZScheduler.scala:380)
[36.911s][warning][os,thread] Failed to start thread "Unknown thread" - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
[36.911s][warning][os,thread] Failed to start the native thread for java.lang.Thread "Thread-154"
[thread 23986 also had an error]
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f42c7600000, 65536, 1) failed; error='Not enough space' (errno=12)

@clarktsiory clarktsiory requested a review from fanf November 4, 2024 10:29
@clarktsiory clarktsiory marked this pull request as draft November 4, 2024 10:29
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.

1 participant