Project

General

Profile

Bug #1713

AttachCurrentThread crash on versions with ART

Added by Dmitry Shatilov over 2 years ago. Updated over 2 years ago.

Status:
Open
Priority:
High
Category:
libcrystax
Target version:
Start date:
02/19/2017
Due date:
% Done:

0%

Estimated time:
CPU Architecture:
arm
Host OS:
Linux
Toolchain:
Android version:
CrystaX Version:

Description

My native library and the app_glue library are linked with crystax pthread_*
When I try to call AttachCurrentThread, the libart.so capp pthread_getstack(...) from libc
There is somewhere binary interface misprint or an optimization bug(different structs are opmized in different path: use onther set of registers for ex.)

*there is no crash when I compile sample with Google NDK
*there is still crash when I compile sample with Crystax NDK


Files

android (2).zip android (2).zip 7.23 KB Dmitry Shatilov, 02/19/2017 01:04 AM

History

#1

Updated by Dmitry Moskalchuk over 2 years ago

  • Assignee set to Dmitry Moskalchuk
  • Priority changed from Normal to High
#3

Updated by Dmitry Shatilov over 2 years ago

I/ActivityManager(  410): Process com.sample.hello_native (pid 22708) has died
I/ActivityManager(  410): Start proc 22730:com.sample.hello_native/u0a101 for activity com.sample.hello_native/.MyNativeActivity
I/art     (22730): Late-enabling -Xcheck:jni
I/com.sample.hello_native(22730): Pre-load native libraries
I/com.sample.hello_native(22730): Pre-load native libraries has complited
I/native-activity(22730): AttachCurrentThread
F/art     (22730): art/runtime/thread.cc:521] Attempt to attach a thread with a too-small stack (4096 bytes)
I/STDOUT  (22730): referenceTable GDEF length=670 1
I/STDOUT  (22730): referenceTable GSUB length=7202 1
I/STDOUT  (22730): referenceTable GPOS length=24560 1
F/art     (22730): art/runtime/thread.cc:819] pthread_getschedparam failed for DumpState: No such process
F/art     (22730): art/runtime/runtime.cc:289] Runtime aborting --- recursively, so no thread-specific detail!
F/art     (22730): art/runtime/runtime.cc:289]
I/Zygote  (  129): Process 22730 exited cleanly (1)
I/ActivityManager(  410): Process com.sample.hello_native (pid 22730) has died
W/ActivityManager(  410): Force removing ActivityRecord{2d0586f7 u0 com.sample.hello_native/.MyNativeActivity t107}: app died, no saved state
W/WindowManager(  410): Failed looking up window
W/WindowManager(  410): java.lang.IllegalArgumentException: Requested window android.view.ViewRootImpl$W@3ea153c9 does not exist
W/WindowManager(  410):         at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8691)
W/WindowManager(  410):         at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8682)
W/WindowManager(  410):         at com.android.server.wm.WindowManagerService.removeWindow(WindowManagerService.java:2646)
W/WindowManager(  410):         at com.android.server.wm.Session.remove(Session.java:187)
W/WindowManager(  410):         at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3015)
W/WindowManager(  410):         at android.view.ViewRootImpl.doDie(ViewRootImpl.java:5502)
W/WindowManager(  410):         at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3321)
W/WindowManager(  410):         at android.os.Handler.dispatchMessage(Handler.java:102)
W/WindowManager(  410):         at android.os.Looper.loop(Looper.java:135)
W/WindowManager(  410):         at android.os.HandlerThread.run(HandlerThread.java:61)
W/WindowManager(  410):         at com.android.server.ServiceThread.run(ServiceThread.java:46)
#4

Updated by Dmitry Shatilov over 2 years ago

I can't reproduce the issue anywhere except night build: I use arm-linux-androideabi-6

#5

Updated by Dmitry Moskalchuk over 2 years ago

Dmitry Shatilov wrote:

I can't reproduce the issue anywhere except night build: I use arm-linux-androideabi-6

Thank you for reporting this. I confirm there is problem with pthread/art interaction. This is caused by switch to own pthread implementation, so root cause is completely clear. We're going to fix that. In meantime, please use older builds or even latest 10.3.2 release - there is no such problem.

Also available in: Atom PDF