Re: jstack can't attach to JVM (OS X)

2013-08-27 Thread Mikael Gerdin
On 2013-08-27 10:26, Staffan Larsen wrote: On 26 aug 2013, at 20:19, Martin Traverso mtrave...@gmail.com mailto:mtrave...@gmail.com wrote: Great! Thanks for the explanation. Just curious, why does running jstack at least once before the code reaches that method call prevent the problem

Re: jstack can't attach to JVM (OS X)

2013-08-27 Thread Staffan Larsen
Yes, that's it. If one SIGQUIT has been processed, the JVM has already created the necessary handshake file and the attach will proceed regardless of the SIGQUIT reaching the JVM or not. Thanks! /Staffan On 27 aug 2013, at 10:43, Mikael Gerdin mikael.ger...@oracle.com wrote: On

Re: jstack can't attach to JVM (OS X)

2013-08-26 Thread Martin Traverso
Great! Thanks for the explanation. Just curious, why does running jstack at least once before the code reaches that method call prevent the problem from happening at all? Martin On Mon, Aug 26, 2013 at 5:31 AM, Staffan Larsen staffan.lar...@oracle.comwrote: Here is what's happening: - The

Re: jstack can't attach to JVM (OS X)

2013-08-26 Thread David Holmes
On 26/08/2013 10:31 PM, Staffan Larsen wrote: Here is what's happening: - The VM sets the signal mask for all threads (except the internal VMThread) to mask out SIGQUIT using pthread_sigmask(). So the process will still respond to SIGQUIT, but only one thread. - The verifier code calls setjmp()

jstack can't attach to JVM (OS X)

2013-08-22 Thread Martin Traverso
I have a program that causes jstack and jcmd to fail to attach to the JVM on OS X. Unfortunately, it uses a third-party library, so I'm not sure what's the magic incantation that causes this to happen. I wrote a small test case using this library that reproduces the problem. You can find the code