plasma-umass / coz

Coz: Causal Profiling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenJDK8u: Segmentation fault at (nil)

ratacolita opened this issue · comments

I'm trying to profile the java executable from a build of openjdk I made with debug symbols enabled.

I'm using Ubuntu 18.04 LTS as the build platform.

Here is the file command output of the executable:

java: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 3.2.0, BuildID[sha1]=2a16a2aafe3be5bcd655c08754cdbbaff8cb10ef, with debug_info, not stripped

The ldd output of the executable:

linux-vdso.so.1 (0x00007fff0938d000)
libjli.so => /home/raulcaj/jdk8u/build/linux-x86_64-normal-server-slowdebug/jdk/bin/./../lib/amd64/jli/libjli.so (0x00007fe2a5f73000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe2a5b82000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe2a597e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe2a575f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe2a6390000)

And here is the output message I'm getting:

[libcoz.cpp:100] bootstrapping coz
[libcoz.cpp:128] Including MAIN, which is /home/raulcaj/jdk8u/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java
[inspect.cpp:509] Included source file /home/raulcaj/jdk8u/jdk/src/share/bin/main.c
[inspect.cpp:316] Including lines from executable /home/raulcaj/jdk8u/build/linux-x86_64-normal-server-slowdebug/jdk/bin/java
[profiler.cpp:75] Starting profiler thread
Segmentation fault at (nil)
0: /home/raulcaj/coz/source/coz/libcoz/libcoz.so(_ZN8profiler8on_errorEiP9siginfo_tPv+0x68) [0x7fc5bddb9018]
1: /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fc5bd7caf20]
2: [0x7fc59d0002b4]

I was unable to use gdb for debug this problem. I hope you guys could help me out.

Update: I just discovered that Hotspot VM uses SEGV to handle its internal behaviour regarding safepoints and other things.
Would coz have a workaround for this kind of situation?

I'm closing this issue.

Digging deeper into coz source code I realised it was removing the jvm signal handler.