Bug 165106 - Deadlock when initializing properties in ant script
Deadlock when initializing properties in ant script
Status: RESOLVED INVALID
Product: projects
Classification: Unclassified
Component: Ant
6.x
All Linux
: P3 (vote)
: TBD
Assigned To: Jesse Glick
issues@projects
https://issues.apache.org/bugzilla/sh...
autoproject
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-13 19:20 UTC by Rich Unger
Modified: 2009-05-19 20:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rich Unger 2009-05-13 19:20:40 UTC
Trying out my app using autoproject in 6.7beta, and I'm running into a deadlock when building, similar to to issue #132945

Thread dump:

Found one Java-level deadlock:
=============================
"Thread-11":
  waiting to lock monitor 0x09b1296c (object 0x749e4668, a org.apache.tools.ant.Project$AntRefTable),
  which is held by "Thread-10"
"Thread-10":
  waiting to lock monitor 0x684021b8 (object 0x749e3310, a org.apache.tools.ant.Project),
  which is held by "Thread-11"

Java stack information for the threads listed above:
===================================================
"Thread-11":
	at java.util.Hashtable.get(Hashtable.java:333)
	- waiting to lock <0x749e4668> (a org.apache.tools.ant.Project$AntRefTable)
	at org.apache.tools.ant.Project$AntRefTable.getReal(Project.java:2357)
	at org.apache.tools.ant.Project$AntRefTable.get(Project.java:2373)
	at org.apache.tools.ant.Project.getReference(Project.java:1975)
	at org.apache.tools.ant.PropertyHelper.getPropertyHelper(PropertyHelper.java:131)
	- locked <0xeb322c18> (a java.lang.Class for org.apache.tools.ant.PropertyHelper)
	at org.apache.tools.ant.Project.getProperty(Project.java:587)
	at org.apache.tools.ant.module.bridge.impl.NbBuildLogger$Event.getScriptLocation(NbBuildLogger.java:1052)
	at org.apache.tools.ant.module.spi.AntEvent.getScriptLocation(AntEvent.java:138)
	at org.apache.tools.ant.module.bridge.impl.NbBuildLogger.getInterestedLoggersByEvent(NbBuildLogger.java:259)
	at org.apache.tools.ant.module.bridge.impl.NbBuildLogger.messageLogged(NbBuildLogger.java:605)
	at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2200)
	- locked <0x749e3310> (a org.apache.tools.ant.Project)
	at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2237)
	at org.apache.tools.ant.Project.log(Project.java:445)
	at org.apache.tools.ant.Project.log(Project.java:434)
	at org.apache.tools.ant.AntClassLoader.log(AntClassLoader.java:404)
	at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1339)
	at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
	- locked <0x73ce9480> (a org.apache.tools.ant.AntClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	- locked <0x73ce9480> (a org.apache.tools.ant.AntClassLoader)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1146)
	at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1324)
	at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1388)
	at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
	at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
	- locked <0x73ce9480> (a org.apache.tools.ant.AntClassLoader)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	- locked <0x73ce9480> (a org.apache.tools.ant.AntClassLoader)
	at com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:316)
	- locked <0xeb87a950> (a java.lang.Class for com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl)
	at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1.<init>(AnnotationParserFactoryImpl.java:63)
	at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl.create(AnnotationParserFactoryImpl.java:62)
	at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.createAnnotationParser(NGCCRuntimeEx.java:320)
	at com.sun.xml.xsom.impl.parser.state.annotation.action0(annotation.java:48)
	at com.sun.xml.xsom.impl.parser.state.annotation.enterElement(annotation.java:68)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:213)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:111)
	at com.sun.xml.xsom.impl.parser.state.foreignAttributes.enterElement(foreignAttributes.java:50)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:436)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:205)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:181)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:372)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:388)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
	at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:193)
	at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:219)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:68)
	at com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:128)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at
com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:97)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:172)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at com.sun.tools.xjc.ModelLoader$SpeculationChecker.startElement(ModelLoader.java:439)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at com.sun.tools.xjc.reader.internalizer.VersionChecker.startElement(VersionChecker.java:82)
	at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
	at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.xml.sax.helpers.XMLFilterImpl.parse(XMLFilterImpl.java:333)
	at com.sun.xml.xsom.parser.JAXPParser.parse(JAXPParser.java:79)
	at com.sun.tools.xjc.ModelLoader$2.parse(ModelLoader.java:463)
	at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:246)
	at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:298)
	at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:87)
	at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:147)
	at com.sun.tools.xjc.ModelLoader.createXSOMSpeculative(ModelLoader.java:480)
	at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:350)
	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:151)
	at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:97)
	at com.sun.tools.xjc.XJC2Task._doXJC(XJC2Task.java:469)
	at com.sun.tools.xjc.XJC2Task.doXJC(XJC2Task.java:416)
	at com.sun.tools.xjc.XJC2Task.execute(XJC2Task.java:351)
	at com.sun.tools.xjc.XJCTask.execute(XJCTask.java:67)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:428)
	at java.lang.Thread.run(Thread.java:619)
"Thread-10":
	at org.apache.tools.ant.Project.fireMessageLoggedEvent(Project.java:2178)
	- waiting to lock <0x749e3310> (a org.apache.tools.ant.Project)
	at org.apache.tools.ant.Project.fireMessageLogged(Project.java:2237)
	at org.apache.tools.ant.Project.log(Project.java:445)
	at org.apache.tools.ant.Project.log(Project.java:434)
	at org.apache.tools.ant.Project.addReference(Project.java:1950)
	- locked <0x749e4668> (a org.apache.tools.ant.Project$AntRefTable)
	at org.apache.tools.ant.taskdefs.Ant.copyReference(Ant.java:574)
	at org.apache.tools.ant.taskdefs.Ant.addReferences(Ant.java:519)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:408)
	at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:289)
	at org.apache.tools.ant.taskdefs.SubAnt.execute(SubAnt.java:208)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor26.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.taskdefs.Parallel$TaskRunnable.run(Parallel.java:428)
	at java.lang.Thread.run(Thread.java:619)

Found 1 deadlock.
Comment 1 Jesse Glick 2009-05-18 14:28:31 UTC
Not similar to 132945. Looks to be a bug in Ant. Do you have any way of reproducing on a self-contained test case?
Comment 2 Jesse Glick 2009-05-19 20:30:22 UTC
Sounds very similar to an Ant bug claimed to be fixed in 1.8.0 dev builds. Please use the Ant bug tracker to verify.

In general, <parallel> is not very heavily tested AFAIK and you are liable to run into problems if you use this task.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo