Skip to main content

phoneME Advanced exit abnormally on mips.

5 replies [Last post]
sherikekele
Offline
Joined: 2010-05-06
Points: 0

Hi All,

Recently I'm working on the phoneME Advanced. My phoneME Advanced source code version is phoneme_advanced-mr2-dev-b164.
I use the following build options:

make \
J2ME_CLASSLIB=cdc \
CVM_JIT=false \
CVM_OPTIMIZED=false \
CVM_BUILD_SUBDIR_NAME=cdc-fp \
JDK_HOME=/usr/local/lib/jdk1.6.0_20 \
CVM_TARGET_TOOLS_PREFIX=/opt/cross-mips-sx/usr/bin/mips24k-linux- \
CVM_PRELOAD_SET=libtestfull \
CVM_JVMTI=true \
CVM_DEBUG=true \
USE_DEBUG=true \
CVM_SYMBOLS=true \
CVM_DEBUG_STACKTRACES=true \
CVM_DEBUG_DUMPSTACK=true \
CVM_TRACE=true

When run cvm on the platform, the cvm exited abnormally. I have stucked here for several days, can anyone help me? Thanks in advance.
Following is the log message I got.

CVM Configuration:
Java stack chunk size (stackChunkSize): 1024
Java stack minimum size (stackMinSize): 1024
Java stack maximum size (stackMaxSize): 131072
GC[SS]: Initialized semi-space gen for generational GC
Size of *each* semispace in bytes=1048576
Limits of generation = [0x2ab92000,0x2ad92000)
First semispace = [0x2ab92000,0x2ac92000)
Second semispace = [0x2ac92000,0x2ad92000)
Current semispace = First semispace
GC[MC]: Initialized mark-compact gen for generational GC
Size of the space in bytes=1048576
Limits of generation = [0x2ad92000,0x2ae92000)
GC[generational]: Sizes
youngGen = min 1048576 start 1048576 max 1048576
oldGen = min 1048576 start 1048576 max 4194304
overall = min 2097152 start 2097152 max 5242880
GC[generational]: Auxiliary data structures
heapBaseMemoryArea=[0x2ab92000,0x2b192000)
cardTable=[0x2b192000,0x2b195000)
objectHeaderTable=[0x2b195000,0x2b198000)
summaryTable=[0x2b198000,0x2b1a4000)
CVMjniExceptionDescribe failed: couldn't print stack trace.
Using brute force method to print stack trace.
java.lang.NoClassDefFoundError: java.lang.ref.Reference
at java.lang.Class.runStaticInitializers()V(Class.java:1618)
at java.lang.Class.runStaticInitializers()V(Class.java:1629)
at sun.io.Converters.cache(ILjava/lang/Object;Ljava/lang/Class;)Ljava/lang/Class;(Converters.java:119)
at sun.io.Converters.getDefaultConverterClass(I)Ljava/lang/Class;(Converters.java:299)
at sun.io.Converters.newDefaultConverter(I)Ljava/lang/Object;(Converters.java:323)
at sun.io.CharToByteConverter.getDefault()Lsun/io/CharToByteConverter;(CharToByteConverter.java:72)
at java.io.OutputStreamWriter.(Ljava/io/OutputStream;)V(OutputStreamWriter.java:114)
at java.io.PrintStream.(Ljava/io/OutputStream;Z)V(PrintStream.java:113)
at java.lang.System.initializeSystemClass()V(System.java:975)
Cannot start VM (error during System.initializeSystemClass())
)
Could not create JVM.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cjplummer
Offline
Joined: 2006-10-16
Points: 0

I know in general it should work fine on mips. Possibly your toolchain in doing something unexpected w.r.t. the ABI. It's possible is is not using o32 calling conventions, which will be a problem. Do the following:

/opt/cross-mips-sx/usr/bin/mips24k-linux-gcc -dM -E - -D

Include any options you that are being passed to gcc (you can see them in your build log) that may affect the ABI, such as -mips2. Look for _MIPS_SIM in the output and tell us what it is set to.

sherikekele
Offline
Joined: 2010-05-06
Points: 0

Hi cjplummer,

I tried what you told me to get the Macro outputs. _MIPS_SIM is defined as _ABIO32.

#define _MIPS_SIM _ABIO32

cjplummer
Offline
Joined: 2006-10-16
Points: 0

In your build directory, does btclasses/java/lang/ref/Reference.class exist?

You may want to try a build leaving off CVM_PRELOAD_SET. Also, check the build log for errors and warnings.

sherikekele
Offline
Joined: 2010-05-06
Points: 0

Hi cjplummer ,

We have just traced out the reason of abnormal exist, it's releated with pthread. The return value of funtion pthread_getattr_np() is different in uclibc pthread.old and pthread. We're using the pthread.old. I add a patch in thread_md.c:LINUXcomputeStackTop(). Now cvm can work, but cannot exit.

rohanp_java
Offline
Joined: 2010-11-09
Points: 0

Hi,
I am facing a similar problem. Could you please mention exactly what patch you have used and where.
It will be very helpful.
Thanks in advance.