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 229262 - Locked when expanding RESTful Web Services node
Summary: Locked when expanding RESTful Web Services node
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.3.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-02 08:37 UTC by Jiri Skrivanek
Modified: 2013-05-08 02:23 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump. (37.73 KB, text/plain)
2013-05-02 08:37 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2013-05-02 08:37:18 UTC
Created attachment 134026 [details]
Thread dump.

Children of RESTful Web Services node are not show but the "Please wait" node is shown forever. To reproduce:

- create web project (GlassFish 4, Java EE 7)
- open new file wizard
- choose "Web Services|RESTful Web Services from Database" and click Next
- select jdbc/sample data source
- add all 7 tables
- click Next
- provide valid package name and click Next
- deploy project
- expand RESTful Web Services node but it shows only "Please wait" node forever (see thread dump)

   Locked ownable synchronizers:
	- <0x00000000d2bc0a28> (a java.util.concurrent.locks.ReentrantLock$FairSync)
	- <0x00000000d2bc0b70> (a java.util.concurrent.ThreadPoolExecutor$Worker)

Product Version: NetBeans IDE Dev (Build web-main-javaee7-277-on-20130502)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)
Comment 1 David Konecny 2013-05-02 22:56:55 UTC
This is a variation of the same problem as issue 228732 - RestScanTask which provides some error hints causes deadlock. When I fixed 228732 I tried to be conservative and changed runReadActionWhenReady into runReadAction only in single place but this new deadlock shows exactly the same problem just in different branch of the code which again uses runReadActionWhenReady.

This time I'm going to be more radical and I'm changing directly the method in RestSupport to always call runReadAction which is blocking call instead of runReadActionWhenReady. On the other hand RestSupport always called runReadActionWhenReady(...).get() which is blocking too so there should be no changes. We will see in reality whether there are some side effects or not. I cannot guarantee anything here as RestSupport.getRestApplications() is called from many places.

b8f6185b1811
Comment 2 Quality Engineering 2013-05-07 00:18:46 UTC
Integrated into 'releases', will be available in build *201305062200* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/b8f6185b1811
User: David Konecny <dkonecny@netbeans.org>
Log: #229262 - Locked when expanding RESTful Web Services node
Comment 3 Quality Engineering 2013-05-08 02:23:32 UTC
Integrated into 'main-golden', will be available in build *201305072300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4d38ac3cf282
User: David Konecny <dkonecny@netbeans.org>
Log: #229262 - Locked when expanding RESTful Web Services node