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 226036 - NetBeans frozen on JSP file run
Summary: NetBeans frozen on JSP file run
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Martin Fousek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-12 21:45 UTC by ecerichter
Modified: 2013-03-15 12:24 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (still the same after about 30 minutes) (195.00 KB, image/png)
2013-02-12 22:17 UTC, ecerichter
Details
messages.log (272.54 KB, application/octet-stream)
2013-02-12 22:21 UTC, ecerichter
Details
Thread dump after "Run file"... (35.94 KB, application/octet-stream)
2013-02-20 16:42 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-02-12 21:45:02 UTC
NetBeans 7.32 RC2
Windows 7 x64
Oracle Java JDK 7.0.13 x64

Steps executed before the crash:
1) Run application with Project -> Run (to run the web app normally)
2) Debug application with Project -> Debug (to stop tomcat and start again in debug mode)
3) After a while, use choose JSP file and click Run file

NetBeans is completely froze (see attached screenshot).

Attached is also:

- Message log;
- VisualVM application snapshot with heap dump and thread dump
- Screenshot of the error.
Comment 1 ecerichter 2013-02-12 22:17:56 UTC
Created attachment 131327 [details]
screenshot (still the same after about 30 minutes)
Comment 2 ecerichter 2013-02-12 22:19:23 UTC
Upload application snapshot (from VisualVM) in Hudson.
Comment 3 ecerichter 2013-02-12 22:21:31 UTC
Created attachment 131328 [details]
messages.log
Comment 4 Jiri Skrivanek 2013-02-13 08:20:36 UTC
Please, attach thread dump.
Comment 5 ecerichter 2013-02-13 14:39:19 UTC
It is on hudson, together with Application snapshot from VisualVM.

Regards,

Edson
Comment 6 ecerichter 2013-02-20 16:42:15 UTC
Created attachment 131627 [details]
Thread dump after "Run file"...

Just to be sure, this is Thread Dump after upgrading NB to DEV (post RC2).
Comment 7 Petr Jiricka 2013-02-22 17:39:50 UTC
Looking at the thread dump, could this be JSF related?
Comment 8 ecerichter 2013-02-22 17:46:45 UTC
(In reply to comment #7)
> Looking at the thread dump, could this be JSF related?

If you mean that page being JSF, no it is not. It is a simple plain JSP page with few <sql:...> and <c:...> standard tags.
Comment 9 ecerichter 2013-02-23 16:29:49 UTC
Increasing to P1 as per guidelines:

http://wiki.netbeans.org/BugPriorityGuidelines
Comment 10 Martin Fousek 2013-02-25 08:19:51 UTC
It looks that the deadlock was introduced by fix for issue #222135. ProgressUtils.showProgressDialogAndRun I used for running long-term actions which runs the Runnable in BG (other thread). This thread runs to the parsing lock but since it's already hold due to run action on the file by the first/original thread, it causes deadlock.

In other words, it looks to me that all calls into another thread will lead to this kind of deadlock - since it's broken condition of the same thread for the parsing reentrant lock. So no solution w/out the API change likely fix this issue.

David if you would agree, I would like to rollback changes for issue #222135 into nb73patch (slowdown is always better than deadlock). Then I would reopen #222135 - everything should be fixed by fixing bug #210214 into the next release. #invokeInBackground() looks irreplaceable here.
Comment 11 David Konecny 2013-02-25 19:49:27 UTC
(In reply to comment #10)
> In other words, it looks to me that all calls into another thread will lead to
> this kind of deadlock

Looks like that. If that's true though then we never tested it otherwise we would bump into the deadlock earlier.

> David if you would agree, I would like to rollback changes for issue #222135

That makes sense. Especially if your consider that issue 222135 is P3 with single slowdown report.

> into nb73patch (slowdown is always better than deadlock). Then I would reopen
> #222135 - everything should be fixed by fixing bug #210214 into the next

I've started working on 210214 for 7.3 but it is a lots of work so I put it on back burner again.
Comment 12 Martin Fousek 2013-02-25 20:04:18 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > In other words, it looks to me that all calls into another thread will lead to
> > this kind of deadlock
> 
> Looks like that. If that's true though then we never tested it otherwise we
> would bump into the deadlock earlier.

Actually it doesn't always lead to the deadlock. During the run must be started/running parsing inside the JSF. To be honest I wasn't able to reproduce that today, but probably I hadn't big project enough.
 
> > David if you would agree, I would like to rollback changes for issue #222135
> 
> That makes sense. Especially if your consider that issue 222135 is P3 with
> single slowdown report.
>
> > into nb73patch (slowdown is always better than deadlock). Then I would reopen
> > #222135 - everything should be fixed by fixing bug #210214 into the next
> 
> I've started working on 210214 for 7.3 but it is a lots of work so I put it on
> back burner again.

No problem, I understand. I would like just explain that it's short term solution and that there is no other way how to fix that than by the API change which is on the way. :)

Thanks for quick answer and your time.
Comment 13 Martin Fousek 2013-02-26 08:03:11 UTC
Fixed (backouted) in web-main #0a27b472bea3.
Comment 14 Quality Engineering 2013-02-27 16:12:42 UTC
Integrated into 'main-golden', will be available in build *201302270948* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0a27b472bea3
User: Martin Fousek <marfous@netbeans.org>
Log: #226036 - NetBeans frozen on JSP file run, backout of the 2046750f5fc1
Comment 15 Jiri Skrivanek 2013-02-28 09:05:11 UTC
For me it works in Dev (Build 201302272300). ecerichter, please verify in your environment.
Comment 16 ecerichter 2013-02-28 13:29:24 UTC
Yes, I can confirm the problem is not happening any more since 201302272300.
Comment 17 Martin Fousek 2013-03-11 14:58:02 UTC
Transplanted:
changeset:   255531:ff9beb128041
branch:      release73
summary:     #226036 - NetBeans frozen on JSP file run, backout of the 2046750f5fc1

changeset:   255532:ded9e5181ee5
branch:      release73
summary:     Spec.version and long description for #226036
Comment 18 Quality Engineering 2013-03-14 21:14:54 UTC
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/ff9beb128041
User: Martin Fousek <marfous@netbeans.org>
Log: #226036 - NetBeans frozen on JSP file run, backout of the 2046750f5fc1
(transplanted from 0a27b472bea30250d3c76950720e65323a22f2f8)