Skip to main content

help ! signal 10 on target board

15 replies [Last post]
jy870052
Offline
Joined: 2007-04-01

Hi,

my mips cvm can run on the board ,like this :

./cvm -Djava.class.path=../testclasses.zip HelloWorld

but when i used c invoke cvm , it send signal 11 .

i was ok !!!
do_page_fault() #2: sending SIGSEGV to haha for illegal read access from
00173c30 (epc == 2ac77a34, ra == 2abc3100)
$0 : 00000000 2b214600 00000001 00000000 2adbfe5c 1000038c 00173c30 2ad720a4
$8 : 10000390 00173c08 00000028 0000001a 7fff7780 0000017a 000001b0 00000036
$16: 0000000a 2adcf360 1000038c 2ad84cb0 2adbfe68 1000038c 2adbfe30 00000001
$24: 0000002a 2ac2a620 2adc3640 7fff7778 7fff7798 2abc3100
Hi : 00000000
Lo : 00002cd0
epc : 2ac77a34 Not tainted
Status: 0004ff13
Cause : 10000008
Process haha (pid: 125, stackpage=8030a000)
Stack: 00000000 00000000 2adc3640 00000000 2adc3640 00000000 2adc3640
2abccf74 10000394 2adc3640 2ad7c550 2abc3100 2adc3640 00002000 2adc3640
2abc1300 00000002 00000000 7fff77d0 00000000 2adc3640 00000000 2adbfe30
1000038c 2ad720a0 00000001 1000038c 1000038c 1000036c 2aca5fe5 1000036c
2ac73dc4 10000348 2adc3640 2ac75264 2ac752c8 2adc3640 00001fa8 2adc3640
2abcc7fc ...
Call Trace:

Code: 316a000f 000a5080 012a3021 <8cc60000> 00c00008 000b5902 8d060000 250
[KERNEL-CHECK] SIG queue (haha:pid=125): send signal = 11
[KERNEL-CHECK] a bad boy(haha:pid=125,prio=0) has error!
(signal = 11)
(epc = 0x2ac77a34) <--- check your mapfile!
(ra = 0x2abc3100)
(status = 0x0004ff13)
(cause = 0x10000008)
(badVaddr = 0x00000000)
[KERNEL-CHECK] SIG deliver (haha:125):
sp=0x7fff7448 pc=0x2b226ad4 ra=0x7fff7458,sig=11
Process #125 received signal 11
Process #125 being suspended

my program( it's a sample which is on internet ):

#include
#include
#include

int main() {

int res;

JavaVM *jvm;

JNIEnv *env;

// jint res;
jclass cls;
jmethodID mid;
jstring jstr;
jobjectArray args;

JavaVMInitArgs vm_args;

JavaVMOption options[3];

vm_args.version=JNI_VERSION_1_2;

options[0].optionString = "-Djava.compiler=NONE";

options[1].optionString = "-Djava.class.path=testclasses.zip";

options[2].optionString = "-verbose:jni";

vm_args.version = JNI_VERSION_1_2;

vm_args.nOptions = 3;

vm_args.options = options;

vm_args.ignoreUnrecognized = JNI_TRUE;

res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);

if (res < 0) {

fprintf(stderr, "Can't create Java VM\n");

exit(1);

}
printf("CVM was created !!!");

jvm->DestroyJavaVM();

}

anybody can tell me why ?

Thank you

Yang Hui

Message was edited by: jy870052

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jy870052
Offline
Joined: 2007-04-01

Hi Dean :

I run CVM form command line like this :
cvm -Djava.class.path=../testclasses.zip HelloWorld

Because gdbsever is a server on mips board ,
if I want use gdb debug my program or CVM , gdbserver is necessary !
but my gdbserver is can't run ! So i can't find out the main().

xyzzy
Offline
Joined: 2006-08-30

> Hi Dean :
>
> I run CVM form command line like this :
> cvm -Djava.class.path=../testclasses.zip HelloWorld
>
> Because gdbsever is a server on mips board ,
> if I want use gdb debug my program or CVM ,
> gdbserver is necessary !
> but my gdbserver is can't run ! So i can't find out
> the main().

I've never had good luck with gdbserver. So why don't you use gdb
on the mips board instead? If it doesn't come with gdb, then build it.

So does "./cvm -Djava.class.path=../testclasses.zip HelloWorld" work,
or does it crash? If it works, then why do you want to change
main()?

