Attach mode no longer working

Questions about YourKit Java Profiler
Locked
dthomas
Posts: 13
Joined: Mon Jun 09, 2014 4:47 pm

Attach mode no longer working

Post by dthomas »

Either in the last couple of YourKit updates or updates to Zulu attaching to a process without the agent already running has stopped working:

This process has been started without the profiler agent, and the attempt to attach the agent to the process has failed:

Cannot attach the profiler agent to the JVM as to a 32-bit process: Attached failed (code 1)
Cannot attach the profiler agent to the JVM as a 64-bit process: Attached failed: Java native atached library failed to load

Running YourKit 2020.9-b405 and openjdk:

openjdk version "1.8.0_265"
OpenJDK Runtime Environment (Zulu 8.48.0.53-CA-macosx) (build 1.8.0_265-b11)
OpenJDK 64-Bit Server VM (Zulu 8.48.0.53-CA-macosx) (build 25.265-b11, mixed mode)
dthomas
Posts: 13
Joined: Mon Jun 09, 2014 4:47 pm

Re: Attach mode no longer working

Post by dthomas »

Same application on:

OpenJDK Runtime Environment Zulu11.41+23-CA (build 11.0.8+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.41+23-CA (build 11.0.8+10-LTS, mixed mode)

Works just fine.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Attach mode no longer working

Post by Anton Katilin »

Hi,

We'll check this.

Is the problem on macOS only, or did you check other platforms too?

Do I understand it right that the problem is with Java 8 only?

What was the previous working combination of YJP and Java?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Attach mode no longer working

Post by Anton Katilin »

Update:

We have reproduced the problem, it is macOS specific. We're investigating.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Attach mode no longer working

Post by Anton Katilin »

Could you please try to rename or delete the file YourKit-Java-Profiler-2020.9.app/Contents/Resources/bin/mac/libattach.dylib. Does this help?
dthomas
Posts: 13
Joined: Mon Jun 09, 2014 4:47 pm

Re: Attach mode no longer working

Post by dthomas »

No, same after moving libattach.dylib.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Attach mode no longer working

Post by Anton Katilin »

Could you please try this build which should solve the problem:
https://www.yourkit.com/download/YourKi ... 9-b408.dmg
dthomas
Posts: 13
Joined: Mon Jun 09, 2014 4:47 pm

Re: Attach mode no longer working

Post by dthomas »

It does! Appreciate the quick turnaround.
Locked