Wrong native callstacks

*爱你&永不变心* 提交于 2019-12-23 04:33:41

问题


I'am having problems with crashylitics showing proper callstacks for native crashes. It used to work some time ago, but now callstacks either make no sense, or the names are missing. I have made sure that symbols are being uploaded by looking into ~/.crashylitics log file. Everything looks fine there. I have made a test crash and compared tombstone from logcat with what appears in crashylitics (I have connected fabric.io project with firebase).

What bothers me is that we are uploading symbols for three different versions of our apk (different native compile flags) under the same apk version code, different version name and the same package. Below test was made with application build in single configuration, so that the symbols were sent for only one apk and version code. There was no change in the quality of the produced callstacks.

So the tombstone from logcat is as follows. It does show the callstack, but with no inlined function calls (there should be more levels). libfoobar.e063.so is loaded at the base address = 7de475d000.

LogCat tombstone

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'samsung/dreamltexx/dreamlte:9/PPR1.180610.011/G950FXXS4DSE1:user/release-keys'
Revision: '10'
ABI: 'arm64'
pid: 9888, tid: 9888, name: example.foobar  >>> com.example.foobar <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
    x0  0000000000000020  x1  0000000000000001  x2  000000000000001f  x3  0000007e849525e0
    x4  0000000000000190  x5  0000000000000000  x6  740c340d00000000  x7  000000000d340c74
    x8  0000000000000000  x9  0000000000000020  x10 0000007de4da3cac  x11 0000000000000000
    x12 0000007de49ebb18  x13 0000000000000000  x14 ffffffffff000000  x15 740c340d00000000
    x16 0000007de5843d40  x17 0000007e85433cb0  x18 0000007fec905a2a  x19 0000000000000000
    x20 0001280100000000  x21 0000007fec906650  x22 0000000000000001  x23 0000007de495488c
    x24 0000000000000000  x25 0000000000000000  x26 0000007dff614ca0  x27 0000000000000055
    x28 0000007fec906668  x29 0000000000010072
    sp  0000007fec906300  lr  0000007de4da3a74  pc  0000007de4da3e24
 backtrace:
     #00 pc 0000000000784e24  /data/app/com.example.foobar-baBCcRs3wa4-0jvDxCrWEQ==/lib/arm64/libfoobar.e063.so (offset 0x620000) (Foo::CStringW::FormatV(wchar_t const*, std::__va_list)+1312)
     #01 pc 0000000000787304  /data/app/com.example.foobar-baBCcRs3wa4-0jvDxCrWEQ==/lib/arm64/libfoobar.e063.so (offset 0x620000) (Foo::CStringW::FormatInternal(wchar_t const*, ...)+84)
     #02 pc 0000000000687e00  /data/app/com.example.foobar-baBCcRs3wa4-0jvDxCrWEQ==/lib/arm64/libfoobar.e063.so (offset 0x620000) (Java_com_example_common_jni_FooBar_makeForcedNativeCrash+248)

What is shown in fabric.io (and firebase) is below. The last column is my calculation, this show that correct address are possible to calculate. I have no idea what are the ?-marked lines from. There are 4 calls between #01 and #02, which I suppose could've been inlined.

What can be the cause of such problems? Are there any compiler flags which can interfeer with the crashylitics inner workings? I can add that our application is rather big, release .so files are around 20MB, and with symbols around 300MB. I have seen that symbols (.cSYM.gz) sent to server as in ~/.crashylitics folder are around 10MB.

SIGSEGV 0x0000000000000000
                                  ADDR                   (ADDR - LibBase)  
0  libfoobar.e063.so              0x7de4ee1e24 (Missing) 0x784E24         #00  - same as in logcat tombstone
1  (Missing)                      0x7de4a92824 (Missing) 0x335824
2  linker64                       0x7e8606e1d4 (Missing) 0xA19111D4
3  (Missing)                      0x7de4825987 (Missing) 0xC8987
4  linker64                       0x7e8606e4c0 (Missing) 0xA19114C0
5  linker64                       0x7e85fc4d20 (Missing) 0xA1867D20
6  linker64                       0x7e86098e8e (Missing) 0xA193BE8E
7  libc.so                        0x7e854a3b08 (Missing) 0xA0D46B08
8  libfoobar.e063.so              0x7de4de4d04 (Missing) 0x687D04         ?
9  linker64                       0x7e85fc0420 (Missing) 0xA1863420
10 libfoobar.e063.so              0x7de4de4d04 (Missing) 0x687D04         ?
11 libc.so                        0x7e854a3b08 (Missing) 0xA0D46B08
12 libfoobar.e063.so              0x7de4de4d04 (Missing) 0x687D04         ?
13 (Missing)                      0x7df6e0f694 (Missing) 0x126B2694
14 (Missing)                      0x7de7ad1fe0 (Missing) 0x3374FE0
15 libfoobar.e063.so              0x7de4ee4304 (Missing) 0x787304         #01  - same as in logcat tombstone
16 libc.so                        0x7e854812fc (Missing) 0xA0D242FC
17 libfoobar.e063.so              0x7de4de4e00 (Missing) 0x687E00         #02  - same as in logcat tombstone
18 libfoobar.e063.so              0x7de4de4dd4 (Missing) 0x687DD4
19 libart.so                      0x7dff5071a8 (Missing) 0x1ADAA1A8
20 (Missing)                      0x7de7ad1fe0 (Missing) 0x3374FE0
21 libart.so                      0x7dff50717c (Missing) 0x1ADAA17C
22 base.odex                      0x7de762c358 (Missing) 0x2ECF358
23 (Missing)                      0x7df6e0f694 (Missing) 0x126B2694
24 (Missing)                      0x7de7ad1fe0 (Missing) 0x3374FE0
25 libart.so                      0x7dff50824c (Missing) 0x1ADAB24C
26 libart.so                      0x7dff076160 (Missing) 0x1A919160
27 (Missing)                      0x7de7ad1fe0 (Missing) 0x3374FE0
28 (Missing)                      0x7df6e0f694 (Missing) 0x126B2694
29 (Missing)                      0x7de7ad1fe0 (Missing) 0x3374FE0
30 (Missing)                      0x6f42c6ac (Missing)
31 (Missing)                      0x1367f02c (Missing)
32 (Missing)                      0x1367f08c (Missing)
33 (Missing)                      0x6f324ae4 (Missing)
34 (Missing)                      0x7df6e0f694 (Missing)
35 (Missing)                      0x7df6e0f694 (Missing)
36 libart.so                      0x7dff22c5e8 (Missing)
37 (Missing)                      0x735951fc (Missing)
38 (Missing)                      0x9d1cc0ec (Missing)
39 libart.so                      0x7dff2265a4 (Missing)
40 (Missing)                      0x7df6e0f694 (Missing)
41 libart.so                      0x7dff226410 (Missing)
42 (Missing)                      0x83e0b94c (Missing)
43 libart.so                      0x7dff0e0764 (Missing)
44 (Missing)                      0x7df6e0f694 (Missing)
45 (Missing)                      0x7de7a4b38c (Missing)
46 libart.so                      0x7dff4d873c (Missing)
47 libart.so                      0x7dff4f6efc (Missing)
48 (Missing)                      0x7de7a4b38c (Missing)
49 libart.so                      0x7dff4fa794 (Missing)

来源:https://stackoverflow.com/questions/56604617/wrong-native-callstacks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!