Dean

jy870052
Offline
Joined: 2007-04-01

Hi Dean :
I don't know how to compiled the gdb .hehe : )

when I use "./cvm -Djava.class.path=../testclasses.zip HelloWorld" ,cvm is work.

we want invoke JNI_CreateJavaVM() in c porgram .

now we can invoke JNI_CreateJavaVM() in c porgram .

but no use the share lib .

when we use the static lib ,the cvm is work .the cvm never crash again !

xyzzy
Offline
Joined: 2006-08-30

> Hi Dean :
> I don't know how to compiled the gdb .hehe : )

Try "configure" then "make", or check the documentation.

> when I use "./cvm
> -Djava.class.path=../testclasses.zip HelloWorld" ,cvm
> is work.
>
> we want invoke JNI_CreateJavaVM() in c porgram .
>
> now we can invoke JNI_CreateJavaVM() in c porgram .
>
> but no use the share lib .
>
> when we use the static lib ,the cvm is work .the cvm
> never crash again !

That's good news.

Dean

jy870052
Offline
Joined: 2007-04-01

Dean :

hehe !!!!!

Thanks for you help !!

yanghui

jiangli_zhou
Offline
Joined: 2006-10-16

Hi Yang Hui,

Could you please tell us how are you compiling your C program and how are you building the CVM? Are you building CVM as a .so? Could you please tell us the compiler options that you used to compile your C program.

Thanks,

Jiangli Zhou

jy870052
Offline
Joined: 2007-04-01

Hi Jiangli Zhou :

you are chinese ? haha ? i'm chinese too!!!

when i link the cvm into a c program ,i use a cvm static lib.

you can use ar

rm obj/java_md.o
ar r cvm.a obj/.o

jy870052
Offline
Joined: 2007-04-01

Thank you !

jy870052
Offline
Joined: 2007-04-01

Hi Dean :

Yes,I modified the post .because that question hava solved !!

when i running the program the board is crash ,I haven't reboot,

then i running other program , the board send signal 10.

The "c invoke cvm" means , use c program language invoke the cvm !

On pc , I use c program language invoke the cvm is ok ! The funnction is

res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);

but I copy the program to board , let it running , the board is crash !

Is there any way invoke cvm ?

Regards

yanghui

xyzzy
Offline
Joined: 2006-08-30

So you need a custom main() rather than the one that comes with CVM?
What OS are you using? You probably need to use a debugger to find
out where it is crashing. A thread dump with function names would be
helpful.

Dean

> Hi Dean :
>
> Yes,I modified the post .because that question hava
> solved !!
>
> when i running the program the board is crash ,I
> haven't reboot,
>
> then i running other program , the board send signal
> 10.
>
> The "c invoke cvm" means , use c program language
> invoke the cvm !
>
> On pc , I use c program language invoke the cvm is
> ok ! The funnction is
>
> res = JNI_CreateJavaVM(&jvm, (void**)&env,
> &vm_args);
>
> but I copy the program to board , let it running ,
> the board is crash !
>
>
>
>
> Is there any way invoke cvm ?
>
> Regards
>
> yanghui

jy870052
Offline
Joined: 2007-04-01

Hi Dean :

yes, i need a function like main() which is can invoke cvm.
then i can use cvm running other java class .

when i invoke JNI_CreateJavaVM(&jvm, (void**)&env,
&vm_args); pc is crash !

my os is monsta vista linux .

i can't use gdbsever ,so i can't know where is crash !

JNI_CreateJavaVM () is a standard function which uses boot jdk VM on PC!

Is there any founction similar to JNI_CreateJavaVM () in cvm ???

xyzzy
Offline
Joined: 2006-08-30

> Hi Dean :
>
> yes, i need a function like main() which is can
> invoke cvm.
> then i can use cvm running other java class .
>
> when i invoke JNI_CreateJavaVM(&jvm, (void**)&env,
> &vm_args); pc is crash !
>
> my os is monsta vista linux .
>
> i can't use gdbsever ,so i can't know where is crash
> !
>
> JNI_CreateJavaVM () is a standard function which uses
> boot jdk VM on PC!
>
> Is there any founction similar to JNI_CreateJavaVM ()
> in cvm ???

Try using gdb. CVM already comes with a main(), otherwise how did you
run it successfully from the command line?

Dean

