From owner-freebsd-java@FreeBSD.ORG Mon Dec 13 09:00:57 2010 Return-Path: Delivered-To: freebsd-java@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3552B1065674 for ; Mon, 13 Dec 2010 09:00:57 +0000 (UTC) (envelope-from glewis@eyesbeyond.com) Received: from misty.eyesbeyond.com (gerbercreations.com [71.39.140.16]) by mx1.freebsd.org (Postfix) with ESMTP id D185F8FC13 for ; Mon, 13 Dec 2010 09:00:56 +0000 (UTC) Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.14.4/8.14.4) with ESMTP id oBD90tjA042243; Mon, 13 Dec 2010 01:00:55 -0800 (PST) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.14.4/8.14.4/Submit) id oBD90sig042242; Mon, 13 Dec 2010 01:00:54 -0800 (PST) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Mon, 13 Dec 2010 01:00:54 -0800 From: Greg Lewis To: Nikolay Denev Message-ID: <20101213090054.GA2504@misty.eyesbeyond.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-java@FreeBSD.org, Iris Booker , Ronald Klop Subject: Re: OpenJDK Build Issue -- SIGSEGV at OperatingSystemMXBean getTotalPhysicalMemorySize X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Dec 2010 09:00:57 -0000 On Mon, Dec 13, 2010 at 09:44:31AM +0200, Nikolay Denev wrote: > Looks suspiciously similar to http://www.freebsd.org/cgi/query-pr.cgi?pr=java/128411 which was fixed some time ago, but probably sneaked into OpenJDK? You're right. I've committed that fix to openjdk6 as well. Iris, please give it another go. > On 12 Dec, 2010, at 18:42 , Ronald Klop wrote: > > > Hi, > > > > I don't have any information at hand right now, but want to add a 'me too' in problems with JConsole on OpenJDK6. I had crashes while attaching to local applications also. > > > > Ronald. > > > > On Fri, 10 Dec 2010 20:29:42 +0100, Iris Booker wrote: > > > >> Note: This is a forward of a message originally sent the message to > >> java@freebsd.org in November. > >> > >> > >> > >> > >> I?m looking for some guidance on configuring OpenJDK correctly for our > >> platform. > >> > >> We recently noticed a problem where connecting to a java application > >> (running using OpenJDK 6-b20_4) on a remote machine (running FreeBSD 7.2) > >> using JConsole kills the remote application. The remote JVM crashes due to > >> a segmentation fault almost immediately after a JConsole instance connects > >> to it. > >> > >> I traced the problem to the getTotalPhysicalMemorySize() function in the > >> OperatingSystemMXBean. I can reproduce the segmentation fault using the > >> unit test for this method that comes with OpenJDK ( > >> jdk6/jdk/.../test/com/sun/management/OperatingSystemMXBean/GetTotalPhysicalMemorySize.java). > >> > >> This problem seems limited to OpenJDK. The same unit test, compiled and > >> executed using an older Diablo build (1.6.0_07-b02), runs without error. > >> Direct calls to the sysctl method (see libc, sys/sysctl.h) are successful, > >> as are calls to the sysctl utility (e.g. sysctl hw.physmem). We were able to > >> reproduce this issue on different machines, using Jconsole executables from > >> OpenJDK & SUN JVM distros (v6). > >> > >> Does anyone have any suggestions as to build settings or any other > >> configuration items we should look at to resolve this problem? > >> > >> [Added 10-Dec-2010] Alternatively, if you have any additional > >> troubleshooting suggestions, ideas for work-arounds, or advice as to how we > >> can temporarily patch the JDK (or JConsole) to not make the call that > >> crashes the JVM, we would be grateful. Right now, our only way to avoid this > >> problem is to either not use JMX or not use OpenJDK 6. > >> > >> Regards, > >> I Booker > >> > >> BTW, I included the segmentation fault details generated by the > >> GetTotalPhysicalMemorySize unit test > >> > >> # > >> # A fatal error has been detected by the Java Runtime Environment: > >> # > >> # SIGSEGV (0xb) at pc=0x000000080205dd34, pid=75359, tid=34371281472 > >> # > >> # JRE version: 6.0-b20 > >> # Java VM: OpenJDK 64-Bit Server VM (17.0-b16 mixed mode bsd-amd64 ) > >> # Problematic frame: > >> # > >> [error occurred during error reporting (printing problematic frame), id 0xb] > >> > >> # If you would like to submit a bug report, please visit: > >> # http://java.sun.com/webapps/bugreport/crash.jsp > >> # > >> > >> --------------- T H R E A D --------------- > >> > >> Current thread (0x0000000801b2e000): JavaThread "main" [_thread_in_Java, > >> id=11543104, stack(0x00007fffffaff000,0x00007fffffbff000)] > >> > >> siginfo:si_signo=SIGSEGV: si_errno=0, si_code=1 (SEGV_MAPERR), > >> si_addr=0x00007fff00000018 > >> > >> Registers: > >> RAX=0x00000001ff4ad000, RBX=0x00000008052bfdb0, RCX=0x000000080094c30c, > >> RDX=0x0000000000000001 > >> RSP=0x00007fffffbfe910, RBP=0x00007fff00000000, RSI=0x0000000000000002, > >> RDI=0x00007fffffbfe900 > >> R8 =0x0000000000000001, R9 =0x00007fffffbfe8f8, R10=0x0000000000000000, > >> R11=0x000000080205af1b > >> R12=0x0000000801b2e000, R13=0x00000008052bfdb0, R14=0x00007fffffbfe9a0, > >> R15=0x0000000801b2e000 > >> RIP=0x000000080205dd34, EFL=0x0000000000000000, ERR=0x0000000000000004 > >> TRAPNO=0x000000000000000c > >> > >> Top of Stack: (sp=0x00007fffffbfe910) > >> 0x00007fffffbfe910: 00000001ff4ad000 000000080205db26 > >> 0x00007fffffbfe920: 0000000041400000 000000080205dc88 > >> 0x00007fffffbfe930: 0000000801b11880 0000000801b11898 > >> 0x00007fffffbfe940: 00007fffffbfe940 00000008052bfdb0 > >> 0x00007fffffbfe950: 00007fffffbfe9a0 00000008052c14b0 > >> 0x00007fffffbfe960: 0000000000000000 00000008052bfdb0 > >> 0x00007fffffbfe970: 0000000000000000 00007fffffbfe9a0 > >> 0x00007fffffbfe980: 00007fffffbfe9e8 0000000802052dc3 > >> 0x00007fffffbfe990: 0000000000000000 000000080205af17 > >> 0x00007fffffbfe9a0: 000000085b082ce0 00007fffffbfe9a8 > >> 0x00007fffffbfe9b0: 00000008052aac5a 00007fffffbfea18 > >> 0x00007fffffbfe9c0: 00000008052ab1b0 0000000000000000 > >> 0x00007fffffbfe9d0: 00000008052aacf0 00007fffffbfe9a0 > >> 0x00007fffffbfe9e0: 00007fffffbfea18 00007fffffbfea80 > >> 0x00007fffffbfe9f0: 000000080204d3eb 0000000000000000 > >> 0x00007fffffbfea00: 0000000000000000 0000000008000000 > >> 0x00007fffffbfea10: 0000000000000000 000000085b0831d8 > >> 0x00007fffffbfea20: 0000000800001fa0 000000080204d369 > >> 0x00007fffffbfea30: 00007fffffbfebd0 0000000000000001 > >> 0x00007fffffbfea40: 0000000801b2e000 0000000801b11818 > >> 0x00007fffffbfea50: 00007fffffbfead0 00007fffffbfee08 > >> 0x00007fffffbfea60: 000000080000000a 00000008052aacf0 > >> 0x00007fffffbfea70: 000000080205c560 00007fffffbfebd8 > >> 0x00007fffffbfea80: 00007fffffbfeb70 0000000801014d88 > >> 0x00007fffffbfea90: 00007fff00000001 0000000801b2e000 > >> 0x00007fffffbfeaa0: 000000080205cf40 00007fffffbfead0 > >> 0x00007fffffbfeab0: 00007fffffbfeb10 00007fffffbfee08 > >> 0x00007fffffbfeac0: 000000080205c560 000000080000000a > >> 0x00007fffffbfead0: 0000000801b2e000 0000000801b3f110 > >> 0x00007fffffbfeae0: 00000008052aacf0 0000000000000000 > >> 0x00007fffffbfeaf0: 0000000000000000 0000000000000000 > >> 0x00007fffffbfeb00: 0000000000000000 00007fffffbfee00 > >> > >> Instructions: (pc=0x000000080205dd34) > >> 0x000000080205dd24: 00 00 00 00 00 00 49 bb 1b af 05 02 08 00 00 00 > >> 0x000000080205dd34: 4c 3b 5d 18 0f 85 20 00 00 00 48 8b 04 24 48 83 > >> > >> Stack: [0x00007fffffaff000,0x00007fffffbff000], sp=0x00007fffffbfe910, > >> free space=3fe000000080094c0bck > >> Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native > >> code) > >> > >> [error occurred during error reporting (printing native stack), id 0xb] > >> > >> > >> --------------- P R O C E S S --------------- > >> > >> Java Threads: ( => current thread ) > >> 0x0000000884044000 JavaThread "Low Memory Detector" daemon > >> [_thread_blocked, id=28418928, stack(0x00007ffffeff4000,0x00007fffff0f4000)] > >> 0x0000000884041000 JavaThread "CompilerThread1" daemon [_thread_blocked, > >> id=28418528, stack(0x00007fffff0f5000,0x00007fffff1f5000)] > >> 0x000000088403f000 JavaThread "CompilerThread0" daemon [_thread_blocked, > >> id=28418128, stack(0x00007fffff1f6000,0x00007fffff2f6000)] > >> 0x000000088403e000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, > >> id=28417728, stack(0x00007fffff2f7000,0x00007fffff3f7000)] > >> 0x0000000884016000 JavaThread "Finalizer" daemon [_thread_blocked, > >> id=28417328, stack(0x00007fffff3f800 > >> 0,0x00007fffff4f8000)] > >> 0x0000000884015000 JavaThread "Reference Handler" daemon [_thread_blocked, > >> id=28416928, stack(0x00007fffff4f9000,0x00007fffff5f9000)] > >> =>0x0000000801b2e000 JavaThread "main" [_thread_in_Java, id=11543104, > >> stack(0x00007fffffaff000,0x00007fffffbff000)] > >> > >> Other Threads: > >> 0x0000000884011000 VMThread [stack: 0x00007fffff5fa000,0x00007fffff6fa000] > >> [id=28416528] > >> 0x000000088404d000 WatcherThread [stack: > >> 0x00007ffffeef3000,0x00007ffffeff3000] [id=28414528] > >> > >> VM state:not at safepoint (normal execution) > >> > >> VM Mutex/Monitor currently owned by a thread: None > >> > >> Heap > >> PSYoungGen total 36224K, used 622K [0x000000085b050000, > >> 0x000000085d8b0000, 0x0000000883650000) > >> eden space 31104K, 2% used > >> [0x000000085b050000,0x000000085b0eb868,0x000000085ceb0000) > >> from space 5120K, 0% used > >> [0x000000085d3b0000,0x000000085d3b0000,0x000000085d8b0000) > >> to space 5120K, 0% used > >> [0x000000085ceb0000,0x000000085ceb0000,0x000000085d3b0000) > >> PSOldGen total 82688K, used 0K [0x000000080a450000, > >> 0x000000080f510000, 0x000000085b050000) > >> object space 82688K, 0% used > >> [0x000000080a450000,0x000000080a450000,0x000000080f510000) > >> PSPermGen total 21248K, used 2501K [0x0000000805050000, > >> 0x0000000806510000, 0x000000080a450000) > >> object space 21248K, 11% used > >> [0x0000000805050000,0x00000008052c1560,0x0000000806510000) > >> > >> Dynamic libraries: > >> 0x0000000000400000 /usr/local/openjdk6/bin/java > >> 0x000000080063c000 /lib/libz.so.4 > >> 0x0000000800750000 /lib/libthr.so.3 > >> 0x0000000800868000 /lib/libc.so.7 > >> 0x0000000800c00000 /usr/local/openjdk6/jre/lib/amd64/server/libjvm.so > >> 0x0000000801613000 /usr/lib/libstdc++.so.6 > >> 0x000000080181f000 /lib/libm.so.5 > >> 0x0000000801939000 /lib/libgcc_s.so.1 > >> 0x0000000801c00000 /usr/local/openjdk6/jre/lib/amd64/libverify.so > >> 0x0000000801d0f000 /usr/local/openjdk6/jre/lib/amd64/libjava.so > >> 0x0000000801e3a000 > >> /usr/local/openjdk6/jre/lib/amd64/native_threads/libhpi.so > >> 0x0000000801f46000 /usr/local/openjdk6/jre/lib/amd64/libzip.so > >> 0x0000000884600000 /usr/local/openjdk6/jre/lib/amd64/libmanagement.so > >> 0x000000080050a000 /libexec/ld-elf.so.1 > >> > >> vM Arguments: > >> java_command: GetTotalPhysicalMemorySize > >> Launcher Type: SUN_STANDARD > >> > >> Environment Variables: > >> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/user/bin > >> LD_LIBRARY_PATH=/usr/local/openjdk6/jre/lib/amd64/server:/usr/local/openjdk6/jre/lib/amd64:/usr/local/openjdk6/jre/../lib/amd64 > >> SHELL=/usr/local/bin/bash > >> > >> Signal Handlers: > >> SIGSEGV: [libjvm.so+0x740970], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGBUS: [libjvm.so+0x740970], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGFPE: [libjvm.so+0x5f8fb0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGPIPE: [libjvm.so+0x5f8fb0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGXFSZ: [libjvm.so+0x5f8fb0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGILL: [libjvm.so+0x5f8fb0], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGUSR1: SIG_DFL, sa_mask[0]=0x63807efb, sa_flags=0x00000000 > >> SIGUSR2: [libjvm.so+0x5fbaa0], sa_mask[0]=0x00000000, sa_flags=0x00000042 > >> SIGHUP: [libjvm.so+0x5fa480], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGINT: [libjvm.so+0x5fa480], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGTERM: [libjvm.so+0x5fa480], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> SIGQUIT: [libjvm.so+0x5fa480], sa_mask[0]=0xfffefeff, sa_flags=0x00000042 > >> > >> > >> --------------- S Y S T E M --------------- > >> > >> > >> > >> OS:Bsd > >> uname:FreeBSD 7.2-RELEASE FreeBSD 7.2-RELEASE #0: Mon Oct 12 14:56:23 MST > >> 2009 user@host.domain.net:/usr/obj/usr/src/sys/SIXFOUR amd64 > >> rlimit: STACK 524288k, CORE infinity, NPROC 5547, NOFILE 32768 > >> CPU:total 4 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping > >> 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3 > >> > >> Memory: 4k page, physical 7935044k(1983761k free) > >> > >> vm_info: OpenJDK 64-Bit Server VM (17.0-b16) for bsd-amd64 JRE (1.6.0-b20), > >> built on Oct 14 2010 10:36:36 by "root" with gcc 4.2.1 20070719 [FreeBSD] > >> > >> time: Tue Nov 2 13:39:23 2010 > >> elapsed time: 0 seconds > >> _______________________________________________ > >> freebsd-java@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-java > >> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > _______________________________________________ > > freebsd-java@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-java > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org" -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org