Date: Thu, 3 Jun 2004 09:49:47 -0700 (PDT) From: Nick Johnson <freebsd@spatula.net> To: java@freebsd.org Subject: Re: possible threading problem Message-ID: <20040603091708.Q63536@turing.morons.org> In-Reply-To: <20040603120810.096a1975@psych.iad.vt.edu> References: <20040601154601.0869f5b4@psych.iad.vt.edu> <40BD7C06.5050205@noc.ntua.gr><opr8zfpxqaydasmi@outgoing.local> <20040603120810.096a1975@psych.iad.vt.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040603091708.Q63536>