[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cfe-dev
Subject:    [cfe-dev] libclang on Android Marshmallow crashes immediately
From:       Anton Smirnov via cfe-dev <cfe-dev () lists ! llvm ! org>
Date:       2015-11-22 11:36:22
Message-ID: CAE9+sCPLa+chrif2HC37RH9Fh4VuzV1pJ1LTBppYC02s=69ndQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey, guys.

I'm using clang over JNI for syntax highlighting in my Android apps.
It worked great until Android Marshmallow, and now it crashes (Fatal signal
11 (SIGSEGV)) in library loading (System.loadLibrary() in java code).

I was able to get stacktrace:

11-22 06:15:47.089: WARN/linker(1838):
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so: unused DT
entry: type 0x1d arg 0x3409
11-22 06:15:47.095: ERROR/chromium(1838): ### WebView Version 40
(1808730-x86) (code 400007)
11-22 06:15:47.096: ASSERT/libc(1838): Fatal signal 11 (SIGSEGV), code -6,
fault addr 0x72e in tid 1838 (d.myapp2)
11-22 06:15:47.147: ASSERT/DEBUG(102): *** *** *** *** *** *** *** *** ***
*** *** *** *** *** *** ***
11-22 06:15:47.147: ASSERT/DEBUG(102): Build fingerprint:
'Android/vbox86p/vbox86p:6.0/MRA58K/buildbot10191552:userdebug/test-keys'
11-22 06:15:47.147: ASSERT/DEBUG(102): Revision: '0'
11-22 06:15:47.147: ASSERT/DEBUG(102): ABI: 'x86'
11-22 06:15:47.147: ASSERT/DEBUG(102): pid: 1838, tid: 1838, name: d.myapp2
 >>> name.antonsmirnov.android.myapp2 <<<
11-22 06:15:47.147: ASSERT/DEBUG(102): signal 11 (SIGSEGV), code -6
(SI_TKILL), fault addr 0x5
11-22 06:15:47.152: ASSERT/DEBUG(102): eax 00000001  ebx 9c2fec98  ecx
9c2fec98  edx 9c3ff928
11-22 06:15:47.152: ASSERT/DEBUG(102): esi 9c3061c0  edi 00000000
11-22 06:15:47.152: ASSERT/DEBUG(102): xcs 00000073  xds 0000007b  xes
0000007b  xfs 00000007  xss 0000007b
11-22 06:15:47.152: ASSERT/DEBUG(102): eip 9bd06d62  ebp 00000003  esp
bf810f60  flags 00210202
11-22 06:15:47.158: ASSERT/DEBUG(102): backtrace:
11-22 06:15:47.158: ASSERT/DEBUG(102): #00 pc 01369d62
 /data/data/name.antonsmirnov.android.myapp2/se/libclang.so (void*
llvm::object_creator<(anonymous namespace)::CommandLineParser>()+34)
11-22 06:15:47.158: ASSERT/DEBUG(102): #01 pc 0137cb5b
 /data/data/name.antonsmirnov.android.myapp2/se/libclang.so
(llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void
(*)(void*)) const+91)
11-22 06:15:47.158: ASSERT/DEBUG(102): #02 pc 0136bdb6
 /data/data/name.antonsmirnov.android.myapp2/se/libclang.so
(llvm::cl::Option::addArgument()+422)
11-22 06:15:47.158: ASSERT/DEBUG(102): #03 pc 001020d6
 /data/data/name.antonsmirnov.android.myapp2/se/libclang.so
(_GLOBAL__sub_I__ZN4llvm21X86AsmInstrumentationC2ERKNS_15MCSubtargetInfoE+262)
11-22 06:15:47.158: ASSERT/DEBUG(102): #04 pc 00003203  /system/bin/linker
(__dl__ZN6soinfo17call_constructorsEv.part.140+1055)
11-22 06:15:47.158: ASSERT/DEBUG(102): #05 pc 0000b8ff  /system/bin/linker
(__dl__Z9do_dlopenPKciPK17android_dlextinfo+495)
11-22 06:15:47.159: ASSERT/DEBUG(102): #06 pc 0000213c  /system/bin/linker
(__dl_dlopen+59)
11-22 06:15:47.159: ASSERT/DEBUG(102): #07 pc 003a6287
 /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*,
