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 234791 - Locking: lengthy operation in process never ends
Summary: Locking: lengthy operation in process never ends
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.4
Hardware: PC Linux
: P2 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
: 234777 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-22 12:52 UTC by Ondrej Vrabec
Modified: 2013-08-30 06:28 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (396.04 KB, text/plain)
2013-08-22 12:53 UTC, Ondrej Vrabec
Details
screenshot (94.12 KB, image/png)
2013-08-22 12:53 UTC, Ondrej Vrabec
Details
thread dump (31.84 KB, text/plain)
2013-08-22 12:54 UTC, Ondrej Vrabec
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2013-08-22 12:52:52 UTC
Product Version = NetBeans IDE Dev (Build 20130822-ef42cf2d3fa3)
Operating System = Linux version 3.7.10-1.16-desktop running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

Almost every time i start typing into editor a dialog opens but it's never shut down unless i click on Cancel. Note that it happens while i am debugging another NetBeans session.
Comment 1 Ondrej Vrabec 2013-08-22 12:53:02 UTC
Created attachment 139062 [details]
IDE log
Comment 2 Ondrej Vrabec 2013-08-22 12:53:36 UTC
Created attachment 139063 [details]
screenshot
Comment 3 Ondrej Vrabec 2013-08-22 12:54:06 UTC
Created attachment 139064 [details]
thread dump
Comment 4 Miloslav Metelka 2013-08-22 14:22:08 UTC
Although it is caused by my recent fix of issue #228991 it would not happen without Jarda's fix of long running FO.takeLock() in issue #207611 from Jun 18 by rescheduling DataEditorSupport.Env.markModified() into ProgressUtils.

Rescheduling into ProgressUtils is very dangerous approach that may easily lead to deadlocks because all the monitors that the original thread has locked must NEVER be acquired by the ProgressUtils thread otherwise the two threads will lock forever. So the code that normally passed before will deadlock just because of ProgressUtils rescheduling especially in cases like this when there are various listeners called that attempt to acquire various locks - in this case

debugger.jpda.projects.LineTranslations$Registry.register(LineTranslations.java:376)

I would vote for rollback of fix #207611 but I understand that taking a file lock should be avoided in EDT so I'll try to find a fix that would satisfy both the progressutils rescheduling and would not cause the original deadlock #228991.
Comment 5 Miloslav Metelka 2013-08-23 11:29:44 UTC
http://hg.netbeans.org/jet-main/rev/eb3284d7cede
Comment 6 Martin Entlicher 2013-08-30 06:28:45 UTC
*** Bug 234777 has been marked as a duplicate of this bug. ***