From owner-freebsd-threads@FreeBSD.ORG Tue Dec 6 23:50:05 2005 Return-Path: X-Original-To: freebsd-threads@hub.freebsd.org Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35B0016A41F for ; Tue, 6 Dec 2005 23:50:05 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CD0E443D45 for ; Tue, 6 Dec 2005 23:50:04 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id jB6No4o0078041 for ; Tue, 6 Dec 2005 23:50:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id jB6No4d9078040; Tue, 6 Dec 2005 23:50:04 GMT (envelope-from gnats) Date: Tue, 6 Dec 2005 23:50:04 GMT Message-Id: <200512062350.jB6No4d9078040@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: freebsd@spatula.net Cc: Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd@spatula.net List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2005 23:50:05 -0000 The following reply was made to PR threads/84778; it has been noted by GNATS. From: freebsd@spatula.net To: bug-followup@FreeBSD.org Cc: freebsd-java@FreeBSD.org Subject: Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec Date: Tue, 6 Dec 2005 15:48:31 -0800 (PST) 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 -- "The aptly-named morons.org is an obscenity-laced screed..." -- Robert P. Lockwood, Catholic League director of research Nick Johnson, version 2.1 http://web.morons.org/