Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 192051 - Freeze on maven project properties save
Freeze on maven project properties save
Product: projects
Classification: Unclassified
Component: Maven
PC Other
: P2 (vote)
: 7.0
Assigned To: Jesse Glick
Depends on:
Blocks: 189854
  Show dependency treegraph
Reported: 2010-11-17 12:18 UTC by Sergey Petrov
Modified: 2010-12-01 06:37 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

Thread dump (18.76 KB, text/plain)
2010-11-17 12:18 UTC, Sergey Petrov

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey Petrov 2010-11-17 12:18:11 UTC
Created attachment 103031 [details]
Thread dump

Create maven web project, open project properties, go to Run section, select glassfish as a server, click in text field below, press close.
Saving will never finish, have to kill ide.
See thread dump.
Comment 1 David Konecny 2010-11-29 03:11:14 UTC
might be related to fix of issue 189854
Comment 2 David Konecny 2010-11-29 21:14:32 UTC
While retesting a different issue this deadlock happened to me several times in last 5 minutes. The scenario is: start yesterday's build with dozen of test projects of misc types and:
* open project properties of a Maven Web Project
* in Run Panel change server selection and confirm the panel
repeating these two steps twice the deadlock always seems to happen when panel is confirmed second time. HTH.
Comment 3 Jesse Glick 2010-11-29 21:22:26 UTC
Cannot yet reproduce.

Not sure if this is related to the other XAM/XDM-related hangs.

In one thread, ProjectManager.mutex is held because the project is being saved, and POMModelImpl.endTransaction is waiting for a monitor. In the other, POMModelImpl.endTransaction is already being called, and ProjectManager.mutex is requested just to find the encoding of a file, pom.xml I suppose. Not sure how XDMModel.flushDocument could fail to already have the Document in hand. Also not clear to me how both branches of actionPerformed are being executed.
Comment 4 David Konecny 2010-11-29 21:38:10 UTC
Saving of Maven project properties is mess or I'm just lazy to try to understand it. Or both. Why something has to be done in AWT thread and something in background thread? Is not it little bit too complicated?

I fixed recently where WebRunPanelProvider was expecting that task in AWT thread is finished before background one runs. But that was not happening and assert failed randomly. My fix avoided the assert. Now I'm looking at issue 192525 which might be unrelated but: Maven pom.xml is *sometimes* not saved when project properties are closed.
Comment 5 Jesse Glick 2010-11-29 21:41:01 UTC
(In reply to comment #4)
> Or both.


> Why something has to be done in AWT thread and
> something in background thread? Is not it little bit too complicated?

It is indeed too complicated. It is a workaround for a seemingly arbitrary restriction in XAM. The lock on the POM model is acquired in EQ, and XAM refuses to let you end a transaction from a different thread. I could not find a simpler fix.
Comment 6 Jesse Glick 2010-11-29 22:06:17 UTC
I tried to fix in core-main #c371edaef3bc. Since I don't fully understand how the Maven customizer dialog works, I just rearranged some blocks of code until I found something that seems to save changes without throwing any exceptions or deadlocking. Please test.
Comment 7 David Konecny 2010-11-29 23:23:15 UTC
With your fix I cannot reproduce the deadlock anymore and it seems to resolve also my issue 192525. Brilliant! :-)
Comment 8 Quality Engineering 2010-12-01 06:37:45 UTC
Integrated into 'main-golden', will be available in build *201012010001* on (upload may still be in progress)
User: Jesse Glick <>
Log: Attempt to fix #192051 - hang saving projects.

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