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

JVM does not exit immediately after main method exits when akka-actor instrumentation is enabled #13066

Closed
NomadBlacky opened this issue Jan 19, 2025 · 1 comment · Fixed by #13073
Labels
bug Something isn't working needs triage New issue that requires triage

Comments

@NomadBlacky
Copy link

NomadBlacky commented Jan 19, 2025

Describe the bug

When using OpenTelemetry Java agent v2.9.0 or later with Akka, it takes a long time from the end of the main method to the end of the JVM.

Steps to reproduce

Expected behavior

The JVM exits immediately after the main method finishes.

Actual behavior

The JVM does not exit immediately after the main method exits.

Javaagent or library instrumentation version

javaagent v2.9.0 or later

Environment

JDK: temurin:21
OS:

ProductName:            macOS
ProductVersion:         14.6.1
BuildVersion:           23G93

Additional context

No response

@NomadBlacky NomadBlacky added bug Something isn't working needs triage New issue that requires triage labels Jan 19, 2025
@NomadBlacky
Copy link
Author

I took a thread dump and found that a non-daemon thread, system-akka.actor.internal-dispatcher-N remained.

This is supposed to terminate when ActorSystem#terminate is called, but for some reason it continues to exist.
In v2.9.0 an implementation of context propagation was added for the Akka Scheduler (#12373), but I wasn't sure if this was the cause.
I haven't tried it yet, but Pekko may have similar issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New issue that requires triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant