From owner-freebsd-java@FreeBSD.ORG Mon Dec 13 16:23:58 2004 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A33DA16A4CE for ; Mon, 13 Dec 2004 16:23:58 +0000 (GMT) Received: from matrix.gatewaynet.com (matrix.gatewaynet.com [217.19.69.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8CCB843D1D for ; Mon, 13 Dec 2004 16:23:57 +0000 (GMT) (envelope-from achill@matrix.gatewaynet.com) Received: from matrix.gatewaynet.com (localhost.localdomain [127.0.0.1]) by matrix.gatewaynet.com (8.12.8/8.12.8) with ESMTP id iBDGutT5006699; Mon, 13 Dec 2004 18:56:55 +0200 Received: from localhost (achill@localhost)iBDGutVj006695; Mon, 13 Dec 2004 18:56:55 +0200 Date: Mon, 13 Dec 2004 18:56:55 +0200 (EET) From: Achilleus Mantzios To: Joris Verschoor In-Reply-To: <41BDBC4B.40505@nefli.nl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=ISO-8859-7 Content-Transfer-Encoding: 8BIT cc: freebsd-java@freebsd.org Subject: Re: FreeBSD 5.3-RELEASE + JDK1.4 native in a Jail -> hangs 99% cpu on kserel X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 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 2004 16:23:58 -0000 O Joris Verschoor έγραψε στις Dec 13, 2004 : > Hello, > > I've installed a 5.3-RELEASE box. I haven't changed anything from the > default kernel. > The box is a single cpu P4 with HT disabled. > I've set some sysctl vars: > security.jail.sysvipc_allowed: 1 (for pg in a jail) > > > > There are 2 jails on my box: > 1) Java 1.4.2 native port + resin3 > 2) PostgreSQL-7(.4) Just some thoughts: - Postgresql unfortunately cant be jailified since IPC is not meant to be jailified itself. (BTW have you set security.jail.sysvipc_allowed=1 ??) > > PostgreSQL runs fine (I think) > > I've installed a webapp on resin3 using the pg jdbc drivers. Everything > runs fine and dandy, but after a while, I suddenly get two things: > > ******** 1 ******** > And exception while opening a connection to pg. > > Caused by: org.postgresql.util.PSQLException: > An I/O error occured while reading from backend > Exception: java.net.SocketException: Resource temporarily unavailable > Stack Trace: > > java.net.SocketException: Resource temporarily unavailable > at java.net.SocketInputStream.socketRead0(Native Method) > at java.net.SocketInputStream.read(SocketInputStream.java:129) > at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) > ... etc > > ******** 2 ******** > the java process runs on 98% in the kserel state. > When it's in this state it won't serve any requests. > It is killable (killall -9 java and the perl wrapper). > > I'm still not sure if nr 2 happens because of nr 1. > > > I haven't tried green threads yet. > Hmm. native,green,classic is not an option anymore. Only -client,-server (hotspot). > > Is this a known problem, and if so, what can I do to resolve it? > > What does problem 1 mean? > Is this a problem caused by java(jailed) or pg(jailed)? > What is state is kserel? > Is there anything I can do to provide more information, for example a > dump when it's stuck? > Always have an eye on the postgresql log. Maybe the backend was non gracefully restarted due to a jail IPC failure. What does the postgresql log say? Which postgresql are you running? I suggest 7.4.6 (the lastest stable). Also make sure the jdbc driver in in sync with your backend. Also... an advice: Dont use the ports for postgresql. Manually manage your installations, because even for minor releases updates you could do a real harm to your database if you rely on the ports/packages upgrade mechanisms. No script will ever do : UPDATE pg_type where oid=... ; kinds of things. > > Thanks > > _______________________________________________ > 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" > -- -Achilleus