lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160205135118.GD28242@kernel.org>
Date:	Fri, 5 Feb 2016 10:51:18 -0300
From:	Arnaldo Carvalho de Melo <acme@...nel.org>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...nel.org>,
	Andi Kleen <andi@...stfloor.org>, Jiri Olsa <jolsa@...hat.com>,
	Namhyung Kim <namhyung@...nel.org>,
	Rose Belcher <cel@...ibm.com>,
	Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
	Sonny Rao <sonnyrao@...omium.org>,
	John Mccutchan <johnmccutchan@...gle.com>,
	David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Pawel Moll <pawel.moll@....com>
Subject: Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support

Em Fri, Feb 05, 2016 at 10:47:31AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Thu, Feb 04, 2016 at 03:02:59PM -0800, Stephane Eranian escreveu:
> > > I'm keeping what I have a perf/jit branch in my git tree.
> 
> What am I doing wrong? Continuing to investigate...
> #7  0x00007fef53f31b3a in strlen () from /lib64/libc.so.6
> #8  0x00007fef51e8e4c1 in compiled_method_load_cb (jvmti=0x7fef4c003ef0, method=<optimized out>, code_size=520, code_addr=0x7fef3d0ffd00, map_length=<optimized out>, 
>     map=0x0, compile_info=0x7fef04019e80) at libjvmti.c:85


Ok, this bandaid cured the segfault:


-------------------------------------------------------------
diff --git a/tools/perf/jvmti/libjvmti.c b/tools/perf/jvmti/libjvmti.c
index 745f20c7b4bd..92ffbe4ff160 100644
--- a/tools/perf/jvmti/libjvmti.c
+++ b/tools/perf/jvmti/libjvmti.c
@@ -82,7 +82,7 @@ compiled_method_load_cb(jvmtiEnv *jvmti,
 		 * append file name, we use loops and not string ops to avoid modifying
 		 * class_sign which is used later for the symbol name
 		 */
-		for (j = 0; i < (PATH_MAX - 1) && j < strlen(file_name); j++, i++)
+		for (j = 0; i < (PATH_MAX - 1) && file_name && j < strlen(file_name); j++, i++)
 			fn[i] = file_name[j];
 		fn[i] = '\0';
 	} else {
-------------------------------------------------------------

Now:

[acme@...et java]$ java -agentpath:/home/acme/git/linux/tools/perf/jvmti/libjvmti.so hello.java 
java: jvmti: jitdump in /home/acme/.debug/jit/java-jit-20160205.XXdDr2Wr/jit-28322.dump
Error: Could not find or load main class hello.java
[acme@...et java]$

Do I need to set CLASSPATH or something? /me tries...



> #9  0x00007fef536982b1 in JvmtiExport::post_compiled_method_load (nm=nm@...ry=0x7fef3d0ffb90)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/share/vm/prims/jvmtiExport.cpp:1793
> #10 0x00007fef536a68d4 in JvmtiDeferredEvent::post (this=<optimized out>)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/share/vm/prims/jvmtiImpl.cpp:957
> #11 0x00007fef538c54a8 in ServiceThread::service_thread_entry (jt=0x7fef4c0d0000, __the_thread__=0x7fef4c0d0000)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/share/vm/runtime/serviceThread.cpp:120
> #12 0x00007fef53976343 in JavaThread::thread_main_inner (this=this@...ry=0x7fef4c0d0000)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/share/vm/runtime/thread.cpp:1699
> #13 0x00007fef53976814 in JavaThread::run (this=0x7fef4c0d0000)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/share/vm/runtime/thread.cpp:1679
> #14 0x00007fef5381ffc2 in java_start (thread=0x7fef4c0d0000)
>     at /usr/src/debug/java-1.8.0-openjdk-1.8.0.71-1.b15.fc23.x86_64/openjdk/hotspot/src/os/linux/vm/os_linux.cpp:782
> #15 0x00007fef5489860a in start_thread () from /lib64/libpthread.so.0
> #16 0x00007fef53fa9a4d in clone () from /lib64/libc.so.6
> (gdb)
> 
> 
> And it generates this file:
> 
> /home/acme/.debug/jit/java-jit-20160205.XXIKKHRA/jit-27730.dump
> 
> Continuing...
> 
> - Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