From owner-freebsd-java@freebsd.org Thu May 19 13:40:18 2016 Return-Path: Delivered-To: freebsd-java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3D191B415AF for ; Thu, 19 May 2016 13:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 2813D196F for ; Thu, 19 May 2016 13:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 276D8B415AC; Thu, 19 May 2016 13:40:18 +0000 (UTC) Delivered-To: java@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 27166B415AB for ; Thu, 19 May 2016 13:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17BA9196E for ; Thu, 19 May 2016 13:40:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u4JDeHQU099439 for ; Thu, 19 May 2016 13:40:17 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 209599] SIGSEGV in regression test suite on java/openjdk8 Date: Thu, 19 May 2016 13:40:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: iamasmith.home@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: java@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 May 2016 13:40:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209599 --- Comment #7 from Andrew Smith --- turning off PCH makes no difference, the fault still occurs. Interestingly with slow debug only the MappedByteBuffer.Truncate test throws the exception. Looking at the disassembly of the region of code... 0x0000000802a01f8b : callq 0x801f04550 <_ZN10JavaThread7currentEv> 0x0000000802a01f90 : mov $0x1,%esi 0x0000000802a01f95 : mov %rax,-0x60(%rbp) 0x0000000802a01f99 : mov -0x60(%rbp),%rdi 0x0000000802a01f9d : callq 0x802a09fe0 <_ZN10JavaThread23set_doing_unsafe_accessEb> 0x0000000802a01fa2 : mov $0x0,%esi 0x0000000802a01fa7 : mov -0x58(%rbp),%rax 0x0000000802a01fab : mov (%rax),%cl = # SIGSEGV is HERE 0x0000000802a01fad : mov %cl,-0x61(%rbp) 0x0000000802a01fb0 : mov -0x60(%rbp),%rdi 0x0000000802a01fb4 : callq 0x802a09fe0 <_ZN10JavaThread23set_doing_unsafe_accessEb> 0x0000000802a01fb9 : lea -0x48(%rbp),%rdi 0x0000000802a01fbd : mov -0x61(%rbp),%cl This pretty much maps to here in unsafe.cpp #define DEFINE_GETSETNATIVE(java_type, Type, native_type) \ \ UNSAFE_ENTRY(java_type, Unsafe_GetNative##Type(JNIEnv *env, jobject unsafe, jlong addr)) \ UnsafeWrapper("Unsafe_GetNative"#Type); \ void* p =3D addr_from_java(addr); \ JavaThread* t =3D JavaThread::current(); \ t->set_doing_unsafe_access(true); \ java_type x =3D *(volatile native_type*)p; \ # So, here in our macro t->set_doing_unsafe_access(false); \ return x; \ UNSAFE_END \ \ UNSAFE_ENTRY(void, Unsafe_SetNative##Type(JNIEnv *env, jobject unsafe, jlong addr, java_type x)) \ UnsafeWrapper("Unsafe_SetNative"#Type); \ JavaThread* t =3D JavaThread::current(); \ t->set_doing_unsafe_access(true); \ void* p =3D addr_from_java(addr); \ *(volatile native_type*)p =3D x; \ t->set_doing_unsafe_access(false); \ UNSAFE_END \ \ // END DEFINE_GETSETNATIVE. DEFINE_GETSETNATIVE(jbyte, Byte, signed char) DEFINE_GETSETNATIVE(jshort, Short, signed short); DEFINE_GETSETNATIVE(jchar, Char, unsigned short); DEFINE_GETSETNATIVE(jint, Int, jint); // no long -- handled specially DEFINE_GETSETNATIVE(jfloat, Float, float); DEFINE_GETSETNATIVE(jdouble, Double, double); As far as I can see this looks OK and I suspect this is more about the call= er than this particular function. Unfortunately from frame 11 onwards we look to be in the murky region of hotspot compiled code and gdb is isn't really much help following that piec= e. --=20 You are receiving this mail because: You are the assignee for the bug.=