From owner-freebsd-java@FreeBSD.ORG Wed Dec 7 09:25:38 2005 Return-Path: X-Original-To: freebsd-java@freebsd.org 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 17A9616A41F for ; Wed, 7 Dec 2005 09:25:38 +0000 (GMT) (envelope-from past@ebs.gr) Received: from fly.ebs.gr (fly.ebs.gr [62.103.84.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id C981143D58 for ; Wed, 7 Dec 2005 09:25:36 +0000 (GMT) (envelope-from past@ebs.gr) Received: from ebs.gr (root@hal.ebs.gr [10.1.1.2]) by fly.ebs.gr (8.12.9p1/8.12.9) with ESMTP id jB79PYZm079675; Wed, 7 Dec 2005 11:25:34 +0200 (EET) (envelope-from past@ebs.gr) Received: from [10.1.1.158] (pc158.ebs.gr [10.1.1.158]) by ebs.gr (8.13.3/8.12.11) with ESMTP id jB79PrYs016267; Wed, 7 Dec 2005 11:25:53 +0200 (EET) (envelope-from past@ebs.gr) Message-ID: <4396AA89.8000206@ebs.gr> Date: Wed, 07 Dec 2005 11:25:29 +0200 From: Panagiotis Astithas Organization: EBS Ltd. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051106) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd@spatula.net References: <200512062320.jB6NK9RS075945@freefall.freebsd.org> <20051206153047.J2752@turing> <20051206154223.C2752@turing> In-Reply-To: <20051206154223.C2752@turing> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-java@freebsd.org Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec 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: Wed, 07 Dec 2005 09:25:38 -0000 freebsd@spatula.net wrote: > I have found the problem, at long last. > > Resin uses a custom JNI library for acceleration of some features. In > their compilation process, they specify -lc_r for the threading library > used in their JNI library. > > This in turn seems to be the cause of unexpected and erratic behaviour > when running Java with libpthread, and probably explains why the > problems completely disappear when mapping Java to use libc_r. > > Modifying the makefile to link the JNI library to libpthread completely > alleviates the signal handling problems. The process can be suspended > and resumed from the keyboard ad-nauseam. Removing the JNI library from > the picture entirely has the same effect (Resin will use the native Java > code if the JNI library cannot be loaded.) > > I will follow up with the Resin folks and submit a patch to detect the > thread library that is in use and use that one when compiling the JNI > library. > > Please close this bug. > > Nick Congratulations for your debugging work and thank you for being so persistent! Panagiotis