Bug 21409 - SIGSEGV & SIGABRT In Android-L/TV Sample
Summary: SIGSEGV & SIGABRT In Android-L/TV Sample
Status: RESOLVED UPSTREAM
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.14.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-07-17 17:24 UTC by Ben O'Halloran
Modified: 2015-08-18 22:12 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED UPSTREAM

Description Ben O'Halloran 2014-07-17 17:24:26 UTC
XA: 4.14-165
In porting the Android-L sample TV Leanback (the 'default' TV project provided by Google/generated in Android Studio), I will get seemingly random SIGSEGV, SIGABRT during runtime. This happens sporadically and the app will occasionally run correctly. Because this error is so sporadic, there is no guaranteed way to reproduce the issue, but cleaning the output directory seems to help. Error logs are in the gist.
Note that the Gist logs are from a Nexus 7 but I was getting the same failures in the TV emulator.
Gist: https://gist.github.com/benohalloran/ddaedea0bef5f0e961d8
Github: https://github.com/xamarin/monodroid-samples/tree/android-l/TvLeanback
Comment 1 Jonathan Pryor 2014-07-17 20:34:46 UTC
I believe that this is an Android bug, not a Xamarin.Android bug.

If you have copious space time (ha!), you should try creating a Java equivalent and see if that crashes as well.

I believe it's an Android bug largely because we're nowhere in the backtrace:

> I/DEBUG   (30761): backtrace:
> I/DEBUG   (30761):     #00 pc 00039430  /system/lib/libc.so (tgkill+12)
> I/DEBUG   (30761):     #01 pc 0001636d  /system/lib/libc.so (pthread_kill+64)
> I/DEBUG   (30761):     #02 pc 00016e41  /system/lib/libc.so (raise+10)
> I/DEBUG   (30761):     #03 pc 00013cdd  /system/lib/libc.so (__libc_android_abort+36)
> I/DEBUG   (30761):     #04 pc 000125ac  /system/lib/libc.so (abort+4)
> I/DEBUG   (30761):     #05 pc 00007735  /system/lib/libcutils.so (__android_log_assert+88)
> I/DEBUG   (30761):     #06 pc 000374b9  /system/lib/libhwui.so
> I/DEBUG   (30761):     #07 pc 000375f9  /system/lib/libhwui.so (android::uirenderer::renderthread::RenderThread::queue(android::uirenderer::renderthread::RenderTask*)+20)
> I/DEBUG   (30761):     #08 pc 000366db  /system/lib/libhwui.so
> I/DEBUG   (30761):     #09 pc 00036719  /system/lib/libhwui.so
> I/DEBUG   (30761):     #10 pc 00e155c8  /data/dalvik-cache/arm/system@framework@boot.oat

It's apparently coming from libhwui.so and related.

(Or we're somehow, somewhere, doing something "wrong", in which case having a Java equivalent to compare against would still be useful.)
Comment 2 Ben O'Halloran 2014-07-18 10:09:17 UTC
Luckily, the Java version already exists from Google: https://github.com/googlesamples/androidtv-Leanback
I haven't had any errors in that version but I'll get some error logs later today and update this.
Comment 3 Ben O'Halloran 2014-07-21 13:24:16 UTC
I was able to generate the SIGABRT error with the Java version of the app (gist here: https://gist.github.com/benohalloran/78b5c5047acac3818080).  
Appeared randomly like the XA version of the app.
Comment 4 Jonathan Pryor 2014-07-21 23:00:26 UTC
@Ben: Please file a bug at: https://code.google.com/p/android/issues/list

Include the full SIGABRT message (so it's searchable) and a best-effort at repro steps. (If you can narrow it down from "randomly", I'm sure they'd appreciate it.)
Comment 5 Ben O'Halloran 2014-07-22 11:12:54 UTC
The bug has been filed in the AOSP issue tracker at https://code.google.com/p/android/issues/detail?id=73920 .
Comment 6 Jonathan Pryor 2015-08-18 22:12:27 UTC
Marking as UPSTREAM as per Comment #3.