回复: Use rr for JVM process

shang xinli shangxinli at hotmail.com
Thu Apr 25 18:59:40 UTC 2019


Thanks Robert! I ran 'rr replay -p' but it still cannot hit the breakpoint. I tried hbreak too but still not. Basically, I just cannot hit breakpoint for any JVM code, although I can do it for other code like frame 25 and 24 below.



(gdb) where

#0  0x0000000070000002 in  ()

#1  0x00007efea94ba5ba in _raw_syscall () at /home/roc/rr/rr/src/preload/raw_syscall.S:120

#2  0x00007efea94b6cd5 in traced_raw_syscall (call=call at entry=0x7ecba372bfa0) at /home/roc/rr/rr/src/preload/syscallbuf.c:222

#3  0x00007efea94b9389 in syscall_hook (call=0x7ecba372bfa0) at /home/roc/rr/rr/src/preload/syscallbuf.c:2653

#4  0x00007efea94b9389 in syscall_hook (call=0x7ecba372bfa0) at /home/roc/rr/rr/src/preload/syscallbuf.c:2687

#5  0x00007efea94b6b3a in _syscall_hook_trampoline () at /home/roc/rr/rr/src/preload/syscall_hook.S:282

#6  0x00007efea94b6b6a in __morestack () at /home/roc/rr/rr/src/preload/syscall_hook.S:417

#7  0x00007efea94b6b88 in _syscall_hook_trampoline_48_3d_00_f0_ff_ff () at /home/roc/rr/rr/src/preload/syscall_hook.S:428

#8  0x00007efea88f506d in __GI_raise (sig=sig at entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56

#9  0x00007efea88f6448 in __GI_abort () at abort.c:89

#10 0x00007efea8208ba9 in os::abort(bool) (dump_core=<optimized out>) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/os/linux/vm/os_linux.cpp:1509

#11 0x00007efea83bfff4 in VMError::report_and_die() (this=this at entry=0x7ecba382add0) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/utilities/vmError.cpp:1060

#12 0x00007efea82127f7 in JVM_handle_linux_signal(int, siginfo_t*, void*, int) (sig=11, info=0x7ecba382b070, ucVoid=0x7ecba382af40, abort_if_unrecognized=<optimized out>)

    at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp:541

#13 0x00007efea8205f58 in signalHandler(int, siginfo_t*, void*) (sig=11, info=0x7ecba382b070, uc=0x7ecba382af40) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/os/linux/vm/os_linux.cpp:4432

#14 0x00007efea92a8890 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0

#15 0x00007efea8229779 in ParNewGeneration::collect(bool, bool, unsigned long, bool) (this=0x7efea00246e0, full=<optimized out>, clear_all_soft_refs=<optimized out>, size=<optimized out>, is_tlab=<optimized out>)

    at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp:930

#16 0x00007efea7f04b10 in GenCollectedHeap::do_collection(bool, bool, unsigned long, bool, int) (this=this at entry=0x7efea0021870, full=full at entry=false, clear_all_soft_refs=clear_all_soft_refs at entry=false, size=size at entry=7, is_tlab=is_tlab at entry=false, max_level=1) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/memory/genCollectedHeap.cpp:501

#17 0x00007efea7d96900 in GenCollectorPolicy::satisfy_failed_allocation(unsigned long, bool) (this=0x7efea0021770, size=7, is_tlab=<optimized out>) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/memory/collectorPolicy.cpp:807

#18 0x00007efea83c0bf1 in VM_GenCollectForAllocation::doit() (this=0x7ecb931fc690) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp:196

#19 0x00007efea83c6527 in VM_Operation::evaluate() (this=this at entry=0x7ecb931fc690) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/runtime/vm_operations.cpp:62

#20 0x00007efea83c4777 in VMThread::evaluate_operation(VM_Operation*) (this=this at entry=0x7efea0085000, op=0x7ecb931fc690) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/runtime/vmThread.cpp:377

#21 0x00007efea83c4fa7 in VMThread::loop() (this=this at entry=0x7efea0085000) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/runtime/vmThread.cpp:502

#22 0x00007efea83c54f1 in VMThread::run() (this=0x7efea0085000) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/share/vm/runtime/vmThread.cpp:276

#23 0x00007efea8207b62 in java_start(Thread*) (thread=0x7efea0085000) at /srv/jdk/openjdk-8-8u171-b11/src/hotspot/src/os/linux/vm/os_linux.cpp:790

#24 0x00007efea92a1064 in start_thread (arg=0x7ecba382c700) at pthread_create.c:309

#25 0x00007efea89a862d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111




________________________________
发件人: Robert O'Callahan <robert at ocallahan.org>
发送时间: 2019年4月24日 13:29
收件人: shang xinli
抄送: Kyle Huey; rr-dev at mozilla.org
主题: Re: Use rr for JVM process

On Thu, Apr 25, 2019 at 8:27 AM shang xinli <shangxinli at hotmail.com<mailto:shangxinli at hotmail.com>> wrote:
I am able to use 'rr' for a JVM application to record the JVM crash issue. However, when I set breakpoint and try to hit that breakpoint for replay, the breakpoint just was not hit. The application just finish with that exception. Can anybody help on how do I hit the breakpoint I set?  Here are what I did.

Does your workload contain multiple processes and if so, are you debugging the right process? Run `rr ps` and then if necessare `rr replay -p <pid>`.

If you're setting a breakpoint in JIT code you may need to use hardware breakpoints. Use `hbreak *<addr>` in gdb.

Rob
--
Su ot deraeppa sah dna Rehtaf eht htiw saw hcihw, efil lanrete eht uoy ot mialcorp ew dna, ti ot yfitset dna ti nees evah ew; deraeppa efil eht. Efil fo Drow eht gninrecnoc mialcorp ew siht - dehcuot evah sdnah ruo dna ta dekool evah ew hcihw, seye ruo htiw nees evah ew hcihw, draeh evah ew hcihw, gninnigeb eht morf saw hcihw taht.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/rr-dev/attachments/20190425/c6783bd5/attachment.html>


More information about the rr-dev mailing list