Information Loss with deuceAgent

12 views
Skip to first unread message

Peter

unread,
Nov 17, 2010, 1:41:06 PM11/17/10
to Deuce-STM
I noticed some NullPointerExceptions I was getting when using the
deuceAgent that I did not receive without the agent. The program I am
running is an implementation of Phil Bagwell's ideal hash tree in a
Persistent form. I pinpointed where the problem was. It has to do with
information being loss during a function that operates on immutable
and local data.

START

37773 19651
29088 54139 37773 19651
29088 54139 37773 19651 84563 25758
29088 54139 85034 82915 37773 19651 84563 25758
29088 54139 85034 82915 37773 19651 84563 25758 67380 28160
29088 54139 85034 82915 37773 19651 84563 25758 67380 28160 44922
3571
29088 54139 30631 82137 85034 82915 37773 19651 84563 25758 67380
28160 44922 3571
29088 54139 30631 82137 85034 82915 94859 37195 37773 19651 84563
25758 67380 28160 44922 3571
29088 54139 30631 82137 85034 82915 94859 37195 37773 19651 84563
25758 67380 28160 44922 3571 13983 28355
37773 19651
69997 11171 37773 19651
FINISH

In the output above, there is a construction of a key/value pair node.
Each line is a new construction of a key/value node printing its
contents. When the output shortens during the last two lines, it is a
new key/value pair node being created that is internal to the original
node. This is the output that I receive without using the deuce agent.
It should be noted that this part of my program is single threaded and
there is no worries of illegal states without some form of
synchronization. Now the output that follows is when I incorporate the
deuce agent into my program.

START

37773 19651
29088 54139 37773 19651
29088 54139 37773 19651 84563 25758
29088 54139 85034 82915 37773 19651 84563 25758
29088 54139 85034 82915 37773 19651 84563 25758 67380 28160
29088 54139 85034 82915 37773 19651 84563 25758 67380 28160 44922
3571
29088 54139 30631 82137 85034 82915 37773 19651 84563 25758 67380
28160 44922 3571
29088 54139 30631 82137 85034 82915 94859 37195 37773 19651 84563
25758 67380 28160 44922 3571
29088 54139 30631 82137 85034 82915 94859 37195 37773 19651 84563
25758 67380 28160 44922 3571 13983 28355
37773 19651
69997 11171 null null
FINISH

So during the redistribution of key/value pairs to a new node,
information is lost. I don't seem to have the ability to attach the
code in question, so upon request I'll send it. But the lines of code
where the problem occurs is as such:

INode newRoot = BitmapIndexedNode.EMPTY.put(shift, key1hash, key1,
val1, _);
newRoot = newRoot.put(shift, key2hash, key2, val2, _);
return newRoot;

Since the data structures is persistent, the put command returns a new
INode. As I stated before, this information is either local or
immutable. I know from my observations and the output above that the
put command is without errors. That is all the information that I have
at this time.

Guy Korland

unread,
Nov 19, 2010, 5:10:01 PM11/19/10
to deuce-stm
Can you attach the test case?

Regards,
Guy Korland



--
You received this message because you are subscribed to the Google Groups "Deuce-STM" group.
To post to this group, send email to deuc...@googlegroups.com.
To unsubscribe from this group, send email to deuce-stm+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/deuce-stm?hl=en.


Peter

unread,
Nov 20, 2010, 10:46:38 AM11/20/10
to Deuce-STM
Here is the link to the code: http://dl.dropbox.com/u/2113590/DeuceTest.zip

I removed the command line arguments and extracted only the necessary
code to replicate the problem. So to run the program is easy:

java (-javaagent:deuceAgent.jar) -cp bin/ deucetest.Main

So if you look in the AtomicPersistentHashMap.java file, the problem
code occurs at lines 100 and 101. If you run the entire test there is
just one more line of output, that is just the final creation of the
tree with the new internal node, the node with information lost. If
you have any further questions about the code, please let me know.
Thanks.
> > deuce-stm+...@googlegroups.com<deuce-stm%2Bunsubscribe@googlegroups .com>
> > .
Reply all
Reply to author
Forward
0 new messages