[stringtemplate-interest] deadlock during the static initialization
Nils Liebelt
nils.liebelt at serie-a.de
Tue Jan 13 10:38:21 PST 2009
Hi all,
I spotted an racing condition that occures during the (static)
initialization of StringTemplate and StringTemplateGroup.
The result is an deadlock that occures when initializing the classes
from different threads. Please find attached a simple junit testcase
that illustrates the behaviour. Also attached is a thread dump that
shows stacktraces after the deadlock occures. To get around this
issue you must statically initialize one of the classes before actual
creating the instances of the mentioned classes (see testcase)
The problem affects StringTemplate Version 3.2. I can reproduce the
behaviour on sun jvm 1.6.0_03-b05 (64bit) and 1.6.0_07-b06 (32bit)
Is this a known bug? Can I raise a jira?
Regards,
Nils
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MultiThreadedSTInitTest.java
Type: text/x-java
Size: 1576 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090113/f4b227a4/attachment.bin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: thddmp.txt
Url: http://www.antlr.org/pipermail/stringtemplate-interest/attachments/20090113/f4b227a4/attachment.txt
More information about the stringtemplate-interest
mailing list