From owner-freebsd-java@FreeBSD.ORG Mon Feb 4 13:47:22 2013 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C89C1A6A for ; Mon, 4 Feb 2013 13:47:22 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id 60A081D05 for ; Mon, 4 Feb 2013 13:47:22 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1U2MOA-00062A-LM; Mon, 04 Feb 2013 14:47:15 +0100 Received: from [81.21.138.17] (helo=ronaldradial.versatec.local) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1U2MOA-000207-8s; Mon, 04 Feb 2013 14:47:14 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-java@freebsd.org, "Achilleas Mantzios" Subject: Re: FreeBSD pl/java problem : backend hangs References: <5933829.WYzpjKtO0p@smadev.internal.net> Date: Mon, 04 Feb 2013 14:47:13 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: <5933829.WYzpjKtO0p@smadev.internal.net> User-Agent: Opera Mail/12.13 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: + X-Spam-Score: 1.9 X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_50, URI_HEX autolearn=disabled version=3.3.1 X-Scan-Signature: 01ccc3eb840dc35651f50b798cb06ae8 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 13:47:22 -0000 I have no experience running java as a backend of pgsql. Can you run jstack on the backend? Ronald. On Mon, 04 Feb 2013 14:17:22 +0100, Achilleas Mantzios wrote: > 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 backend. > > Searching with truss got : > > gettimeofday({1359983241.596250 },0x0) = 0 (0x0) > gettimeofday({1359983241.596275 },0x0) = 0 (0x0) > gettimeofday({1359983241.596300 },0x0) = 0 (0x0) > gettimeofday({1359983241.596327 },0x0) = 0 (0x0) > gettimeofday({1359983241.596352 },0x0) = 0 (0x0) > gettimeofday({1359983241.596378 },0x0) = 0 (0x0) > gettimeofday({1359983241.596403 },0x0) = 0 (0x0) > gettimeofday({1359983241.596431 },0x0) = 0 (0x0) > gettimeofday({1359983241.596458 },0x0) = 0 (0x0) > gettimeofday({1359983241.596482 },0x0) = 0 (0x0) > gettimeofday({1359983241.596507 },0x0) = 0 (0x0) > gettimeofday({1359983241.596532 },0x0) = 0 (0x0) > gettimeofday({1359983241.596556 },0x0) = 0 (0x0) > _umtx_op(0x7fffffffc7e8,0x3,0x1,0x0,0x0,0x1) = 0 (0x0) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGABRT|SIGEMT|SIGKILL|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) > = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 0 (0x0) > sigprocmask(SIG_BLOCK,SIGHUP|SIGINT|SIGQUIT|SIGABRT|SIGEMT|SIGKILL|SIGSYS|SIGPIPE|SIGALRM|SIGTERM|SIGURG|SIGSTOP|SIGTSTP|SIGCONT|SIGCHLD|SIGTTIN|SIGTTOU|SIGIO|SIGXCPU|SIGXFSZ|SIGVTALRM|SIGPROF|SIGWINCH|SIGINFO|SIGUSR1|SIGUSR2,0x0) > = 0 (0x0) > sigprocmask(SIG_SETMASK,0x0,0x0) = 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 > 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 > 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 > _umtx_op but all those point > to threading problems that now are solved. I found nothing modern about > _umtx_op. > > I know FreeBSD is not a "Tier-1" platform for postgresql (nor java), but > 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 with > FreeBSD? > > Also read this > http://postgresql.1045698.n5.nabble.com/Java-VM-stalls-during-quot-install-jar-quot-td3290754.html > 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@freebsd.org"