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 97454 - Deadlock in org.netbeans.editor.Settings.getValue
Summary: Deadlock in org.netbeans.editor.Settings.getValue
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 6.x
Hardware: PC Linux
: P1 blocker (vote)
Assignee: Vitezslav Stejskal
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-08 09:56 UTC by mslama
Modified: 2007-11-05 13:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (21.19 KB, text/plain)
2007-03-08 09:57 UTC, mslama
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mslama 2007-03-08 09:56:20 UTC
>Log Session: Thursday, March 8, 2007 10:35:23 AM CET
>System Info:
  Product Version         = NetBeans IDE Dev (Build 070306)
  Operating System        = Linux version 2.6.19-1.2288.fc5 running on i386
  Java; VM; Vendor; Home  = 1.7.0-ea; Java HotSpot(TM) Client VM 1.7.0-ea-b08;
Sun Microsystems Inc.; /usr/java/jdk1.7.0/jre
  System Locale; Encoding = en_US (nb); UTF-8

P1 as it leads to dataloss. (You can adjust priority as appropriate.) It is my
own fresh build from CVS sources. It happenned when I tried to open document
(Bundle.properties). I will attach thread dump.
Comment 1 mslama 2007-03-08 09:57:00 UTC
Created attachment 39294 [details]
Thread dump
Comment 2 Miloslav Metelka 2007-03-08 11:14:24 UTC
I don't understand why the following thread is shown in Object.wait() while its
state is RUNNABLE:

"org.netbeans.editor.Settings.PROCESSOR" daemon prio=10 tid=0x09b73c00
nid=0x1635 in Object.wait() [0xb46d7000..0xb46d7e30]
   java.lang.Thread.State: RUNNABLE
org.netbeans.modules.editor.java.Utilities$SettingsListener.settingsChange(Utilities.java:362)

If the thread would really be runnable it could eventually exit the
o.n.e.Settings monitor which should release the other threads waiting for it.

Marku, did it happen just once or several times? Could you possibly attach
another thread dump if it reappears? Thanks.
Marking as incomplete for now.
Comment 3 Miloslav Metelka 2007-03-08 11:30:16 UTC
OK, maybe I now understand, the other thread

"Java Source Worker Thread" prio=10 tid=0x09ce4400 nid=0x15ac waiting for
monitor entry [0xb53eb000..0xb53ebdb0]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at org.netbeans.editor.Settings.getValue(Settings.java:327)
        - waiting to lock <0x8a9f43f8> (a java.lang.Class for
org.netbeans.editor.Settings)
        at org.netbeans.editor.Settings.getValue(Settings.java:314)
        at org.netbeans.editor.SettingsUtil.getBoolean(SettingsUtil.java:141)
        at org.netbeans.editor.SettingsUtil.getBoolean(SettingsUtil.java:147)
        at org.netbeans.modules.editor.java.Utilities.<clinit>(Utilities.java:61)

is in class init of the Utilities class, so the other threads accessing the
Utilities class should be blocked until the class init is finished.
Comment 4 Miloslav Metelka 2007-03-08 11:51:44 UTC
Should be fixed (there is no more the static initializer):
Checking in Utilities.java;
/cvs/java/editor/src/org/netbeans/modules/editor/java/Utilities.java,v  <-- 
Utilities.java
new revision: 1.20; previous revision: 1.19