Object.clone()

11 views
Skip to first unread message

Peter

unread,
Nov 15, 2010, 10:55:15 AM11/15/10
to Deuce-STM
I am having trouble with the Object.clone() method while using Deuce
STM. My code is taking an array that is immutable and trying to make a
copy of it to a mutable version, though when I call the clone method
I've gotten two different errors.

The first error is a JVM crash:
java -javaagent:deuceAgent.jar -cp bin/ hashmapbenchmark.Main
AtomicPersistentHashMap 0 1 16384
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007fdf3d9ce6f4, pid=19406,
tid=140596810057488
#
# JRE version: 6.0_18-b18
# Java VM: OpenJDK 64-Bit Server VM (16.0-b13 mixed mode linux-amd64 )
# Derivative: IcedTea6 1.8.1
# Distribution: Ubuntu 10.04 LTS, package 6b18-1.8.1-0ubuntu1
# Problematic frame:
# V [libjvm.so+0x3c26f4]
#
# An error report file with more information is saved as:
# /home/users/pdimarco/HashMapBenchmark/hs_err_pid19406.log
#
# If you would like to submit a bug report, please include
# instructions how to reproduce the bug and visit:
# https://bugs.launchpad.net/ubuntu/+source/openjdk-6/
#
Aborted

The second is a NoSuchMethodError:
java -javaagent:deuceAgent.jar -cp bin/ hashmapbenchmark.Main
AtomicPersistentHashMap 0 1 16384
Exception in thread "main" java.lang.NoSuchMethodError:
[Ljava.lang.Object;.clone(Lorg/deuce/transaction/Context;)Ljava/lang/
Object;
at hashmapbenchmark.AtomicPersistentHashMap
$INode.cloneAndSet(AtomicPersistentHashMap.java:82)
at hashmapbenchmark.AtomicPersistentHashMap
$BitmapIndexedNode.put(AtomicPersistentHashMap.java:226)
at
hashmapbenchmark.AtomicPersistentHashMap.put(AtomicPersistentHashMap.java:
29)
at
hashmapbenchmark.AtomicPersistentHashMap.put(AtomicPersistentHashMap.java)
at hashmapbenchmark.Main.main(Main.java:48)

The second error lead me to the Object.clone() function as the root of
this problem. So I tried debugging it on another machine only to see
this:
Invalid memory access of location 0x3000000020 rip=0x1010b508b

So to avoid using the clone operation, I did a manual copy, which
seems to allievate the problem. But I figured I'd post this since I
did not see any related posts on the forums.

Guy Korland

unread,
Nov 17, 2010, 6:07:15 AM11/17/10
to deuce-stm
The problem is that Object class is part of the rt.jar that is loaded as part of the bootclasspath.
So this class is not instrumented by Deuce javaagent.
To over come this limitation you need to instrument the rt.jar or at least the Object.class offline (see Doc for more info).

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.


Reply all
Reply to author
Forward
0 new messages