std::__1::basic_string<char, std::__1::char_traits<char>,
std::__1::allocator<char> > const&, _jobject*, std::__1::basic_string<char,
std::__1::char_traits<char>, std::__1::allocator<char> >*)+759)
11-22 06:15:47.159: ASSERT/DEBUG(102): #08 pc 00470d5d
 /system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*,
_jstring*, _jobject*, _jstring*)+301)
11-22 06:15:47.159: ASSERT/DEBUG(102): #09 pc 72eba6ce
 /data/dalvik-cache/x86/system@framework@boot.oat (offset 0x1eb6000)
11-22 06:15:47.159: ASSERT/DEBUG(102): #10 pc 33242453  <unknown>
11-22 06:15:47.317: ASSERT/DEBUG(102): Tombstone written to:
/data/tombstones/tombstone_00
11-22 06:15:47.317: ERROR/DEBUG(102): AM write failed: Broken pipe
11-22 06:15:47.317: INFO/BootReceiver(656): Copying
/data/tombstones/tombstone_00 to DropBox (SYSTEM_TOMBSTONE)
11-22 06:15:47.319: WARN/ActivityManager(656): Force finishing activity
name.antonsmirnov.android.myapp2/name.antonsmirnov.android.myapp.ui.MainActivity
11-22 06:15:47.347: INFO/Zygote(333): Process 1838 exited due to signal (11)

Any thoughts why it happens?
Is it know bug/feature? Any fix or ideas on how to fix it?

I know Android Marshmallow brings new security model and now permissions
should be requested in runtime but what permissions are required in this
case?

Regards, Anton.

