Repository navigation
Description
Search before asking
- I searched in the issues and found nothing similar.
Example failure
Exception stacktrace
Error: org.apache.maven.surefire.booter.SurefireBooterForkException: ExecutionException The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Error: Command was /bin/sh -c cd /home/runner/work/pulsar/pulsar/pulsar-broker && /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp -XX:+ExitOnOutOfMemoryError -Xmx1G -XX:+UseZGC -Dpulsar.allocator.pooled=true -Dpulsar.allocator.leak_detection=Advanced -Dpulsar.allocator.exit_on_oom=false -Dpulsar.allocator.out_of_memory_policy=FallbackToHeap -Dio.netty.tryReflectionSetAccessible=true --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/sun.net=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED -jar /home/runner/work/pulsar/pulsar/pulsar-broker/target/surefire/surefirebooter6285857233189930100.jar /home/runner/work/pulsar/pulsar/pulsar-broker/target/surefire 2022-09-19T05-08-13_830-jvmRun2 surefire8224364011378699953tmp surefire_110551185120820105364tmp
Error: Error occurred in starting fork, check output in log
Error: Process Exit Code: 3
Error: at org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone
heap dump uploaded to https://transfer.sh/whRQiJ/Unit-BROKER_GROUP_3-heapdump.zip
thread dump extracted from heap dump https://gist.github.com/lhotari/6f056f053ca9a617692d24cde86bbd87
about 280 MB memory kept in mocks which are hanging on loadbalancer threads:

Are you willing to submit a PR?
- I'm willing to submit a PR!
Activity
lhotari commentedon Sep 19, 2022
I checked this and found a bug pattern in the tests. There are quite a few locations where the test code calls "setup" or "internalSetup" without first cleaning up previous state and cleaning up resources. I started changes in this branch, but there's a problem to be solved so that the ServiceConfiguration could be modified in a test. It would be good to have that explicitly handled in the test framework.
lhotari commentedon Sep 27, 2022
This appears to be a separate issue than #17655 .
The reason why this happens is simply that Mockito tracks each invocation of mocks / spies. I'll push a fix soon.
lhotari commentedon Sep 27, 2022
Most recent example is https://github.com/apache/pulsar/actions/runs/3132961869/jobs/5086038214#step:10:1338 . Heapdump https://github.com/apache/pulsar/suites/8484248497/artifacts/377355494
lhotari commentedon Sep 27, 2022
Analysis of stored invocations: https://gist.github.com/lhotari/520428ca36779217a633b32f105db073
with https://github.com/vlsi/mat-calcite-plugin query