This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 179592

Summary: Deadlock between maven.model.pom.impl.ProjectImpl and XDMModel
Product: xml Reporter: abs <abs>
Component: XAMAssignee: Svata Dedic <sdedic>
Status: RESOLVED WONTFIX    
Severity: normal CC: jglick, mikael, mkleint
Priority: P3 Keywords: THREAD
Version: 6.x   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: thread dump

Description abs 2010-01-17 02:57:55 UTC
When I was developing web application using maven, netbeans was deadlocked.

My environment is following:
OS: Mac OS X 10.6.2
NetBeans: 6.8
Java:1.6.0_17

I attach relevant thread dump.
Comment 1 Peter Pis 2010-01-17 03:35:14 UTC
http://wiki.netbeans.org/GenerateThreadDump
Comment 2 abs 2010-01-19 05:45:13 UTC
Created attachment 93408 [details]
thread dump
Comment 3 Milos Kleint 2010-02-03 07:08:02 UTC
*** Bug 179997 has been marked as a duplicate of this bug. ***
Comment 4 Antonin Nebuzelsky 2010-07-30 15:18:06 UTC
Reassigning to default owner.
Comment 5 Jesse Glick 2010-11-16 21:54:44 UTC
Can you check this? Looks like a bug in XAM/XDM to me, but not sure. Looks a bit different from bug #191796.
Comment 6 Milos Kleint 2012-02-17 13:55:21 UTC
	at org.netbeans.modules.xml.xdm.XDMModel.sync(XDMModel.java:158)
	- locked <0x0000000115457338> (a org.netbeans.modules.xml.xdm.XDMModel)
	at org.netbeans.modules.xml.xdm.xam.XDMAccess.sync(XDMAccess.java:141)
	at org.netbeans.modules.xml.xam.AbstractModel.sync(AbstractModel.java:259)

the code in XDMAccess is called under a XAM transaction.

Since we support both poms with a namespace declaration and without it, POMComponentFactoryImpl.getQName() needs to query the namespace of the current file.

the POMModelVisitor.visit(Project) method checks in the beginning if synchronization is required, however only that piece of code is part of a transaction, the following reading operations that are performed in that method are not. And during the execution of the method the underlying model is created/updated..


reassigning to xml/xam, please advice what is the appropriate threading model with regard to model synchronization..
Comment 7 Martin Balin 2015-09-17 13:17:13 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.