Bug 32714 - Stack traces not produced on API 15 and earlier; libcorkscrew is missing
Summary: Stack traces not produced on API 15 and earlier; libcorkscrew is missing
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 5.1
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Alex Rønne Petersen
Depends on:
Reported: 2015-08-03 11:49 UTC by James Athey
Modified: 2015-12-09 22:25 UTC (History)
7 users (show)

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:

Description James Athey 2015-08-03 11:49:07 UTC
I can no longer get native stack traces on ICS devices, because the Mono runtime now expects to find either libcorkscrew (present on Jellybean and KitKat devices) or libunwind (present on Lollipop devices). After a stack trace, I now see the following in logcat:

E/mono-rt ( 5456): Stacktrace:
E/mono-rt ( 5456):
E/mono-rt ( 5456):
E/mono-rt ( 5456): Attempting native Android stacktrace:
E/mono-rt ( 5456):
E/mono-rt ( 5456): 	Could not unwind with `libunwind.so`: Cannot load library: load_library[1091]: Library '/data/data/skylight.mvvm.shared/lib/libunwind.so' not found
E/mono-rt ( 5456): 	Could not unwind with `libcorkscrew.so`: Cannot load library: load_library[1091]: Library '/data/data/skylight.mvvm.shared/lib/libcorkscrew.so' not found
E/mono-rt ( 5456):
E/mono-rt ( 5456): 	No options left to get a native stacktrace :-(
E/mono-rt ( 5456):
E/mono-rt ( 5456): =================================================================
E/mono-rt ( 5456): Got a SIGSEGV while executing native code. This usually indicates
E/mono-rt ( 5456): a fatal error in the mono runtime or one of the native libraries
E/mono-rt ( 5456): used by your application.
E/mono-rt ( 5456): =================================================================
E/mono-rt ( 5456):
F/libc    ( 5456): Fatal signal 11 (SIGSEGV) at 0x00000280 (code=1)

If I recall correctly, before Xamarin.Android 5.0, crashes in native code produced stack traces on my ICS (API 15) devices.

Is it possible to either include libcorkscrew with the runtime for API 15 devices, or provide some other codepath that works on those devices to produce stack traces?
Comment 1 Rodrigo Kumpera 2015-08-06 18:15:46 UTC
Hey Alex,

Can you take a look at this one?
Comment 2 Peter Collins 2015-08-07 13:21:35 UTC
I wasn't able to get a native stacktrace using a previous XA build (4.20-series) on an API 15 device. I am however able to confirm that the new unwinding attempts don't work on API 15 and lower:

@James do you have any idea what XA version (or even specific devices) you were using where you believed this was previously working for you?
Comment 3 James Athey 2015-08-10 11:03:23 UTC

No, sorry I don't remember when this worked previously on an ICS device. It is possible that I'm remembering it working on a Kit Kat device.
Comment 4 Peter Collins 2015-12-09 22:25:47 UTC
Resolving as not reproducible, and filing a new enhancement for investigating possibilities to improve stacktrace unwinding on API 15 and lower as Bug #36794.