libjninode crush
karfield opened this issue · 3 comments
When I run anode with "-e cmdline /sdcard/webrtc/app.js", libjninode.so crushed:
I/DEBUG (29615): handle_request(16)
I/DEBUG (29615): check process 29544 name:meshpoint.anode
I/DEBUG (29615): BOOM: pid=29544 uid=10097 gid=10097 tid=29614
I/DEBUG (29615): [OnPurpose Redunant in preset_info] pid: 29544, tid: 29614, name: Thread-1644 >>> org.meshpoint.anode <<<
I/DEBUG (29615): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG (29615): Build fingerprint: 'alps/mt6589_phone_evdo/mt6589_phone_evdo:4.2.1/JOP40D/1363305743:eng/release-keys'
I/DEBUG (29615): pid: 29544, tid: 29614, name: Thread-1644 >>> org.meshpoint.anode <<<
I/DEBUG (29615): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
I/DEBUG (29615): r0 00000000 r1 00000027 r2 deadbfff r3 40067f58
I/DEBUG (29615): r4 00000000 r5 55cf8a54 r6 400b0c68 r7 400a1e08
I/DEBUG (29615): r8 55cf8b58 r9 55bf8fb4 sl 54b28788 fp 55cf8a7c
I/DEBUG (29615): ip 55cf8a28 sp 55cf8a50 lr 4006985c pc 40062a80 cpsr 60000010
I/DEBUG (29615):
I/DEBUG (29615): backtrace:
I/DEBUG (29615): #00 pc 0002aa80 /system/lib/libc.so
I/DEBUG (29615): #01 pc 0001250c /system/lib/libc.so
I/DEBUG (29615): #02 pc 000129d0 /system/lib/libc.so
I/DEBUG (29615): #03 pc 0001e78c /system/lib/libc.so (dlfree+76)
I/DEBUG (29615): #04 pc 0001af3c /system/lib/libc_malloc_debug_mtk.so (mtk_free+240)
I/DEBUG (29615): #05 pc 0000dea0 /system/lib/libc.so (free+24)
I/DEBUG (29615): #06 pc 0003d2f7 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): #07 pc 0003d55f /data/data/org.meshpoint.anode/app/libjninode.so (Java_org_meshpoint_anode_RuntimeNative_start+50)
I/DEBUG (29615): #08 pc 0001e9d0 /system/lib/libdvm.so (dvmPlatformInvoke+112)
I/DEBUG (29615): #09 pc 0004e221 /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+500)
I/DEBUG (29615): #10 pc 00050597 /system/lib/libdvm.so (dvmResolveNativeMethod(unsigned int const*, JValue*, Method const*, Thread*)+174)
I/DEBUG (29615): #11 pc 00027da0 /system/lib/libdvm.so
I/DEBUG (29615): #12 pc 0002bcfc /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
I/DEBUG (29615): #13 pc 00061499 /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
I/DEBUG (29615): #14 pc 000614c3 /system/lib/libdvm.so (dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)+20)
I/DEBUG (29615): #15 pc 00055b3d /system/lib/libdvm.so
I/DEBUG (29615): #16 pc 0000f66c /system/lib/libc.so (__thread_entry+80)
I/DEBUG (29615):
I/DEBUG (29615): stack:
I/DEBUG (29615): 55cf8a10 ffffffff
I/DEBUG (29615): 55cf8a14 00000000
I/DEBUG (29615): 55cf8a18 55cf8a4c [stack:29614]
I/DEBUG (29615): 55cf8a1c 55cf8a28 [stack:29614]
I/DEBUG (29615): 55cf8a20 4006985c /system/lib/libc.so (_fwalk+72)
I/DEBUG (29615): 55cf8a24 4006798c /system/lib/libc.so (__sflush+12)
I/DEBUG (29615): 55cf8a28 40067f58 /system/lib/libc.so (_cleanup)
I/DEBUG (29615): 55cf8a2c 43040000
I/DEBUG (29615): 55cf8a30 55cf8a54 [stack:29614]
I/DEBUG (29615): 55cf8a34 400b0c68
I/DEBUG (29615): 55cf8a38 400a1e08 /system/lib/libc.so
I/DEBUG (29615): 55cf8a3c 55cf8b58 [stack:29614]
I/DEBUG (29615): 55cf8a40 55cf8a7c [stack:29614]
I/DEBUG (29615): 55cf8a44 55cf8a50 [stack:29614]
I/DEBUG (29615): 55cf8a48 df0027ad
I/DEBUG (29615): 55cf8a4c 00000000
I/DEBUG (29615): #00 55cf8a50 410d6838 [heap]
I/DEBUG (29615): 55cf8a54 fffffbdf
I/DEBUG (29615): 55cf8a58 55959357 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8a5c 55cf8ae0 [stack:29614]
I/DEBUG (29615): 55cf8a60 55959357 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8a64 400b0c68
I/DEBUG (29615): 55cf8a68 55cf8ae0 [stack:29614]
I/DEBUG (29615): 55cf8a6c 55959357 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8a70 55cf8aa4 [stack:29614]
I/DEBUG (29615): 55cf8a74 55cf8a80 [stack:29614]
I/DEBUG (29615): 55cf8a78 4004a510 /system/lib/libc.so
I/DEBUG (29615): 55cf8a7c 40062a08 /system/lib/libc.so
I/DEBUG (29615): #01 55cf8a80 00001099
I/DEBUG (29615): 55cf8a84 00000003
I/DEBUG (29615): 55cf8a88 55cf8ae0 [stack:29614]
I/DEBUG (29615): 55cf8a8c 55959357 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8a90 400b0c68
I/DEBUG (29615): 55cf8a94 400b0c68
I/DEBUG (29615): 55cf8a98 55cf8ad4 [stack:29614]
I/DEBUG (29615): 55cf8a9c 55cf8aa8 [stack:29614]
I/DEBUG (29615): 55cf8aa0 4004a9d4 /system/lib/libc.so
I/DEBUG (29615): 55cf8aa4 4004a46c /system/lib/libc.so
I/DEBUG (29615): #02 55cf8aa8 00100000
I/DEBUG (29615): 55cf8aac 00001000
I/DEBUG (29615): 55cf8ab0 00000001
I/DEBUG (29615): 55cf8ab4 55959357 /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8ab8 5595935f /data/data/org.meshpoint.anode/app/libjninode.so
I/DEBUG (29615): 55cf8abc 00000003
I/DEBUG (29615): 55cf8ac0 400b0c68
I/DEBUG (29615): 55cf8ac4 55cf8c3c [stack:29614]
I/DEBUG (29615): 55cf8ac8 55cf8b34 [stack:29614]
I/DEBUG (29615): 55cf8acc 55cf8ad8 [stack:29614]
I/DEBUG (29615): 55cf8ad0 40056790 /system/lib/libc.so (dlfree+80)
I/DEBUG (29615): 55cf8ad4 4004a9b8 /system/lib/libc.so
I/DEBUG (29615):
I/DEBUG (29615): memory near r3:
I/DEBUG (29615): 40067f38 e1d540fe e3500000 0afffff8 e1a00005 .@....P.........
I/DEBUG (29615): 40067f48 eb0000e4 e1a00004 e89da830 00046014 ........0....`..
I/DEBUG (29615): 40067f58 e59f0014 e1a0c00d e92dd800 e24cb004 ..........-...L.
I/DEBUG (29615): 40067f68 e79f0000 e89d6800 ea000627 00046010 .....h..'....`..
I/DEBUG (29615): 40067f78 e1a0c00d e59f0084 e92dd878 e24cb004 ........x.-...L.
I/DEBUG (29615):
I/DEBUG (29615): memory near r5:
I/DEBUG (29615): 55cf8a34 400b0c68 400a1e08 55cf8b58 55cf8a7c h..@...@X..U|..U
I/DEBUG (29615): 55cf8a44 55cf8a50 df0027ad 00000000 410d6838 P..U.'......8h.A
I/DEBUG (29615): 55cf8a54 fffffbdf 55959357 55cf8ae0 55959357 ....W..U...UW..U
I/DEBUG (29615): 55cf8a64 400b0c68 55cf8ae0 55959357 55cf8aa4 h..@...UW..U...U
I/DEBUG (29615): 55cf8a74 55cf8a80 4004a510 40062a08 00001099 ...U...@.*.@....
I/DEBUG (29615):
I/DEBUG (29615): memory near r6:
I/DEBUG (29615): 400b0c48 00001000 00001000 00040000 00200000 .............. .
I/DEBUG (29615): 400b0c58 00000003 4002b4cc 00000000 40f4ac9c .......@.......@
I/DEBUG (29615): 400b0c68 00000000 040b8a98 0008156a 00000128 ........j...(...
I/DEBUG (29615): 400b0c78 00020fd8 40023000 55ae6658 55df9000 .....0.@Xf.U...U
I/DEBUG (29615): 400b0c88 00200000 00000e2a 1e150ca8 00000000 .. .*...........
I/DEBUG (29615):
I/DEBUG (29615): memory near r7:
I/DEBUG (29615): 400a1de8 6174736d 00006574 656c6572 5f657361 mstate..release_
I/DEBUG (29615): 400a1df8 73756e75 735f6465 656d6765 0073746e unused_segments.
I/DEBUG (29615): 400a1e08 5f6b746d 616d6c64 636f6c6c 6265645f mtk_dlmalloc_deb
I/DEBUG (29615): 400a1e18 00006775 3d3d3d3d 3d3d3d3d 3d3d3d3d ug..============
I/DEBUG (29615): 400a1e28 5245203d 20524f52 4e554843 3028204b = ERROR CHUNK (0
I/DEBUG (29615):
I/DEBUG (29615): memory near r8:
I/DEBUG (29615): 55cf8b38 5593203b 55cf8b64 00000001 55bf9000 ; .Ud..U.......U
I/DEBUG (29615): 55cf8b48 00100000 00001000 00000000 00000000 ................
I/DEBUG (29615): 55cf8b58 40045ea0 558222f7 fffffffc 55cf8ba8 .^.@.".U.......U
I/DEBUG (29615): 55cf8b68 55cf8c54 55cf8b78 55932043 40046908 T..Ux..UC .U.i.@
I/DEBUG (29615): 55cf8b78 5593203b 558f1c55 55cf9008 558f20cb ; .UU..U...U. .U
I/DEBUG (29615):
I/DEBUG (29615): memory near r9:
I/DEBUG (29615): 55bf8f94 43360ca8 00000000 433748c8 55bf8fd4 ..6C.....H7C...U
I/DEBUG (29615): 55bf8fa4 54465b5a 4e348690 00000000 00000000 Z[FT..4N........
I/DEBUG (29615): 55bf8fb4 55ab5bc8 00000000 1d600005 55bf9000 .[.U......`....U
I/DEBUG (29615): 55bf8fc4 00000000 4e348bc8 54465b5a 00000000 ......4NZ[FT....
I/DEBUG (29615): 55bf8fd4 00000000 00000000 55ab5bc8 00000000 .........[.U....
I/DEBUG (29615):
I/DEBUG (29615): memory near sl:
I/DEBUG (29615): 54b28768 00000000 559a7531 00000000 00000453 ....1u.U....S...
I/DEBUG (29615): 54b28778 4fa5514c 55bf8fb4 4e348bc8 5447e000 LQ.O...U..4N..GT
I/DEBUG (29615): 54b28788 55ab5bc8 00000000 55cf8d90 00000000 .[.U.......U....
I/DEBUG (29615): 54b28798 55cf8dc4 00000011 00000000 40b4eb40 ...U........@..@
I/DEBUG (29615): 54b287a8 00000000 00000000 4d692770 55bf1300 ........p'iM...U
I/DEBUG (29615):
I/DEBUG (29615): memory near fp:
I/DEBUG (29615): 55cf8a5c 55cf8ae0 55959357 400b0c68 55cf8ae0 ...UW..Uh..@...U
I/DEBUG (29615): 55cf8a6c 55959357 55cf8aa4 55cf8a80 4004a510 W..U...U...U...@
I/DEBUG (29615): 55cf8a7c 40062a08 00001099 00000003 55cf8ae0 .*.@...........U
I/DEBUG (29615): 55cf8a8c 55959357 400b0c68 400b0c68 55cf8ad4 W..Uh..@h..@...U
I/DEBUG (29615): 55cf8a9c 55cf8aa8 4004a9d4 4004a46c 00100000 ...U...@l..@....
I/DEBUG (29615):
I/DEBUG (29615): memory near ip:
I/DEBUG (29615): 55cf8a08 0000000a 400ae208 ffffffff 00000000 .......@........
I/DEBUG (29615): 55cf8a18 55cf8a4c 55cf8a28 4006985c 4006798c L..U(..U\..@.y.@
I/DEBUG (29615): 55cf8a28 40067f58 43040000 55cf8a54 400b0c68 X..@...CT..Uh..@
I/DEBUG (29615): 55cf8a38 400a1e08 55cf8b58 55cf8a7c 55cf8a50 ...@X..U|..UP..U
I/DEBUG (29615): 55cf8a48 df0027ad 00000000 410d6838 fffffbdf .'......8h.A....
I/DEBUG (29615):
I/DEBUG (29615): memory near sp:
I/DEBUG (29615): 55cf8a30 55cf8a54 400b0c68 400a1e08 55cf8b58 T..Uh..@...@X..U
I/DEBUG (29615): 55cf8a40 55cf8a7c 55cf8a50 df0027ad 00000000 |..UP..U.'......
I/DEBUG (29615): 55cf8a50 410d6838 fffffbdf 55959357 55cf8ae0 8h.A....W..U...U
I/DEBUG (29615): 55cf8a60 55959357 400b0c68 55cf8ae0 55959357 W..Uh..@...UW..U
I/DEBUG (29615): 55cf8a70 55cf8aa4 55cf8a80 4004a510 40062a08 ...U...U...@.*.@
I/DEBUG (29615):
I/DEBUG (29615): code around pc:
I/DEBUG (29615): 40062a60 1afffffb e594c014 e35c0000 0a000018 ..........\.....
I/DEBUG (29615): 40062a70 e30b2fff e3a01027 e34d2ead e3a04000 ./..'.....M..@..
I/DEBUG (29615): 40062a80 e5421552 ebffef1a e3a01006 ebfff3cb R.B.............
I/DEBUG (29615): 40062a90 e24b1024 e3a03201 e1a02001 e3a00006 $.K..2... ......
I/DEBUG (29615): 40062aa0 e50b301c e50b4024 e50b4020 ebfff1bb .0..$@.. @......
I/DEBUG (29615):
I/DEBUG (29615): code around lr:
I/DEBUG (29615): 4006983c 4a000009 e1d430fc e1a00004 e2455001 ...J.0.......PE.
I/DEBUG (29615): 4006984c e2844054 e3530000 da000001 e12fff37 T@....S.....7./.
I/DEBUG (29615): 4006985c e1866000 e3750001 1afffff5 e5988000 .`....u.........
I/DEBUG (29615): 4006986c e3580000 1affffee e1a00006 e89da9f8 ..X.............
I/DEBUG (29615): 4006987c 00044754 e1a0c00d e92dddf0 e24cb004 TG........-...L.
I/DEBUG (29615):
I/DEBUG (29615): memory map around fault addr deadbaad:
I/DEBUG (29615): be9d4000-be9f5000 [stack]
I/DEBUG (29615): (no map for address)
I/DEBUG (29615): ffff0000-ffff1000 [vectors]
may be it's a memory leak.
I think the line crushed at(org_meshpoint_anode_RuntimeNative.cpp#90, when call 'node::Initialize'):
89 if((argc = getNativeArgs(jniEnv, jargv, &argv)) >= 0)
90 node::Initialize(argc, argv);
91 LOGV("Java_org_meshpoint_anode_RuntimeNative_nodeInit: ret\n");
Any ideas to fix this?
Hi,
EDIT: finally found out about the addr2line tool, looks like my problems are unrelated. sorry for almost hijacking this issue.
I have recently had several crashes with similar dumps showing up.
I tried using ndk-stack to decipher them, but it wont give me any additional info.
One of the crashes might be related to the code removed here: nodejs/node-v0.x-archive@d607d85
Some examples w/o dump:
F/libc ( 4076): Fatal signal 11 (SIGSEGV) at 0x21400b04 (code=1)
F/libc ( 4332): Fatal signal 4 (SIGILL) at 0x5d4fc210 (code=1)
do I have to recompile node with some debug specific compiler/linker flags to get more info?
cheers
I had a similar problem, the program got crushed when I execute a node.js program with options such as '-e'.
I noticed that it crushed at org_meshpoint_anode_RuntimeNative.cpp#132, when it calls freeNativeArgs(argc, argv);.
In node.cc in paddybyers/node/src,
NodeOptions::ParseArgs() makes arguments which start with "-" into "", and it causes a segment fault error in freeNativeArgs().
So I modified codes in freeNativeArgs() like
static void freeNativeArgs(jint argc, char **argv) {
for(int i = 0; i < argc; i++) {
if(strcmp(argv[i], "") == 0) continue; //added
delete[] argv[i]; //changed from "delete[] argv[i + 1];"
}
delete[] argv;
}
and it fixed.
If you have a better idea, please share it.
I hope that this will be helpful to you.