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

[BTRACE-47] OnTimer annotation prevents traced application from exiting #34

Closed
jbachorik opened this issue Aug 28, 2014 · 1 comment
Closed

Comments

@jbachorik
Copy link
Collaborator

[reporter="klynch", created="Thu, 12 Aug 2010 08:28:24 +0200", resolved="Thu, 12 Aug 2010 14:14:37 +0200"]

The @ontimer annotation creates a non-daemon Timer object that continues to run even after the traced application exits. When experimenting with the provided ThreadCounter btrace script, the Timer thread continues to run. When the @ontimer annotation is commented out, the traced application halts.

{{java -javaagent:$

{BTRACE_HOME}

/build/btrace-agent.jar=stdout=true,noServer=true,script=ThreadCounter.class ThreadTest}}

By configuring the Timer object to use daemon threads, the traced application correctly exits.

@jbachorik jbachorik added this to the release-1.2 milestone Aug 28, 2014
@jbachorik
Copy link
Collaborator Author

[author="jbachorik", created="Thu, 12 Aug 2010 14:14:37 +0200"]

Patch applied. Thanks a lot!

http://kenai.com/projects/btrace/sources/hg/revision/363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant