Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jvmti agent fatal error on linux: C [libc.so.6+0x7ae68] strcpy+0x18

I have written a jvmti agent to trace method invocations. I code it with C and jvmti and jni functions. Our os is Fedora 15 and the agent is compiled into a .so file. When I test it with a non-trivial java program, it crashes and gives the following error message:

A fatal error has been detected by the Java Runtime Environment:
  SIGSEGV (0xb) at pc=0x4e8e4e28, pid=24294, tid=3065949040.
  JRE version: 6.0_32-b05.
  Java VM: Java HotSpot (TM) Server VM (20.7-b02 mixed mode linux-x86).
  **Problematic frame:
    C [libc.so.6+0x7ae68] strcpy+0x18.**
like image 889
dzy Avatar asked Nov 12 '22 23:11

dzy


1 Answers

IGSEGV is an abbreviation for Signal Segmentation Violation. On POSIX-compliant platforms, SIGSEGV is the signal sent to a process when it makes an invalid memory reference, or segmentation fault.

You have to check the pointers in your JVMTI agent. In all probability you make some unclean pointer operations.

like image 53
Konrad Reiche Avatar answered Feb 24 '23 13:02

Konrad Reiche