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 11177 - Deadlock from deleting directories; XMLDataObject involved?
Summary: Deadlock from deleting directories; XMLDataObject involved?
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-04-07 18:20 UTC by Jesse Glick
Modified: 2008-12-22 15:59 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Deadlock thread dump (6.03 KB, text/plain)
2001-04-07 18:20 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-04-07 18:20:19 UTC
[release32 apr 6] Deadlock occurred after trying to delete two
directories from Filesystems tab. Said "yes" to delete prompt, and
then the IDE froze. IMHO it should be forbidden for XMLDataObject to
wait for some task in its getCookie method. If the task is not done,
it should return null (or something else) and when the task finishes,
fire PROP_COOKIES. (The folders were deleted correctly BTW.)

Just guessing at the cause of the deadlock however; not clear what the parsing
task is waiting for when it blocked.
Comment 1 Jesse Glick 2001-04-07 18:20:40 UTC
Created attachment 1041 [details]
Deadlock thread dump
Comment 2 Jaroslav Tulach 2001-04-09 12:27:21 UTC
Somebody tell me what is the XMLDataObject.getCookie waiting for!? There is no
request processor that tries to process something!!!
Comment 3 _ pkuzel 2001-04-09 12:54:55 UTC
Under ordinary conditions it waits for a task posted at "XMLDataObject/parser"
RP. However the question is left open. It seems as some nasty race condition in
RequestProcessor.Task.
Comment 4 _ pkuzel 2001-04-09 17:53:05 UTC
I see the only problem. Is it legal to wait for unscheduled task? I suppose so. 
I call unscheduled task even cancelled one. In handleDelete I perform:

  if (infoTask.cancel() == false) {    // we catch it in queue
    infoTask.waitFinished();         // too late wait for finnish
  }

What about RequestProcessor.Task.waitFinishedImpl(), there is way that bypasses
check for canceled task, is not it? Then it can not be notified about finished
since it is already removed from RP queue so its run() is never called.
Comment 5 Jaroslav Tulach 2001-04-10 15:07:01 UTC
Fixed in main trunk. RequestProcessor rev. 1.45.
Comment 6 Jaroslav Tulach 2001-04-11 09:14:06 UTC
Reopened to be fixed.
Comment 7 Jaroslav Tulach 2001-04-11 09:15:03 UTC
Integrated into release32.
Comment 8 Jan Chalupa 2001-05-06 08:22:48 UTC
Target milestone -> 3.2
Comment 9 Quality Engineering 2003-07-01 16:01:20 UTC
Resolved for 3.4.x or earlier, no new info since then -> verified
Comment 10 Quality Engineering 2003-07-01 16:20:56 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.