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 227998 - Deadlock while selecting <c:choose> in JSP
Summary: Deadlock while selecting <c:choose> in JSP
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.4
Hardware: PC Linux
: P3 normal (vote)
Assignee: Miloslav Metelka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-27 13:29 UTC by Vladimir Riha
Modified: 2014-07-29 12:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
1st threadump (35.24 KB, application/octet-stream)
2013-03-27 13:29 UTC, Vladimir Riha
Details
2nd threadump (34.47 KB, application/octet-stream)
2013-03-27 13:30 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2013-03-27 13:29:58 UTC
Created attachment 133132 [details]
1st threadump

I simply selected text between <c:choose>...</c:choose> and IDE froze. I'm attaching 2 thread dumps taken in interval of approx 15 minutes.

I can't reproduce it.

Product Version: NetBeans IDE Dev (Build web-main-10182-on-20130327)
Java: 1.7.0_17; Java HotSpot(TM) Client VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b32
System: Linux version 3.2.0-39-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2013-03-27 13:30:18 UTC
Created attachment 133133 [details]
2nd threadump
Comment 2 Marek Fukala 2014-07-29 09:10:45 UTC
I must admit I do not know hot the lock happened. 

The EDT is blocked by JspKit$JspDeleteCharAction waiting for the document' write lock,

while AnnotationHolder thread tries to acquire the DocumentView's PriorityMutex lock. Who has the PM locked I can't figure out.

Milo, can you please take a look at the thread dump? Thank you.
Comment 3 Marek Fukala 2014-07-29 09:11:54 UTC
> while AnnotationHolder thread tries to acquire the DocumentView's
> PriorityMutex lock.

forgot to mention it tries to acquire the PM under the document's read lock, which blocks the EDT.
Comment 4 Miloslav Metelka 2014-07-29 12:47:10 UTC
> Milo, can you please take a look at the thread dump? Thank you.
Same question as Marek - who owns the PriorityMutex?
Vlado, please run the IDE with

-J-Dorg.netbeans.lib.editor.util.PriorityMutex.level=FINEST

It should log who's the owning thread and the locking stacktrace.
Since it's a one year old issue I close as worksforme please reopen if necessary.