[Attachment #5 (text/html)]

<div dir="ltr"><span style="font-size:12.8px">Hey, guys.</span><div \
style="font-size:12.8px"><br></div><div style="font-size:12.8px">I&#39;m using clang \
over JNI for syntax highlighting in my Android apps.</div><div \
style="font-size:12.8px">It worked great until Android Marshmallow, and now it \
crashes (Fatal signal 11 (SIGSEGV)) in library loading (System.loadLibrary() in java \
code).</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I \
was able to get stacktrace:</div><div style="font-size:12.8px"><br></div><div \
style="font-size:12.8px"><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.089: WARN/linker(1838): \
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so: unused DT entry: type \
0x1d arg 0x3409</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.095: ERROR/chromium(1838): ### WebView Version 40 \
(1808730-x86) (code 400007)</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.096: ASSERT/libc(1838): Fatal signal 11 (SIGSEGV), \
code -6, fault addr 0x72e in tid 1838 (d.myapp2)</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): \
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** \
***</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.147: ASSERT/DEBUG(102): Build fingerprint: \
&#39;Android/vbox86p/vbox86p:6.0/MRA58K/buildbot10191552:userdebug/test-keys&#39;</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): \
Revision: &#39;0&#39;</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): ABI: \
&#39;x86&#39;</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.147: ASSERT/DEBUG(102): pid: 1838, tid: 1838, name: \
d.myapp2   &gt;&gt;&gt; name.antonsmirnov.android.myapp2 \
&lt;&lt;&lt;</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.147: ASSERT/DEBUG(102): signal 11 (SIGSEGV), code -6 (SI_TKILL), fault addr \
0x5</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.152: ASSERT/DEBUG(102): eax 00000001   ebx 9c2fec98   ecx 9c2fec98   edx \
9c3ff928</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.152: ASSERT/DEBUG(102): esi 9c3061c0   edi 00000000</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.152: ASSERT/DEBUG(102): \
xcs 00000073   xds 0000007b   xes 0000007b   xfs 00000007   xss \
0000007b</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.152: ASSERT/DEBUG(102): eip 9bd06d62   ebp 00000003   esp bf810f60   flags \
00210202</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.158: ASSERT/DEBUG(102): backtrace:</font></div><div><font face="monospace, \
monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #00 pc 01369d62   \
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so (void* \
llvm::object_creator&lt;(anonymous \
namespace)::CommandLineParser&gt;()+34)</font></div><div><font face="monospace, \
monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #01 pc 0137cb5b   \
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so \
(llvm::ManagedStaticBase::RegisterManagedStatic(void* (*)(), void (*)(void*)) \
const+91)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.158: ASSERT/DEBUG(102): #02 pc 0136bdb6   \
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so \
(llvm::cl::Option::addArgument()+422)</font></div><div><font face="monospace, \
monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): #03 pc 001020d6   \
/data/data/name.antonsmirnov.android.myapp2/se/libclang.so \
(_GLOBAL__sub_I__ZN4llvm21X86AsmInstrumentationC2ERKNS_15MCSubtargetInfoE+262)</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): \
#04 pc 00003203   /system/bin/linker \
(__dl__ZN6soinfo17call_constructorsEv.part.140+1055)</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.158: ASSERT/DEBUG(102): \
#05 pc 0000b8ff   /system/bin/linker \
(__dl__Z9do_dlopenPKciPK17android_dlextinfo+495)</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): \
#06 pc 0000213c   /system/bin/linker (__dl_dlopen+59)</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): \
#07 pc 003a6287   /system/lib/libart.so (art::JavaVMExt::LoadNativeLibrary(_JNIEnv*, \
std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, \
std::__1::allocator&lt;char&gt; &gt; const&amp;, _jobject*, \
std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, \
std::__1::allocator&lt;char&gt; &gt;*)+759)</font></div><div><font face="monospace, \
monospace" color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #08 pc 00470d5d   \
/system/lib/libart.so (art::Runtime_nativeLoad(_JNIEnv*, _jclass*, _jstring*, \
_jobject*, _jstring*)+301)</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.159: ASSERT/DEBUG(102): #09 pc 72eba6ce   \
/data/dalvik-cache/x86/system@framework@boot.oat (offset \
0x1eb6000)</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.159: ASSERT/DEBUG(102): #10 pc 33242453   \
&lt;unknown&gt;</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.317: ASSERT/DEBUG(102): Tombstone written to: \
/data/tombstones/tombstone_00</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.317: ERROR/DEBUG(102): AM write failed: Broken \
pipe</font></div><div><font face="monospace, monospace" color="#cc0000">11-22 \
06:15:47.317: INFO/BootReceiver(656): Copying /data/tombstones/tombstone_00 to \
DropBox (SYSTEM_TOMBSTONE)</font></div><div><font face="monospace, monospace" \
color="#cc0000">11-22 06:15:47.319: WARN/ActivityManager(656): Force finishing \
activity name.antonsmirnov.android.myapp2/name.antonsmirnov.android.myapp.ui.MainActivity</font></div><div><font \
face="monospace, monospace" color="#cc0000">11-22 06:15:47.347: INFO/Zygote(333): \
Process 1838 exited due to signal (11)</font></div></div><div \
style="font-size:12.8px"><br></div><div style="font-size:12.8px">Any thoughts why it \
happens?</div><div style="font-size:12.8px">Is it know bug/feature? Any fix or ideas \
on how to fix it?</div><div style="font-size:12.8px"><br></div><div \
style="font-size:12.8px">I know Android Marshmallow brings new security model and now \
permissions should be requested in runtime but what permissions are required in this \
case?</div><div style="font-size:12.8px"><br></div><div \
style="font-size:12.8px">Regards, Anton.</div></div>


[Attachment #6 (text/plain)]

_______________________________________________
cfe-dev mailing list
cfe-dev@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic