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 51898 - failure in ChildrenKeysIssue30907Test
Summary: failure in ChildrenKeysIssue30907Test
Status: CLOSED DUPLICATE of bug 50308
Alias: None
Product: platform
Classification: Unclassified
Component: Nodes (show other bugs)
Version: 4.x
Hardware: Sun Solaris
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2004-11-29 09:34 UTC by pzajac
Modified: 2008-12-22 23:40 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
test's log (17.59 KB, text/plain)
2004-11-29 09:34 UTC, pzajac
Details
Better failure is here (6.61 KB, text/plain)
2005-02-08 09:38 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pzajac 2004-11-29 09:34:34 UTC
[200411281900][1.5.0_01]

testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907QuickAddNotifyWithReadAccess:

      junit.framework.AssertionFailedError: Two
children there even in the initialization thread
expected:<2> but was:<0>
RMV - 2 [0]->[0]
org.openide.nodes.FilterNode$PropertyChangeAdapter@30c221
RMV - 1 [0]->[0]
org.openide.nodes.FilterNode$PropertyChangeAdapter@f72617
setEntries for
org.openide.nodes.FilterNode$Children@5224ee on
Thread[Finalizer,8,system]
       values:
[org.openide.nodes.Children$Array$AE@f6a746]
       holder:
org.openide.nodes.ChildrenArray@187aeca 
org.openide.nodes.FilterNode$Children@5224ee
 children are here for
org.openide.nodes.FilterNode$Children@5224ee on
Thread[Finalizer,8,system] children
org.openide.nodes.FilterNode$Children@5224ee
 children are here for
org.openide.nodes.FilterNode$Children@5224ee on
Thread[Finalizer,8,system] children
org.openide.nodes.FilterNode$Children@5224ee
 children are here for
org.openide.nodes.FilterNode$Children@5224ee on
Thread[Finalizer,8,system] children
org.openide.nodes.FilterNode$Children@5224ee
RMV -  [0]->[0]
org.openide.nodes.FilterNode$PropertyChangeAdapter@4f1d0d
setEntries for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main]
       values:
[org.openide.nodes.Children$Array$AE@dc8569]
       holder: null
setEntries for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main]
       values:
[org.openide.nodes.Children$Array$AE@c3c749]
       holder: null
Initialize
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main]
Initialize
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main]
addNotify successfully called for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main]
notifyAll for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main]
cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] read access: true
initThread: null
cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] read access: true
initThread: null
addNotify successfully called for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main]
notifyAll for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main]
 children are here for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main]
children org.openide.nodes.FilterNode$Children@1bab50a
cannot initialize better
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main]
read access: true initThread: null
 children are here for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main]
children org.openide.nodes.FilterNode$Children@1bab50a
cannot initialize better
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main] read access: true initThread: null
cannot initialize better
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main] read access: true initThread: null
setEntries for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main]
       values: [Key (1, 0), Key (2, 0),
org.openide.nodes.Children$Array$AE@dc8569]
       holder:
org.openide.nodes.ChildrenArray@4a5ab2 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
 children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
 children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
 children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] read access: true
initThread: null
cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] read access: true
initThread: null
cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] read access: true
initThread: null
 children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
on Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@1fc4bec
setEntries for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main]
       values: [Key
(org.openide.nodes.AbstractNode@e53108[Name=1,
displayName=1], 0), Key
(org.openide.nodes.AbstractNode@f62373[Name=2,
displayName=2], 0),
org.openide.nodes.Children$Array$AE@c3c749]
       holder:
org.openide.nodes.ChildrenArray@19189e1 
org.openide.nodes.FilterNode$Children@1bab50a
 children are here for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main] children
org.openide.nodes.FilterNode$Children@1bab50a
 children are here for
org.openide.nodes.FilterNode$Children@1bab50a on
Thread[main,5,main] children
org.openide.nodes.FilterNode$Children@1bab50a
Comment 1 pzajac 2004-11-29 09:34:58 UTC
Created attachment 19063 [details]
test's log
Comment 2 Jaroslav Tulach 2004-12-03 14:09:29 UTC
I am not able to analyze what is going on in the failed test. I know
that it is different than in successful case, but I am not capable to
grasp it all. Thus I have improved logging in the test and next time I
will try a bit harder:

openide/test/unit/src/org/openide/nodes/ChildrenKeysIssue30907Test.java,v
 <--  ChildrenKeysIssue30907Test.java
new revision: 1.3;
Comment 3 Petr Nejedly 2005-01-19 10:01:36 UTC
Happened again, the log was:
Two children there even in the initialization thread expected:<2> but
was:<0>
setEntries for org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569
on Thread[main,5,main] values:
[org.openide.nodes.Children$Array$AE@1bab50a] holder: null setEntries
for org.openide.nodes.FilterNode$Children@c3c749 on
Thread[main,5,main] values:
[org.openide.nodes.Children$Array$AE@150bd4d] holder: null Main:
Before read access Main: In read access Main: Starting the thread
Main: Calling getNodes() Initialize
org.openide.nodes.FilterNode$Children@c3c749 on Thread[main,5,main]
Initialize org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] set keys: [1, 2] by main end of keys by main
addNotify successfully called for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] notifyAll for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] cannot initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] read access: true initThread: null cannot
initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] read access: true initThread: null addNotify
successfully called for org.openide.nodes.FilterNode$Children@c3c749
on Thread[main,5,main] notifyAll for
org.openide.nodes.FilterNode$Children@c3c749 on Thread[main,5,main]
cannot initialize better org.openide.nodes.FilterNode$Children@c3c749
on Thread[main,5,main] read access: true initThread: null Run:
computing nodes children are here for
org.openide.nodes.FilterNode$Children@c3c749 on
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main]
children org.openide.nodes.FilterNode$Children@c3c749 Run: nodes
computed cannot initialize better
org.openide.nodes.FilterNode$Children@c3c749 on Thread[main,5,main]
read access: true initThread: null Main: getNodes() finished Main:
before exitReadAccess setEntries for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] values: [Key (1, 0), Key (2, 0),
org.openide.nodes.Children$Array$AE@1bab50a] holder:
org.openide.nodes.ChildrenArray@1888759
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 children are
here for org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 creating node:
1 by thread: main children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 creating node:
2 by thread: main children are here for
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 cannot
initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] read access: true initThread: null cannot
initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] read access: true initThread: null cannot
initialize better
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] read access: true initThread: null children are
here for org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 on
Thread[main,5,main] children
org.openide.nodes.ChildrenKeysIssue30907Test$2K@dc8569 setEntries for
org.openide.nodes.FilterNode$Children@c3c749 on Thread[main,5,main]
values: [Key (org.openide.nodes.AbstractNode@f62373[Name=1,
displayName=1], 0), Key
(org.openide.nodes.AbstractNode@19189e1[Name=2, displayName=2], 0),
org.openide.nodes.Children$Array$AE@150bd4d] holder:
org.openide.nodes.ChildrenArray@1f33675
org.openide.nodes.FilterNode$Children@c3c749 children are here for
org.openide.nodes.FilterNode$Children@c3c749 on Thread[main,5,main]
children org.openide.nodes.FilterNode$Children@c3c749 children are
here for org.openide.nodes.FilterNode$Children@c3c749 on
Thread[main,5,main] children
org.openide.nodes.FilterNode$Children@c3c749 Main: after
exitReadAccess Main: wait for N1 two Run: Notifying others to run Run:
Assigning result: [] Main: wait for N1 two finished
Comment 4 Jaroslav Tulach 2005-01-22 16:50:55 UTC
cvs -q ci -m "#51898: Another improvement to debugging logs. Will fail
again, but in better way."
Checking in unit/src/org/openide/nodes/ChildrenKeysIssue30907Test.java;
/cvs/openide/test/unit/src/org/openide/nodes/ChildrenKeysIssue30907Test.java,v
 <--  ChildrenKeysIssue30907Test.java
new revision: 1.5; previous revision: 1.4
Comment 5 Jaroslav Tulach 2005-02-08 09:38:13 UTC
Created attachment 20241 [details]
Better failure is here
Comment 6 Jaroslav Tulach 2005-02-09 09:36:12 UTC
Better failure needs new evaluation.
Comment 7 Jaroslav Tulach 2005-02-11 09:58:14 UTC
cvs ci -m "#51898: The random failures are caused by the fact that the
changes made in one thread are visible to other threads before they
get notified. This fix tries to prevent that, but as I have not
succeed in reproducing the bug, I cannot guarantee it will be enough.
If not, we will need to make the result of arr.children assignment to
be visible just to the initThread until the notification happens
(notifications ensures that setKeys has been executed)" 
openide/src/org/openide/nodes/Children.java
Checking in openide/src/org/openide/nodes/Children.java;
/cvs/openide/src/org/openide/nodes/Children.java,v  <--  Children.java
new revision: 1.131; previous revision: 1.130
Comment 8 pzajac 2005-03-16 15:41:32 UTC
v
Comment 9 Jaroslav Tulach 2005-05-06 10:05:44 UTC
 
testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907QuickAddNotifyWithReadAccess: 
  
      junit.framework.AssertionFailedError: Two children there even in the 
initialization thread expected:<2> but was:<0> 
setEntries for org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on 
Thread[main,5,main] 
       values: [org.openide.nodes.Children$Array$AE@1f33675] 
       holder: null 
setEntries for org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] 
       values: [org.openide.nodes.Children$Array$AE@1690726] 
       holder: null 
Main: Before read access 
Main: In read access 
Main: Starting the thread 
Main: Calling getNodes() 
Initialize org.openide.nodes.FilterNode$Children@7c6768 on Thread[main,5,main] 
Initialize org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on 
Thread[main,5,main] 
  set keys: [1, 2] by main 
  end of keys by main 
addNotify successfully called for 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
notifyAll for org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on 
Thread[main,5,main]  notifyLater: true 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: true initThread: Thread[main,5,main] 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: true initThread: Thread[main,5,main] 
addNotify successfully called for org.openide.nodes.FilterNode$Children@7c6768 
on Thread[main,5,main] 
notifyAll for org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main]  notifyLater: true 
Run: computing nodes 
 children are here for org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main] 
children org.openide.nodes.FilterNode$Children@7c6768 
cannot initialize better org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main] 
read access: true initThread: Thread[main,5,main] 
 children are here for org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[testProperInitializationEvenIfInvokedFromMultipleThreadsBug30907Thread,5,main] 
children org.openide.nodes.FilterNode$Children@7c6768 
Run: nodes computed[] 
cannot initialize better org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] read access: true initThread: Thread[main,5,main] 
cannot initialize better org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] read access: true initThread: Thread[main,5,main] 
Main: getNodes() finished: [] 
Main: before exitReadAccess 
setEntries for org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on 
Thread[main,5,main] 
       values: [Key (1, 0), Key (2, 0), 
org.openide.nodes.Children$Array$AE@1f33675] 
       holder: org.openide.nodes.ChildrenArray@1befab0  
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: false initThread: Thread[main,5,main] 
 creating node: 1 by thread: main 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: false initThread: Thread[main,5,main] 
 creating node: 2 by thread: main 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: false initThread: Thread[main,5,main] 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: true initThread: Thread[main,5,main] 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: true initThread: Thread[main,5,main] 
cannot initialize better 
org.openide.nodes.ChildrenKeysIssue30907Test$2K@19189e1 on Thread[main,5,main] 
read access: true initThread: Thread[main,5,main] 
setEntries for org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] 
       values: [Key (org.openide.nodes.AbstractNode@14b7453[Name=1, 
displayName=1], 0), Key (org.openide.nodes.AbstractNode@c21495[Name=2, 
displayName=2], 0), org.openide.nodes.Children$Array$AE@1690726] 
       holder: org.openide.nodes.ChildrenArray@1d5550d  
org.openide.nodes.FilterNode$Children@7c6768 
cannot initialize better org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] read access: false initThread: Thread[main,5,main] 
cannot initialize better org.openide.nodes.FilterNode$Children@7c6768 on 
Thread[main,5,main] read access: false initThread: Thread[main,5,main] 
Main: after exitReadAccess 
Main: wait for N1 two 
Run: Notifying others to run 
Run: Assigning result: [] 
Main: wait for N1 two finished 
 
 
Comment 10 Jaroslav Tulach 2005-05-11 10:59:28 UTC
Petr is now looking at the code and seems to have found few bugs in it.  
Comment 11 Jaroslav Tulach 2005-07-07 15:07:12 UTC
Anything new? 
Comment 12 Petr Nejedly 2005-07-07 16:19:31 UTC
Sorry, haven't worked on this for a while.
Anyway, the fix I was working on doesn't seem to fix this failure.
Comment 13 Jaroslav Tulach 2005-07-08 09:55:59 UTC
Ok, I'll take it then. 
Comment 14 Jaroslav Tulach 2005-07-08 16:00:12 UTC
Let's keep this failures under issue 50308 

*** This issue has been marked as a duplicate of 50308 ***
Comment 15 pzajac 2005-08-03 14:27:13 UTC
v