From owner-freebsd-java@FreeBSD.ORG Thu Jun 3 09:49:48 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 219DA16A4CE for ; Thu, 3 Jun 2004 09:49:48 -0700 (PDT) Received: from turing.morons.org (turing.morons.org [209.237.229.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0740C43D39 for ; Thu, 3 Jun 2004 09:49:48 -0700 (PDT) (envelope-from freebsd@spatula.net) Received: by turing.morons.org (Postfix, from userid 1001) id BF9DFA92A; Thu, 3 Jun 2004 09:49:47 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id BCFFBA928 for ; Thu, 3 Jun 2004 09:49:47 -0700 (PDT) Date: Thu, 3 Jun 2004 09:49:47 -0700 (PDT) From: Nick Johnson X-X-Sender: spatula@turing.morons.org To: java@freebsd.org In-Reply-To: <20040603120810.096a1975@psych.iad.vt.edu> Message-ID: <20040603091708.Q63536@turing.morons.org> References: <20040601154601.0869f5b4@psych.iad.vt.edu> <40BD7C06.5050205@noc.ntua.gr> <20040603120810.096a1975@psych.iad.vt.edu> X-what-happen: someone set up us the bomb X-Message-Flags: Spatula Precedence: special-delivery MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: possible threading problem X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2004 16:49:48 -0000 On Thu, 3 Jun 2004, Daniel Fisher wrote: > I think you've missed the point. > The question is, why does the BSD JVM behave differently and does it need > fixing? Threading is nondeterministic by nature. Different threading implementations = different behaviour. Because something is different it doesn't necessarily mean it's incorrect. Plenty of things are undefined wrt threading behaviour. Having said that, there's certainly something a bit strange going on. For one thing, I get a NoClassDefFoundException some of the time instead of an InterruptedIOException. That's fairly bizarre, but it seems like it -could- be related (maybe if the classloader is getting its IO interrupted when trying to instantiate an instance of PropEvent?) It isn't clear to me from this example what the condition is that causes the interrupted IO, however. It would be nice to have a stripped-down test case that can reproduce this behaviour in a single class file in the simplest way possible. I can't imagine the problem is related to any synchronized block, since with just one properties file you only have one thread actually doing any work if I read this correctly. Rather it looks like the problem is that the first IO call in a running thread that happens after a Thread.sleep gets interrupted. Can you simplify your test case into a few dozen lines so that it can be more easily understood? 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/