https://bz.apache.org/bugzilla/show_bug.cgi?id=65424
Bug ID: 65424
Summary: deadlock
Product: Ant
Version: 1.10.8
Hardware: PC
OS: Linux
Status: NEW
Severity: major
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Created attachment 37933
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37933&action=edit
deadlock stracktrace
When running ANT in NetBeans 12.4 (ANT 1.10.8) along with AntContrib's <for>
task in a rather complex build script, I can experiment deadlocks every time I
enable parallel run in my <for> tasks (parallel="true" threadCount="${N}").
I think it is related to the way NetBeans intercept log events in its
NbBuildLogger
class.(o.apache.tools.ant.module/src-bridge/org/apache/tools/ant/module/bridge/impl/NbBuildLogger.java
in NetBeans sources).
The logger wraps each event into a NetBeans' AntEvent class then call
Task.getRuntimeConfigurableWrapper() during log to extract tasks infos.
However, getRuntimeConfigableWrapper() method might invoke
IntrospectionHelper.getHelper(...) from its maybeConfigure method, and the
IntrospectionHelper might trigger class loading from an AntClassLoader, which,
in turn, will log a message.
When ANT tasks are run in parallel threads, it is prone to deadlock due to
locking mechanism in AntClassLoader.loadClass and IntrospectionHelper.getHelper
which are synchronized methods. Especially, the latter takes a lock during
introspection phase which can trigger Class loading and messageLogged from
AntClassLoader!
See the stack trace in attachment.
Also see this NetBeans issue :
https://issues.apache.org/jira/browse/NETBEANS-5368
--
You are receiving this mail because:
You are the assignee for the bug.