Bug 200982 - deadlock between M2ConfigProvider and MavenSourcesImpl
deadlock between M2ConfigProvider and MavenSourcesImpl
Status: VERIFIED FIXED
Product: projects
Classification: Unclassified
Component: Maven
7.0.1
PC Linux
: P2 (vote)
: 7.0.1
Assigned To: Jesse Glick
issues@projects
701patch1-fixed
: THREAD
Depends on: 206128
Blocks: 200772
  Show dependency treegraph
 
Reported: 2011-08-16 03:20 UTC by David Konecny
Modified: 2012-04-12 02:57 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
thread dump (24.25 KB, text/plain)
2011-08-16 03:20 UTC, David Konecny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Konecny 2011-08-16 03:20:08 UTC
Created attachment 109996 [details]
thread dump

When I try to reproduce issue 200772 I always get this deadlock after performing step 4 according to simpler test case from comment #2.
Comment 1 Jesse Glick 2011-08-16 13:11:36 UTC
I got a different deadlock:

"org.netbeans.modules.maven.configurations.M2ConfigProvider":
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.getActiveConfiguration(M2ConfigProvider.java:237)
	- waiting to lock <0x5ce2a068> (a org.netbeans.modules.maven.configurations.M2ConfigProvider)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.getActiveConfiguration(M2ConfigProvider.java:77)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction$11.run(ActiveConfigAction.java:496)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction$11.run(ActiveConfigAction.java:494)
	at org.openide.util.Mutex.readAccess(Mutex.java:288)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.getActiveConfiguration(ActiveConfigAction.java:494)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.configurationsListChanged(ActiveConfigAction.java:217)
	- locked <0x5bd65770> (a org.netbeans.modules.project.ui.actions.ActiveConfigAction)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.access$900(ActiveConfigAction.java:97)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction$4.propertyChange(ActiveConfigAction.java:173)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.firePropertyChange(M2ConfigProvider.java:333)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.access$200(M2ConfigProvider.java:77)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider$1$1.run(M2ConfigProvider.java:129)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
"Default RequestProcessor":
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.activeConfigurationChanged(ActiveConfigAction.java:222)
	- waiting to lock <0x5bd65770> (a org.netbeans.modules.project.ui.actions.ActiveConfigAction)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction.access$500(ActiveConfigAction.java:97)
	at org.netbeans.modules.project.ui.actions.ActiveConfigAction$4.propertyChange(ActiveConfigAction.java:175)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.doSetActiveConfiguration(M2ConfigProvider.java:301)
	- locked <0x5ce2a068> (a org.netbeans.modules.maven.configurations.M2ConfigProvider)
	at org.netbeans.modules.maven.configurations.M2ConfigProvider.setActiveConfiguration(M2ConfigProvider.java:292)
	- locked <0x5ce2a068> (a org.netbeans.modules.maven.configurations.M2ConfigProvider)
	at org.netbeans.modules.maven.customizer.CustomizerProviderImpl.writeAll(CustomizerProviderImpl.java:366)
	at org.netbeans.modules.maven.spi.customizer.ModelHandleUtils.writeModelHandle(ModelHandleUtils.java:96)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.removeNetbeansDeployFromActionMappings(ExecutionChecker.java:311)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.showServerSelectionDialog(ExecutionChecker.java:245)
	at org.netbeans.modules.maven.j2ee.ExecutionChecker.checkRunConfig(ExecutionChecker.java:262)
	at org.netbeans.modules.maven.execute.PrereqCheckerMerger$Impl.checkRunConfig(PrereqCheckerMerger.java:83)
	at org.netbeans.modules.maven.api.execute.RunUtils.run(RunUtils.java:86)
	at org.netbeans.modules.maven.ActionProviderImpl.invokeAction(ActionProviderImpl.java:233)
	at org.netbeans.modules.maven.ActionProviderImpl$1.run(ActionProviderImpl.java:206)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 2 Jesse Glick 2011-08-16 13:54:29 UTC
Note that to make jetty:run actually do anything, I had to add:

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>8.0.0.M3</version>
            </plugin>
Comment 3 Jesse Glick 2011-08-16 14:04:35 UTC
core-main #c39840edadec
Comment 4 Quality Engineering 2011-08-17 13:52:50 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/c39840edadec
User: Jesse Glick <jglick@netbeans.org>
Log: #200982: deadlock between M2ConfigProvider and MavenSourcesImpl
Comment 5 Jesse Glick 2011-08-19 15:55:19 UTC
Additional verification from dev build users, and/or code reviews, would be welcomed.
Comment 6 David Konecny 2011-08-22 20:24:05 UTC
I had a look at the diff and it looks good but it changes synchronization so it is impossible for me to say that change is safe and correct.
Comment 7 _ gtzabari 2011-08-23 00:20:51 UTC
I've been using the dev build for two days now without any problems. If I don't report any problems by the end of the week I would assume we're reasonably safe.
Comment 8 Jesse Glick 2011-08-25 15:11:41 UTC
releases #dcfae2b6f5ec
Comment 9 Quality Engineering 2011-08-26 04:26:45 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/dcfae2b6f5ec
User: Jesse Glick <jglick@netbeans.org>
Log: #200982: deadlock between M2ConfigProvider and MavenSourcesImpl
(transplanted from c39840edadec348c228a5c857017f709e958f897)
Comment 10 Quality Engineering 2011-09-26 13:29:44 UTC
Integrated into 'releases'
Changeset: http://hg.netbeans.org/releases/rev/bae7aefdc693
User: Jesse Glick <jglick@netbeans.org>
Log: #200982: deadlock between M2ConfigProvider and MavenSourcesImpl
(transplanted from c39840edadec348c228a5c857017f709e958f897)


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