Unable to attach on macOS w/ 2022.3-b96

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

Unable to attach on macOS w/ 2022.3-b96

Post by dthomas »

After upgrading to 2022.3-b96 on my MacBook Pro Max, the Monitor Applications view has a "Cannot detect loaded agents: shared memory inaccessible" error and clicking any application causes the attach dialog to wait indefinitely.
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Vladimir Kondratyev »

- From which profiler version did you upgrade?

- What is exact macOS version?

- Does macOS restart help?
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Anton Katilin »

Please try the workaround described in https://www.yourkit.com/docs/kb/shmem.jsp
dthomas
Posts: 13
Joined: Mon Jun 09, 2014 4:47 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by dthomas »

- YourKit 2021.11-b227 - it continues to work fine
- macOS Monterey 12.3 (21E230)
- Yes, surprisingly, a restart fixed it. Even though I could run the older version just fine, attach, etc.

The workaround doesn't appear to apply, there's plenty of shared memory available.
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Anton Katilin »

- Yes, surprisingly, a restart fixed it.
Have the problem ever happened again after the restart?
kryptek
Posts: 3
Joined: Mon Jul 12, 2021 8:46 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by kryptek »

I'm also having an issue attaching to the yourkit process via my m1 max. The apple support document you've linked in the knowledge base no longer exists. How can I fix this issue? Rebooting did not help in my case.

Code: Select all

└[~]> sudo sysctl -a |grep shm
kern.sysv.shmall: 1024
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 32
kern.sysv.shmseg: 8
security.mac.posixshm_enforce: 1
security.mac.sysvshm_enforce: 1
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Vladimir Kondratyev »

Initial post was about "shared memory inaccessible" error. Do you see exactly this error? Or doesn't "attach" work for you?
kryptek
Posts: 3
Joined: Mon Jul 12, 2021 8:46 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by kryptek »

Vladimir Kondratyev wrote: Wed Apr 13, 2022 6:54 am Initial post was about "shared memory inaccessible" error. Do you see exactly this error? Or doesn't "attach" work for you?

I'm getting the same exact error visible in the UI. My running application still appears right under that text. When I click on it, it just hangs trying to attach..
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Anton Katilin »

Could you please send the profiler UI log file ~/.yjp/log/profiler-ui-<pid>.log to [email protected]

If the profiler agent log file ~/.yjp/log/<session name>-<pid>.log is created for the process you try to attach, please send it too.

If you attach to a process which does not have the agent loaded on start, please try starting it with the agent as a workaround.
Vladimir Kondratyev
Posts: 1619
Joined: Tue Aug 10, 2004 7:52 pm

Re: Unable to attach on macOS w/ 2022.3-b96

Post by Vladimir Kondratyev »

We have just released v2022.3-b100 which should fix this issue https://www.yourkit.com/java/profiler/download/
Please give it a try.

Best regards,
Vladimir Kondratyev
YourKit GmbH
http://www.yourkit.com
"Don't get lost in data, get information!"
Locked