Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2005 11:25:29 +0200
From:      Panagiotis Astithas <past@ebs.gr>
To:        freebsd@spatula.net
Cc:        freebsd-java@freebsd.org
Subject:   Re: threads/84778: libpthread busy loop/hang with Java when handling signals and Runtime.exec
Message-ID:  <4396AA89.8000206@ebs.gr>
In-Reply-To: <20051206154223.C2752@turing>
References:  <200512062320.jB6NK9RS075945@freefall.freebsd.org>	<20051206153047.J2752@turing> <20051206154223.C2752@turing>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4396AA89.8000206>