xyzzy
Offline
Joined: 2006-08-30

I guess you modified your post, because what I got in email was
a signal 10, not signal 11:

[KERNEL-CHECK] SIG queue (test_cvm:pid=158): send signal = 10
[KERNEL-CHECK] a bad boy(test_cvm:pid=158,prio=0) has error!
(signal = 10)
(epc = 0x65726963) <--- check your mapfile!
(ra = 0x2b05ac3c)
(status = 0x2004ff13)
(cause = 0x10000010)
(badVaddr = 0x65726967)
Bus error

Note that the epc spells "eric".
I'm also confused why your program is written in C
and not Java. Are you replacing the main() that
comes with CVM?

What does "c invoke cvm" mean?

Dean

> Hi,
>
> my mips cvm can run on the board ,like this :
>
> ./cvm -Djava.class.path=../testclasses.zip
> HelloWorld
>
> but when i used c invoke cvm , it send signal 11 .
>
>
> i was ok !!!
>
>
> do_page_fault() #2: sending SIGSEGV to haha for
> illegal read access from
> 00173c30 (epc == 2ac77a34, ra == 2abc3100)
>
> 000 2adbfe5c 1000038c 00173c30 2ad720a4
> $8 : 10000390 00173c08 00000028 0000001a 7fff7780
> 0000017a 000001b0 00000036
> $16: 0000000a 2adcf360 1000038c 2ad84cb0 2adbfe68
> 1000038c 2adbfe30 00000001
> $24: 0000002a 2ac2a620 2adc3640
> 7fff7778 7fff7798 2abc3100
> Hi : 00000000
>
>
> Lo : 00002cd0
>
>
> epc : 2ac77a34 Not tainted
>
>
>
>
> c3640 00000000 2adc3640 00000000 2adc3640
> 2abccf74 10000394 2adc3640 2ad7c550 2abc3100
> 2adc3640 00002000 2adc3640
> 2abc1300 00000002 00000000 7fff77d0 00000000 2adc3640
> 00000000 2adbfe30
> 1000038c 2ad720a0 00000001 1000038c 1000038c
> 1000036c 2aca5fe5 1000036c
> 2ac73dc4 10000348 2adc3640 2ac75264 2ac752c8 2adc3640
> 00001fa8 2adc3640
> 2abcc7fc ...
>
>
> Call Trace:
>
>
>
>
> Code: 316a000f 000a5080 012a3021 <8cc60000>
> 00c00008 000b5902 8d060000 250
> [KERNEL-CHECK] SIG queue (haha:pid=125): send signal
> = 11
> [KERNEL-CHECK] a bad boy(haha:pid=125,prio=0) has
> error!
> (signal = 11)
>
>
>
>
>
>
> haha:125):
> sp=0x7fff7448 pc=0x2b226ad4 ra=0x7fff7458,sig=11
>
> 11
> rocess #125 being suspended
>
>
>
>
> my program( it's a sample which is on internet ):
>
>
>
>
> #include
> #include
> #include
>
>
> int main() {
>
> int res;
>
>
> JavaVM *jvm;
>
> JNIEnv *env;
>
> // jint res;
> jclass cls;
> jmethodID mid;
> jstring jstr;
> jobjectArray args;
>
>
> JavaVMInitArgs vm_args;
>
> JavaVMOption options[3];
>
> vm_args.version=JNI_VERSION_1_2;
>
>
>
> options[0].optionString = "-Djava.compiler=NONE";
>
> options[1].optionString =
> "-Djava.class.path=testclasses.zip";
>
> options[2].optionString = "-verbose:jni";
>
>
> vm_args.version = JNI_VERSION_1_2;
>
> vm_args.nOptions = 3;
>
> vm_args.options = options;
>
> vm_args.ignoreUnrecognized = JNI_TRUE;
>
>
>
> res = JNI_CreateJavaVM(&jvm, (void**)&env,
> &vm_args);
>
> if (res < 0) {
>
> fprintf(stderr, "Can't create Java VM\n");
>
> exit(1);
>
> }
> printf("CVM was created !!!");
>
>
>
> vm->DestroyJavaVM();
>
>
>
>
>
>
>
>
>
>
>
>
> anybody can tell me why ?
>
> Thank you
>
> Yang Hui
>
> Message was edited by: jy870052

xyzzy
Offline
Joined: 2006-08-30

I guess you modified your post, because what I got in email was
a signal 10, not signal 11:

[KERNEL-CHECK] SIG queue (test_cvm:pid=158): send signal = 10
[KERNEL-CHECK] a bad boy(test_cvm:pid=158,prio=0) has error!
(signal = 10)
(epc = 0x65726963) <--- check your mapfile!
(ra = 0x2b05ac3c)
(status = 0x2004ff13)
(cause = 0x10000010)
(badVaddr = 0x65726967)
Bus error

Note that the epc spells 'e' 'r' 'i' 'c'.
I'm also confused why your program is written in C
and not Java. Are you replacing the main() that
comes with CVM?

What does "c invoke cvm" mean?

Dean

> Hi,
>
> my mips cvm can run on the board ,like this :
>
> ./cvm -Djava.class.path=../testclasses.zip
> HelloWorld
>
> but when i used c invoke cvm , it send signal 11 .
>
>
> i was ok !!!
>
>
> do_page_fault() #2: sending SIGSEGV to haha for
> illegal read access from
> 00173c30 (epc == 2ac77a34, ra == 2abc3100)
>
> 000 2adbfe5c 1000038c 00173c30 2ad720a4
> $8 : 10000390 00173c08 00000028 0000001a 7fff7780
> 0000017a 000001b0 00000036
> $16: 0000000a 2adcf360 1000038c 2ad84cb0 2adbfe68
> 1000038c 2adbfe30 00000001
> $24: 0000002a 2ac2a620 2adc3640
> 7fff7778 7fff7798 2abc3100
> Hi : 00000000
>
>
> Lo : 00002cd0
>
>
> epc : 2ac77a34 Not tainted
>
>
>
>
> c3640 00000000 2adc3640 00000000 2adc3640
> 2abccf74 10000394 2adc3640 2ad7c550 2abc3100
> 2adc3640 00002000 2adc3640
> 2abc1300 00000002 00000000 7fff77d0 00000000 2adc3640
> 00000000 2adbfe30
> 1000038c 2ad720a0 00000001 1000038c 1000038c
> 1000036c 2aca5fe5 1000036c
> 2ac73dc4 10000348 2adc3640 2ac75264 2ac752c8 2adc3640
> 00001fa8 2adc3640
> 2abcc7fc ...
>
>
> Call Trace:
>
>
>
>
> Code: 316a000f 000a5080 012a3021 <8cc60000>
> 00c00008 000b5902 8d060000 250
> [KERNEL-CHECK] SIG queue (haha:pid=125): send signal
> = 11
> [KERNEL-CHECK] a bad boy(haha:pid=125,prio=0) has
> error!
> (signal = 11)
>
>
>
>
>
>
> haha:125):
> sp=0x7fff7448 pc=0x2b226ad4 ra=0x7fff7458,sig=11
>
> 11
> rocess #125 being suspended
>
>
>
>
> my program( it's a sample which is on internet ):
>
>
>
>
> #include
> #include
> #include
>
>
> int main() {
>
> int res;
>
>
> JavaVM *jvm;
>
> JNIEnv *env;
>
> // jint res;
> jclass cls;
> jmethodID mid;
> jstring jstr;
> jobjectArray args;
>
>
> JavaVMInitArgs vm_args;
>
> JavaVMOption options[3];
>
> vm_args.version=JNI_VERSION_1_2;
>
>
>
> options[0].optionString = "-Djava.compiler=NONE";
>
> options[1].optionString =
> "-Djava.class.path=testclasses.zip";
>
> options[2].optionString = "-verbose:jni";
>
>
> vm_args.version = JNI_VERSION_1_2;
>
> vm_args.nOptions = 3;
>
> vm_args.options = options;
>
> vm_args.ignoreUnrecognized = JNI_TRUE;
>
>
>
> res = JNI_CreateJavaVM(&jvm, (void**)&env,
> &vm_args);
>
> if (res < 0) {
>
> fprintf(stderr, "Can't create Java VM\n");
>
> exit(1);
>
> }
> printf("CVM was created !!!");
>
>
>
> vm->DestroyJavaVM();
>
>
>
>
>
>
>
>
>
>
>
>
> anybody can tell me why ?
>
> Thank you
>
> Yang Hui
>
> Message was edited by: jy870052

jy870052
Offline
Joined: 2007-04-01

when i use x86-gcc compile the program which is above ,it can running on pc very well !