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 56890 - Fix for 56697 causes unacceptable race conditions
Summary: Fix for 56697 causes unacceptable race conditions
Status: CLOSED WORKSFORME
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-23 21:02 UTC by ivan
Modified: 2006-10-24 02:56 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2005-03-23 21:02:48 UTC
When I saw a CVS note by rondruska go by where the fix to 56697 was
to move debugger action dispatching from the AWT thread to a RP
I posted a note that this is a "bad idea". Now that I've aquired that
lates NB changes All of my stuff is broken. Here's how.

debugger core will call 'start' on the engine and then register 
modelview models. By moving actions to the RP 'start' is now
called "after" the modelview registrations because th RP usually
runs slower than the AWT thread where model registrations take place.

As a result I get NPE's because my engine is not yet ready to 
accept these model registrations.

----------------------------------------------------
- This is just an example why I thought moving stuff to the RP was a bad
  idea. IZ 56697 doesn't describe the actual deadlock loop, nor does it
  justify this drastic change, when the general idea is to move away from
  the RP. if you have a deadlock and should identify the most specific task
  that contributes to the deadlock loop to move to another thread.
- Please do _not_ move the model registrations to the RP. RP's use pools
  of equal priority threads and all sense of ordering of posted 
  jobs vanishes.
- This is tangentially related to IZ 50761, but this kind of asynchrony is 
  not what I had in mind :-)
Comment 1 ivan 2005-03-23 21:10:01 UTC
What I mean by "register modelview models" is TreeModel.addTreeModelListener()
being called. My debugger engine is the only object that
cares about these. I understand that a case could be made that
model registrations are not guaranteed to have any ordering wrt
the engine (Out of curiosity, what was the original intent in
this regard?) and that I just made an assumption. If so, 
- I"ll have add a bridge that allows for arbitrary ordering.
  I'd rather avoid that if possible.
- The broad move from AWT to RP is still troubling.
Comment 2 Roman Ondruska 2005-03-24 09:05:29 UTC
Ivan,

the change you are talking about was canceled in the main trunk (21/03/2005
commit). Do you have current version? 

Roman 
Comment 3 Roman Ondruska 2005-03-24 10:45:41 UTC
Ivan,

the change you are talking about was canceled in the main trunk (21/03/2005
commit). Do you have current version? 

Roman 
Comment 4 ivan 2005-03-26 01:57:45 UTC
Verified that things are back to normal after the backed up out change.