This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Kawa fails if used in multithreading
On 08/03/2010 04:16 AM, Daniele Benegiamo wrote:
I've checked revision 6642 and I've found two race conditions. Using the
sample program previously sent, setting LOOPS to an high value (1000,
10000, it's machine and weather dependent...) is more likely to get the
problem.
...
Placing a "synchronized" in front of ModuleContext.findInstance() (seems
to) solve the problem, but maybe it's too coarse-grained.
I already checked in that fix yesterday (revision 6645).
That would solve a race condition - I'm surprised it might solve
a deadlock, but I guess it could happen. Please clarify/verify
that 6645 fixes these deadlocks.
This showed up another problem: analyzing the PermGen space, it
continuously increase in time; with (very) high LOOPS values threads
dead due missing available PermGen space. It seems to depend on
reflection or leaking when compiling scheme programs: the number of
total loaded classes continuously increase in time as PermGen space. You
can monitor all this with the standard Java VisualVM (jvisualvm).
Could you try to follow up on this? What data is leaking and why?
I haven't used jvisualvm, but I have used jhat, which is useful for
chasing down leaks.
--
--Per Bothner
per@bothner.com http://per.bothner.com/