Possible instrumentation problem with DeuceSTM

24 views
Skip to first unread message

Oliver Plohmann

unread,
Aug 28, 2012, 11:06:04 AM8/28/12
to deuce-stm-...@googlegroups.com
I have a little problem using DeuceSTM. I spent quite a while finding the problem myself in order not to bother you. Finally, I'd be glad if you could spare a little time to look into the issue.

It's about a getter method returning null although the instance variable it returns is not null. The problem does not occur when my jars are not instrumented. The current workaround I apply is to call the getter in a loop as long as it no longer returns null. Made me think whether it's some cashing problem.

I have uploaded my little project onto my homepage:

www.objectscape.org/candide/message_getid_null.html

There you can find a more detailed description of the problem and the project files (several maven modules) including build file and everything to reproduce the problem. It may look like a lot of code and hence a lot of work, but I have a test case you only need to run to see the problem. This should make things quite effortless for you to get into the issue, I hope ;-).

My DeuceSTM application is a system that provides distributed transactional maps (much like Hazelcast), but uses DeuceSTM to implement a lock-free and deadlock-free thread-safe solution. Thanks a lot if you could have a look into the issue :-). Please, let me know in case you have any problems or need more information.

Kind regards, Oliver Plohmann

Guy Korland

unread,
Sep 20, 2012, 5:16:12 PM9/20/12
to deuce-stm-...@googlegroups.com
Hi Guy,

here I am again with another little DeuceSTM issue ;-). This time it involves much less code than the last time (7 simple classes only) and is easy to reproduce. I've upload the code to my homepage: http://www.objectscape.org/candide-standalone.zip. The zip contains a little ant script named build.xml. You only need to run it and then you can see the problem:


     [java] Exception in thread "Thread-4" java.lang.NullPointerException
     [java]     at org.objectscape.candide.standalone.CandideMap.get(CandideMap.java:116)
     [java]     at org.objectscape.candide.standalone.test.CandideStandaloneTest$3.run(CandideStandaloneTest.java:182)
     [java]     at org.objectscape.candide.standalone.test.CandideStandaloneTest$3.run(CandideStandaloneTest.java)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Exception in thread "Thread-3" java.lang.NullPointerException
     [java]     at org.objectscape.candide.standalone.CandideMap.get(CandideMap.java:116)
     [java]     at org.objectscape.candide.standalone.test.CandideStandaloneTest$2.run(CandideStandaloneTest.java:142)
     [java]     at org.objectscape.candide.standalone.test.CandideStandaloneTest$2.run(CandideStandaloneTest.java)
     [java]     at java.lang.Thread.run(Thread.java:619)


The point is that there is no reason for a NullPointerException. I wrote all involved variables and arguments to the console and they don't appear to be null. FastMap is also not to be blamed. If I replace it with HashMap, the NullPointerException still occurs. However, if I don't instrument the standalone-test.jar, the problem disappears. You can turn off instrumentation to verify this by including the non-instrumented standalone-test.jar instead of the inst_standalone-test.jar in build.xml at the target "runTestCases".

I'd be thankful if you could have a look into the case.
Thanks a lot, Oliver Plohmann
Reply all
Reply to author
Forward
0 new messages