Date: Mon, 13 Dec 2010 09:44:31 +0200 From: Nikolay Denev <ndenev@gmail.com> To: Ronald Klop <ronald-freebsd8@klop.yi.org> Cc: freebsd-java@freebsd.org Subject: Re: OpenJDK Build Issue -- SIGSEGV at OperatingSystemMXBean getTotalPhysicalMemorySize Message-ID: <EE2F544B-7162-4AF0-BC01-1CDC04900A67@gmail.com> In-Reply-To: <op.vnl0ocdx8527sy@pinky> References: <Act66hj37eieh0bH40aJPXTCp3YXqA==> <C8F5F421.2946%ibooker.llnw@gmail.com> <AANLkTi=Wsfxf0=YBDvGoCLjX4wAGBWkR4kHisq11r_0B@mail.gmail.com> <op.vnl0ocdx8527sy@pinky>
next in thread | previous in thread | raw e-mail | index | archive | help
Looks suspiciously similar to = http://www.freebsd.org/cgi/query-pr.cgi?pr=3Djava/128411 which was fixed = some time ago, but probably sneaked into OpenJDK? On 12 Dec, 2010, at 18:42 , Ronald Klop wrote: > Hi, >=20 > 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. >=20 > Ronald. >=20 > On Fri, 10 Dec 2010 20:29:42 +0100, Iris Booker = <ibooker.llnw@gmail.com> wrote: >=20 >> Note: This is a forward of a message originally sent the message to >> java@freebsd.org in November. >>=20 >>=20 >>=20 >>=20 >> I=92m looking for some guidance on configuring OpenJDK correctly for = our >> platform. >>=20 >> 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. >>=20 >> 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/GetTotalPhysica= lMemorySize.java). >>=20 >> 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). >>=20 >> Does anyone have any suggestions as to build settings or any other >> configuration items we should look at to resolve this problem? >>=20 >> [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. >>=20 >> Regards, >> I Booker >>=20 >> BTW, I included the segmentation fault details generated by the >> GetTotalPhysicalMemorySize unit test >>=20 >> # >> # A fatal error has been detected by the Java Runtime Environment: >> # >> # SIGSEGV (0xb) at pc=3D0x000000080205dd34, pid=3D75359, = tid=3D34371281472 >> # >> # 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] >>=20 >> # If you would like to submit a bug report, please visit: >> # http://java.sun.com/webapps/bugreport/crash.jsp >> # >>=20 >> --------------- T H R E A D --------------- >>=20 >> Current thread (0x0000000801b2e000): JavaThread "main" = [_thread_in_Java, >> id=3D11543104, stack(0x00007fffffaff000,0x00007fffffbff000)] >>=20 >> siginfo:si_signo=3DSIGSEGV: si_errno=3D0, si_code=3D1 (SEGV_MAPERR), >> si_addr=3D0x00007fff00000018 >>=20 >> Registers: >> RAX=3D0x00000001ff4ad000, RBX=3D0x00000008052bfdb0, = RCX=3D0x000000080094c30c, >> RDX=3D0x0000000000000001 >> RSP=3D0x00007fffffbfe910, RBP=3D0x00007fff00000000, = RSI=3D0x0000000000000002, >> RDI=3D0x00007fffffbfe900 >> R8 =3D0x0000000000000001, R9 =3D0x00007fffffbfe8f8, = R10=3D0x0000000000000000, >> R11=3D0x000000080205af1b >> R12=3D0x0000000801b2e000, R13=3D0x00000008052bfdb0, = R14=3D0x00007fffffbfe9a0, >> R15=3D0x0000000801b2e000 >> RIP=3D0x000000080205dd34, EFL=3D0x0000000000000000, = ERR=3D0x0000000000000004 >> TRAPNO=3D0x000000000000000c >>=20 >> Top of Stack: (sp=3D0x00007fffffbfe910) >> 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 >>=20 >> Instructions: (pc=3D0x000000080205dd34) >> 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 >>=20 >> Stack: [0x00007fffffaff000,0x00007fffffbff000], = sp=3D0x00007fffffbfe910, >> free space=3D3fe000000080094c0bck >> Native frames: (J=3Dcompiled Java code, j=3Dinterpreted, Vv=3DVM = code, C=3Dnative >> code) >>=20 >> [error occurred during error reporting (printing native stack), id = 0xb] >>=20 >>=20 >> --------------- P R O C E S S --------------- >>=20 >> Java Threads: ( =3D> current thread ) >> 0x0000000884044000 JavaThread "Low Memory Detector" daemon >> [_thread_blocked, id=3D28418928, = stack(0x00007ffffeff4000,0x00007fffff0f4000)] >> 0x0000000884041000 JavaThread "CompilerThread1" daemon = [_thread_blocked, >> id=3D28418528, stack(0x00007fffff0f5000,0x00007fffff1f5000)] >> 0x000000088403f000 JavaThread "CompilerThread0" daemon = [_thread_blocked, >> id=3D28418128, stack(0x00007fffff1f6000,0x00007fffff2f6000)] >> 0x000000088403e000 JavaThread "Signal Dispatcher" daemon = [_thread_blocked, >> id=3D28417728, stack(0x00007fffff2f7000,0x00007fffff3f7000)] >> 0x0000000884016000 JavaThread "Finalizer" daemon [_thread_blocked, >> id=3D28417328, stack(0x00007fffff3f800 >> 0,0x00007fffff4f8000)] >> 0x0000000884015000 JavaThread "Reference Handler" daemon = [_thread_blocked, >> id=3D28416928, stack(0x00007fffff4f9000,0x00007fffff5f9000)] >> =3D>0x0000000801b2e000 JavaThread "main" [_thread_in_Java, = id=3D11543104, >> stack(0x00007fffffaff000,0x00007fffffbff000)] >>=20 >> Other Threads: >> 0x0000000884011000 VMThread [stack: = 0x00007fffff5fa000,0x00007fffff6fa000] >> [id=3D28416528] >> 0x000000088404d000 WatcherThread [stack: >> 0x00007ffffeef3000,0x00007ffffeff3000] [id=3D28414528] >>=20 >> VM state:not at safepoint (normal execution) >>=20 >> VM Mutex/Monitor currently owned by a thread: None >>=20 >> 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) >>=20 >> 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 >>=20 >> vM Arguments: >> java_command: GetTotalPhysicalMemorySize >> Launcher Type: SUN_STANDARD >>=20 >> Environment Variables: >> = PATH=3D/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local= /bin:/home/user/bin >> = LD_LIBRARY_PATH=3D/usr/local/openjdk6/jre/lib/amd64/server:/usr/local/open= jdk6/jre/lib/amd64:/usr/local/openjdk6/jre/../lib/amd64 >> SHELL=3D/usr/local/bin/bash >>=20 >> Signal Handlers: >> SIGSEGV: [libjvm.so+0x740970], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGBUS: [libjvm.so+0x740970], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGFPE: [libjvm.so+0x5f8fb0], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGPIPE: [libjvm.so+0x5f8fb0], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGXFSZ: [libjvm.so+0x5f8fb0], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGILL: [libjvm.so+0x5f8fb0], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGUSR1: SIG_DFL, sa_mask[0]=3D0x63807efb, sa_flags=3D0x00000000 >> SIGUSR2: [libjvm.so+0x5fbaa0], sa_mask[0]=3D0x00000000, = sa_flags=3D0x00000042 >> SIGHUP: [libjvm.so+0x5fa480], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGINT: [libjvm.so+0x5fa480], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGTERM: [libjvm.so+0x5fa480], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >> SIGQUIT: [libjvm.so+0x5fa480], sa_mask[0]=3D0xfffefeff, = sa_flags=3D0x00000042 >>=20 >>=20 >> --------------- S Y S T E M --------------- >>=20 >>=20 >>=20 >> 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 >>=20 >> Memory: 4k page, physical 7935044k(1983761k free) >>=20 >> 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] >>=20 >> 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"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EE2F544B-7162-4AF0-BC01-1CDC04900A67>