From owner-freebsd-java@FreeBSD.ORG Mon Feb 4 15:16:30 2013 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 846AD864 for ; Mon, 4 Feb 2013 15:16:30 +0000 (UTC) (envelope-from achill@matrix.gatewaynet.com) Received: from smadev.internal.net (adsltrust.ath.forthnet.gr [194.219.204.174]) by mx1.freebsd.org (Postfix) with ESMTP id A0C4617F for ; Mon, 4 Feb 2013 15:16:28 +0000 (UTC) X-Bogosity: No, tests=bogofilter Received: from smadev.internal.net (localhost [127.0.0.1]) by smadev.internal.net (8.14.5/8.14.5) with ESMTP id r14FGRva005427 for ; Mon, 4 Feb 2013 17:16:27 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) Received: (from achill@localhost) by smadev.internal.net (8.14.5/8.14.5/Submit) id r14FGRcb005426 for freebsd-java@freebsd.org; Mon, 4 Feb 2013 17:16:27 +0200 (EET) (envelope-from achill@matrix.gatewaynet.com) X-Authentication-Warning: smadev.internal.net: achill set sender to achill@matrix.gatewaynet.com using -f From: Achilleas Mantzios To: freebsd-java@freebsd.org Subject: Re: Re: Re: FreeBSD pl/java problem : backend hangs Date: Mon, 04 Feb 2013 17:16:27 +0200 Message-ID: <1794514.P32sUeWV4B@smadev.internal.net> Organization: Dynacom Tankers Mgmt X-Face: "g.Z.Lx$T1ZMcQ%hC!e^E&tD,cT:"bTs45WM(,vUj@8QBz6}T'sn+EnZTzy`UVQ:&A=`_; f)V+K4z}rG5:(uu[b:WY'*`6F"ou-Or(q; u{#Gxx|MkO4E.vh@E}[#7Ytt"shtU>A&@CO` a|Wx]m_wRD,?4!'Ir1$4iis{/.WU<`#dhKI]g2w^!B[CvRJr+W|; -VS~QcL!s1"'??rct} ^=5Fa!W!{a}Jd:W%6,E[N\r-<)T'_N[~3fy9pF"b>-Yj^p}/2tPudP>I"$%w]"W4CIja6J Tajm}"8t`-hJlf2kRQ_V,eT_kN6KLG+~2mZ+cPX,p,xQN9QVR References: <5933829.WYzpjKtO0p@smadev.internal.net> <2555655.RMjoVHmAxh@smadev.internal.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2013 15:16:30 -0000 I am thinking of trying to address this problem twofold : 1) establish a connection with the pl/java people 2) trying to go back and forth from there and here to try to debug the = problem Lets wait for some recommendation/help from there, and then i'll get ba= ck to this list for more. On =CE=94=CE=B5=CF=85 04 =CE=A6=CE=B5=CE=B2 2013 16:09:56 Achilleas Man= tzios wrote: > Thanx Ronald, >=20 > postgres@smadev:~> jstack 384 > 384: Unable to open socket file: target process not responding or Hot= Spot VM not loaded > The -F option can be used when the target process is not responding >=20 > Also jstack -F fails as well > postgres@smadev:~> jstack -F 384 > Attaching to process ID 384, please wait... > Exception in thread "main" java.lang.reflect.InvocationTargetExceptio= n > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method= ) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAc= cessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Delegating= MethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:616) > at sun.tools.jstack.JStack.runJStackTool(JStack.java:136) > at sun.tools.jstack.JStack.main(JStack.java:102) > Caused by: sun.jvm.hotspot.debugger.UnalignedAddressException: Trying= to read at address: 0x746f705c6c4f4867 with alignment: 4 > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal$1.checkAlign= ment(BsdDebuggerLocal.java:181) > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readCInteger= (BsdDebuggerLocal.java:478) > at sun.jvm.hotspot.debugger.DebuggerBase.readAddressValue(Deb= uggerBase.java:454) > at sun.jvm.hotspot.debugger.bsd.BsdDebuggerLocal.readAddress(= BsdDebuggerLocal.java:423) > at sun.jvm.hotspot.debugger.bsd.BsdAddress.getAddressAt(BsdAd= dress.java:74) > at sun.jvm.hotspot.HotSpotTypeDataBase.readVMTypes(HotSpotTyp= eDataBase.java:108) > at sun.jvm.hotspot.HotSpotTypeDataBase.(HotSpotTypeData= Base.java:85) > at sun.jvm.hotspot.bugspot.BugSpotAgent.setupVM(BugSpotAgent.= java:574) > at sun.jvm.hotspot.bugspot.BugSpotAgent.go(BugSpotAgent.java:= 495) > at sun.jvm.hotspot.bugspot.BugSpotAgent.attach(BugSpotAgent.j= ava:333) > at sun.jvm.hotspot.tools.Tool.start(Tool.java:163) > at sun.jvm.hotspot.tools.JStack.main(JStack.java:86) >=20 >=20 > On =C3=8E=C2=94=C3=8E=C2=B5=C3=8F=C2=85 04 =C3=8E=C2=A6=C3=8E=C2=B5=C3= =8E=C2=B2 2013 14:47:13 you wrote: > > I have no experience running java as a backend of pgsql. > > Can you run jstack on the backend? > >=20 > > Ronald. > >=20 > > On Mon, 04 Feb 2013 14:17:22 +0100, Achilleas Mantzios =20 > > wrote: > >=20 > > > Hello community, > > > > > > I am running postgresql 9.2.2 with > > > openjdk version "1.6.0_32" > > > OpenJDK Runtime Environment (build 1.6.0_32-b25) > > > OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) > > > On FreeBSD 8.3-RELEASE > > > > > > I am having trouble even running simple tests like : > > > CREATE FUNCTION getsysprop(VARCHAR) > > > RETURNS VARCHAR > > > AS 'java.lang.System.getProperty' > > > LANGUAGE java; > > > > > > SELECT getsysprop('user.home'); > > > > > > When i do that, the session hangs, and have to kill -9 the backen= d. > > > > > > Searching with truss got : > > > > > > gettimeofday({1359983241.596250 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596275 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596300 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596327 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596352 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596378 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596403 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596431 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596458 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596482 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596507 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596532 },0x0) =3D 0 (0x0) > > > gettimeofday({1359983241.596556 },0x0) =3D 0 (0x0) > > > _umtx_op(0x7fffffffc7e8,0x3,0x1,0x0,0x0,0x1) =3D 0 (0x0) > > > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGABRT|SIGEMT|SIGKIL= L|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD= |SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGIN= FO|SIGUSR1|SIGUSR2,0x0) =20 > > > =3D 0 (0x0) > > > sigprocmask(SIG_SETMASK,0x0,0x0) =3D 0 (0x0) > > > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGABRT|SIGEMT|SIGKIL= L|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD= |SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGIN= FO|SIGUSR1|SIGUSR2,0x0) =20 > > > =3D 0 (0x0) > > > sigprocmask(SIG_SETMASK,0x0,0x0) =3D 0 (0x0) > > > > > > while ktrace gave : > > > > > > 98910 initial thread CALL gettimeofday(0x7fffffffc900,0) > > > 98910 initial thread RET gettimeofday 0 > > > 98910 initial thread CALL gettimeofday(0x7fffffffc900,0) > > > 98910 initial thread RET gettimeofday 0 > > > 98910 initial thread CALL gettimeofday(0x7fffffffc900,0) > > > 98910 initial thread RET gettimeofday 0 > > > 98910 initial thread CALL gettimeofday(0x7fffffffc900,0) > > > 98910 initial thread RET gettimeofday 0 > > > 98910 initial thread CALL gettimeofday(0x7fffffffc940,0) > > > 98910 initial thread RET gettimeofday 0 > > > 98910 initial thread CALL _umtx_op(0x7fffffffc7e8,0x3,0x1,0,0) > > > 98910 initial thread RET _umtx_op 0 > > > 98910 initial thread CALL =20 > > > sigprocmask(SIG_BLOCK,0x7fffffffc780,0x8016167d8) > > > 98910 initial thread RET sigprocmask 0 > > > 98910 initial thread CALL sigprocmask(SIG_SETMASK,0x8016167d8,0= ) > > > 98910 initial thread RET sigprocmask 0 > > > 98910 initial thread CALL =20 > > > sigprocmask(SIG_BLOCK,0x7fffffffc6e0,0x8016167d8) > > > 98910 initial thread RET sigprocmask 0 > > > 98910 initial thread CALL sigprocmask(SIG_SETMASK,0x8016167d8,0= ) > > > 98910 initial thread RET sigprocmask 0 > > > 98910 initial thread CALL _umtx_op(0x8f8dc4280,0x11,0,0,0) > > > > > > I found some relevant problems with FreeBSD systems hanging after= an =20 > > > _umtx_op but all those point > > > to threading problems that now are solved. I found nothing modern= about =20 > > > _umtx_op. > > > > > > I know FreeBSD is not a "Tier-1" platform for postgresql (nor jav= a), but =20 > > > this is my main platform and i'd like > > > to stick with this. > > > > > > Is there anything i could do to get closer to make pl/java work w= ith =20 > > > FreeBSD? > > > > > > Also read this =20 > > > http://postgresql.1045698.n5.nabble.com/Java-VM-stalls-during-quo= t-install-jar-quot-td3290754.html =20 > > > thread. > > > Very close to my situation. JNI standalone also worked for me. > > > > > > Any hints/pointers ? > > > > > > - > > > Achilleas Mantzios > > > IT DEV > > > IT DEPT > > > Dynacom Tankers Mgmt > > > _______________________________________________ > > > freebsd-java@freebsd.org mailing list > > > http://lists.freebsd.org/mailman/listinfo/freebsd-java > > > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebs= d.org" > - > Achilleas Mantzios > IT DEV > IT DEPT > Dynacom Tankers Mgmt > _______________________________________________ > freebsd-java@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-java > To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.or= g" - Achilleas Mantzios IT DEV IT DEPT Dynacom Tankers Mgmt