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 164930 - Deadlock when saving project properties
Summary: Deadlock when saving project properties
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P2 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords: THREAD
: 164865 165004 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-05-12 12:25 UTC by Jiri Skrivanek
Modified: 2011-12-12 13:19 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump. (32.08 KB, text/plain)
2009-05-12 12:26 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2009-05-12 12:25:48 UTC
Deadlock appeared while saving project properties. To reproduce:

- create a new java project
- run main class (Shift+F6)
- open project properties on project node
- uncheck Compile on Save in Build/Compiling
- click OK and IDE freezes

Product Version: NetBeans IDE Dev (Build 200905120201)
Java: 1.6.0_13; Java HotSpot(TM) Client VM 11.3-b02
System: Windows Vista version 6.0 running on x86; Cp1250; cs_CZ (nb)
Comment 1 Jiri Skrivanek 2009-05-12 12:26:24 UTC
Created attachment 81953 [details]
Thread dump.
Comment 2 Jiri Skrivanek 2009-05-12 12:42:30 UTC
Fixed but I am not sure whether there is no deeper reason of this issue.
http://hg.netbeans.org/core-main/rev/685c52edaba2
Comment 3 Milan Kubec 2009-05-12 14:09:56 UTC
*** Issue 164865 has been marked as a duplicate of this issue. ***
Comment 4 Quality Engineering 2009-05-13 07:40:13 UTC
Integrated into 'main-golden', will be available in build *200905130201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/685c52edaba2
User: Jiri Skrivanek <jskrivanek@netbeans.org>
Log: #164930 - Ignore fileAttributeChanged event to prevent deadlock.
Comment 5 Jiri Skrivanek 2009-05-13 20:17:00 UTC
*** Issue 165004 has been marked as a duplicate of this issue. ***
Comment 6 Jesse Glick 2009-05-19 03:14:40 UTC
While the fix looks harmless and may solve this particular deadlock (otherwise I would reopen), I think the real issue
is here:

	at org.apache.tools.ant.module.api.support.ActionUtils.runTarget(ActionUtils.java:94)
	at org.netbeans.modules.java.j2seproject.J2SEActionProvider$4.run(J2SEActionProvider.java:463)
	at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(J2SEActionProvider.java:485)
	at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties$1.run(J2SEProjectProperties.java:435)
	at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties$1.run(J2SEProjectProperties.java:424)
	at org.openide.util.Mutex.writeAccess(Mutex.java:433)
	at org.netbeans.modules.java.j2seproject.ui.customizer.J2SEProjectProperties.save(J2SEProjectProperties.java:424)

It does not look wise to me to be running an Ant action from inside the PM write mutex. Whatever this is doing, can't it
be done asynchronously?
Comment 7 Jesse Glick 2009-05-19 03:16:52 UTC
Sorry, didn't mean to reopen without known symptoms.