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 227101 - Possible deadlock between Maven CosChecker and RepositoryUpdater
Summary: Possible deadlock between Maven CosChecker and RepositoryUpdater
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-06 13:15 UTC by gaelroustan
Modified: 2013-06-05 09:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 199347


Attachments
stacktrace (1.91 KB, text/plain)
2013-03-06 13:15 UTC, gaelroustan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gaelroustan 2013-03-06 13:15:32 UTC
This bug was originally marked as duplicate of bug 223270, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.3 (Build 201302132200)
VM: Java HotSpot(TM) 64-Bit Server VM, 20.14-b01-445, Java(TM) SE Runtime Environment, 1.6.0_41-b02-445-11M4107
OS: Mac OS X

Stacktrace: 
java.lang.Exception: Scan canceled.
   at java.lang.Thread.getStackTrace(Thread.java:1503)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:125)
   at org.netbeans.modules.parsing.impl.indexing.LogContext.create(LogContext.java:118)
   at org.netbeans.modules.parsing.api.indexing.IndexingManager.refreshAll(IndexingManager.java:422)
   at org.netbeans.modules.parsing.api.indexing.IndexingManager.refreshAllIndices(IndexingManager.java:377)
   at org.netbeans.modules.versioning.indexingbridge.Bridge$1.call(Bridge.java:63)
Comment 1 gaelroustan 2013-03-06 13:15:35 UTC
Created attachment 132263 [details]
stacktrace
Comment 2 Svata Dedic 2013-05-31 14:43:44 UTC
Please see thread dumps in the message.logs in exception reports. It seems that file events fired from RepositoryUpdater's RefreshWork.getDone() cause Maven project to be reloaded and invokes CosChecker.cleanGeneratedClassfiles. 
But ProjectRunnerImpl.doClean actually waits for the scan to finish.
Comment 3 Milos Kleint 2013-06-03 15:12:06 UTC
http://hg.netbeans.org/core-main/rev/c6b6b24b9a9e
http://hg.netbeans.org/core-main/rev/09e11b1139e1

we have been protecting against awt thread and project mutexes, the fix involves scheduling all project reloads just in case.
Comment 4 Quality Engineering 2013-06-05 09:32:55 UTC
Integrated into 'main-golden', will be available in build *201306050626* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c6b6b24b9a9e
User: Milos Kleint <mkleint@netbeans.org>
Log: #227101 always post project reloads to RP queue, not just when project mutex is affected or when AWT thread is involved. Effectively makes project reloading a throughput 1 queue. initial loading is not affected.