Skip to content

Improve diagnostics/troubleshooting features for agent installation #1602

@sbailliez

Description

@sbailliez

It might be useful to have some better diagnostic features to help troubleshoot the agent misbehaving during the attachment process.

  • Document the property net.bytebuddy.agent.attacher.dump and if the agent fails, provide some recommendations to use it if it is not enabled already.
  • Log the command line created by ByteBuddyAgent to attach to the vm in the log dump file. Right now it is opaque and you have to debug to know what process command line gets executed
  • Provide the ability to pass extra jvm arguments to the command line to help debugging/troubleshooting (probably some security elements to consider here)
  • Capture the output of the process and report in the dump file in case of failure

Additional idea to consider, when debugging an agent issue with mockito, I found that the openjdk jvm checks that the .attach_pid<pid> file created has the same uid that the current user and does not attach if they are different, it would be nice to provide a check to help guide the user when such case is detected and make this part of bytebuddy. See mockito/mockito#2436 (comment) for more details.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions