Fail to debug openjdk7 with gdb

John Cuthbertson john.cuthbertson at oracle.com
Thu Nov 3 16:47:28 UTC 2011


Hi Lokesh,

The Hotspot JVM uses certain signals for it's own use and SIGSEGV is one 
such signal. The code below is generating the signal to act as a pseudo 
memory barrier. SIGSEGV can also generated by JIT generated code as a 
null check. To continue debugging use the gdb command:

 > handle SIGSEGV nostop noprint

I think the other signals the JVM can legitimately generate are SIGBUS 
and SIGFPE.

Hope this helps.

JohnC

On 11/03/11 08:56, Lokesh Gidra wrote:
> Hi,
>
> I am trying to debug openjdk7 using gdb, and everytime it fails with 
> the following trace:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x7fffe1df7700 (LWP 14211)]
> 0x00007ffff634bf60 in os::write_memory_serialize_page 
> (thread=0x7fffe81d9800)
>     at 
> /home/lokesh/code/phd_openjdk7/hotspot/src/share/vm/runtime/os.hpp:319
> 319        *(volatile int32_t 
> *)((uintptr_t)_mem_serialize_page+page_offset) = 1;
> (gdb)
>
> Running the same build without gdb works fine. Also, there are no 
> changes made by me. The code is freshly downloaded from the website. 
> Can someone please point out what could be going wrong.
>
>
> Thanks in advance,
>
> Best Regards,
> Lokesh

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20111103/98d689f4/attachment.htm>


More information about the hotspot-gc-dev mailing list