Skip to main content

phoneME jit on arm xscale pxa processor segfault

3 replies [Last post]
Joined: 2006-11-13

Hi all, great release by sun, it sure will help a lot of people. Now to business, has anyone was able to run the phoneME advanced with jit on an arm PXA-270/255 on linux kernel 2.6 ? I followed the docs, use the good crosscompiler, tried the builds for bulverde, xscale. All the same result:
Process #1465 received signal 11
Process #1465 being suspended

Others results where obtained trying different flags but it always comes down to an evil SIG.

If I run the CVM with -Xjit:compile=none, it works since it does not inject native instructions...

After some tracing and experimenting, all pointed to the DataCache. Disabling the DCache in the kernel made everything work flawlessly but very slow. I played with the cache policy cmdline for the kernel, only uncached and buffered worked. So it seems that there is a problem the way the VM is using the DCache or there is a bug in the linux kernel. I tried the source and even binaries to other arm board and it all works. Tried it with a 2.4 kernel and it worked fine there too.

So any of you had more luck than I have ?

I tried with the doc crosscompile on and build several others with always the same result.

GDB can't tell me where is crashes, he seems quite lost.

Before it segfaults, there are usualy nullpointerexception thrown like in java.lang.NullPointerException
at java.lang.StringBuffer.append(Ljava/lang/String;)Ljava/lang/StringBuffer;(Compiled Method)(
when it checks for the length of the appended string

When I try to run ../bin/cvm Test from testclasses i get

FloatMIN (the int bits) =1
FloatMAX (the int bits) =2139095039
java.lang.IllegalArgumentException: too many dimensions
at java.lang.reflect.Array.multiNewArray(Ljava/lang/Class;[I)Ljava/lang/Object;(Native Method)
at java.lang.reflect.Array.newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;(
at Test.testDeepArrayConstruction()V(
at Test.main([Ljava/lang/String;)V(
at java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;(
at sun.misc.CVM.runMain()V(
Constructed an object of type [[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[LTest;
Requesting GC with a latency request of 2 seconds
(Turning GC tracing on)
Sleeping 5 seconds, and waiting for GC's
GC[SS,0,full]: Collecting from 0x402a4200 to 0x401a4200
GC[SS,0,full]: Done, success for -1 bytes FALSE
GC[MC,1,full]: Collecting
GC[MC,1,full]: Done, success for -1 bytes FALSE
GC[SS,0,full]: Collecting from 0x401a4200 to 0x402a4200
GC[SS,0,full]: Done, success for -1 bytes FALSE
GC[MC,1,full]: Collecting
GC[MC,1,full]: Done, success for -1 bytes FALSE
Woke up! Cancelling latency request

It hangs there or I get a now classic Process #XXXX received signal 11.

I compiled the thing natively on the board with the same results.

My guess would be thread sync access to cahe problem or the gc is doing some funky stuff.

I tried modifying the CVM sources and the kernel sources but have not found the magic yet.

Any help, suggestion, stuff to try would be greatly appreciated.

Thank you all for your time.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-11-13

Well it sure did work :)
Thank you very much.


Joined: 2006-10-16

This is a known bug that has been fixed in our latest sources, which should be in the Open Source repository sometime in the near future. Cache flushing on linux/ARM 2.6 kernels is not done properly.

To fix this bug, in the following file:



mov a3, #0 /* flush both caches */


mov a3, #1 /* flush both caches */

Hope this works for you.

Chris Plummer

Joined: 2006-10-16

Sorry, got that backwards. Change the 1 to a 0, not the other way around.

Chris Plummer