Bug 13299 - Default application fails to start w/ SIGILL on Motorola XOOM
Summary: Default application fails to start w/ SIGILL on Motorola XOOM
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.8.x
Hardware: PC Mac OS
: High blocker
Target Milestone: 4.8 (async)
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2013-07-17 12:50 UTC by Jonathan Pryor
Modified: 2013-07-22 23:40 UTC (History)
4 users (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:
VERIFIED FIXED

Description Jonathan Pryor 2013-07-17 12:50:14 UTC
Running applications built with Xamarin.Android 4.7.x on a Motorola Xoom generates a SIGILL at startup:


> F/libc    ( 9283): Fatal signal 4 (SIGILL) at 0x5b18c498 (code=1)
> I/DEBUG   ( 9272): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> I/DEBUG   ( 9272): Build fingerprint: 'verizon/trygon/stingray:4.0.4/IMM76L/345519:user/release-keys'
> I/DEBUG   ( 9272): pid: 9283, tid: 9283  >>> Mono.Samples.HelloTests <<<
> I/DEBUG   ( 9272): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 5b18c498
> I/DEBUG   ( 9272):  r0 014efbd8  r1 5b23af0c  r2 00000000  r3 0000000b
> I/DEBUG   ( 9272):  r4 5b23af0c  r5 014efbd8  r6 5b258180  r7 5b258180
> I/DEBUG   ( 9272):  r8 5b18ba9c  r9 00000000  10 000003af  fp bea8a654
> I/DEBUG   ( 9272):  ip 00000000  sp bea8a5a0  lr 5b18c958  pc 5b18c498  cpsr 60000010
> I/DEBUG   ( 9272):  d0  000000a043200000  d1  3ff0000043200000
> I/DEBUG   ( 9272):  d2  437e8000000000fe  d3  000000003f000000
> I/DEBUG   ( 9272):  d4  000001fd00000000  d5  3fe999999999999a
> I/DEBUG   ( 9272):  d6  3fe8000000000000  d7  0000009520000000
> I/DEBUG   ( 9272):  d8  0000000000000000  d9  0000000000000000
> I/DEBUG   ( 9272):  d10 0000000000000000  d11 0000000000000000
> I/DEBUG   ( 9272):  d12 0000000000000000  d13 0000000000000000
> I/DEBUG   ( 9272):  d14 0000000000000000  d15 0000000000000000
> I/DEBUG   ( 9272):  scr 60000012
> I/DEBUG   ( 9272): 
> I/DEBUG   ( 9272):          #00  pc 001e8498  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so (rehash)
> I/DEBUG   ( 9272):          #01  lr 5b18c958  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272): 
> I/DEBUG   ( 9272): code around pc:
> I/DEBUG   ( 9272): 5b18c478 e3750106 1affffdd e1a02008 eaffffd5  ..u...... ......
> I/DEBUG   ( 9272): 5b18c488 000bf81c e92d47f0 e5903018 e1a05000  .....G-..0...P..
> I/DEBUG   ( 9272): 5b18c498 eef60b08 e5900010 e595800c e0603003  .............0`.
> I/DEBUG   ( 9272): 5b18c4a8 e0232fc3 e0422fc3 ee072a10 e1a03088  ./#../B..*...0..
> I/DEBUG   ( 9272): 5b18c4b8 ee073a90 eef81bc7 ee611ba0 eef80be7  .:........a.....
> I/DEBUG   ( 9272): 
> I/DEBUG   ( 9272): code around lr:
> I/DEBUG   ( 9272): 5b18c938 e793210a e2811001 e5851010 e5802008  .!........... ..
> I/DEBUG   ( 9272): 5b18c948 e8800050 e783010a eafffff2 ebfffecc  P...............
> I/DEBUG   ( 9272): 5b18c958 eaffffcf e59f2028 e3a01008 e59f3024  ....( ......$0..
> I/DEBUG   ( 9272): 5b18c968 e3a0e0ec e59fc020 e08f2002 e08f3003  .... .... ...0..
> I/DEBUG   ( 9272): 5b18c978 e58de000 e08fc00c e58dc004 eb00083b  ............;...
> I/DEBUG   ( 9272): 
> I/DEBUG   ( 9272): memory map around addr 5b18c498:
> I/DEBUG   ( 9272): 5aed8000-5afa4000 /data/dalvik-cache/data@app@Mono.Samples.HelloTests-1.apk@classes.dex
> I/DEBUG   ( 9272): 5afa4000-5b257000 /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272): 5b257000-5b25b000 /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272): 
> I/DEBUG   ( 9272): stack:
> I/DEBUG   ( 9272):     bea8a560  0153de30  [heap]
> I/DEBUG   ( 9272):     bea8a564  00000010  
> I/DEBUG   ( 9272):     bea8a568  0153de58  [heap]
> I/DEBUG   ( 9272):     bea8a56c  4010b498  
> I/DEBUG   ( 9272):     bea8a570  000003af  
> I/DEBUG   ( 9272):     bea8a574  400d7c65  /system/lib/libc.so
> I/DEBUG   ( 9272):     bea8a578  50a30c1c  
> I/DEBUG   ( 9272):     bea8a57c  5af52dd0  /data/dalvik-cache/data@app@Mono.Samples.HelloTests-1.apk@classes.dex
> I/DEBUG   ( 9272):     bea8a580  bea8a60c  [stack]
> I/DEBUG   ( 9272):     bea8a584  014abd40  [heap]
> I/DEBUG   ( 9272):     bea8a588  3a440bd4  
> I/DEBUG   ( 9272):     bea8a58c  5871847c  /data/data/Mono.Samples.HelloTests/lib/libmonodroid.so
> I/DEBUG   ( 9272):     bea8a590  bea8a614  [stack]
> I/DEBUG   ( 9272):     bea8a594  00000001  
> I/DEBUG   ( 9272):     bea8a598  df0027ad  
> I/DEBUG   ( 9272):     bea8a59c  00000000  
> I/DEBUG   ( 9272): #00 bea8a5a0  5b23af0c  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5a4  014efbd8  [heap]
> I/DEBUG   ( 9272):     bea8a5a8  5b258180  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5ac  5b258180  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5b0  5b18ba9c  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5b4  00000000  
> I/DEBUG   ( 9272):     bea8a5b8  000003af  
> I/DEBUG   ( 9272):     bea8a5bc  5b18c958  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5c0  5b18ba9c  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5c4  400d913f  /system/lib/libc.so
> I/DEBUG   ( 9272):     bea8a5c8  5b25bb18  
> I/DEBUG   ( 9272):     bea8a5cc  00000000  
> I/DEBUG   ( 9272):     bea8a5d0  bea8a608  [stack]
> I/DEBUG   ( 9272):     bea8a5d4  5b258180  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
> I/DEBUG   ( 9272):     bea8a5d8  587286dc  /data/data/Mono.Samples.HelloTests/lib/libmonodroid.so
> I/DEBUG   ( 9272):     bea8a5dc  50a30c1c  
> I/DEBUG   ( 9272):     bea8a5e0  000003af  
> I/DEBUG   ( 9272):     bea8a5e4  5b0ead28  /data/data/Mono.Android.DebugRuntime/lib/libmonosgen-2.0.so
Comment 1 Jonathan Pryor 2013-07-17 13:01:07 UTC
"Workaround": target armeabi, not armeabi-v7a.

Note: not an actual workaround, in that the Xoom is an SMP device, and thus all multithreading code will break. It does narrow down the problem to the armeabi-v7a runtime.
Comment 3 Jonathan Pryor 2013-07-19 14:39:29 UTC
After extensive printfs, the SIGILL is apparently due to floating-point use; we crash at:

https://github.com/mono/mono/blob/ac11abe1/eglib/src/ghashtable.c#L223

	if (!(diff * 0.75 > hash->table_size * 2))

What's odd is that doing the same computation elsewhere (e.g. g_hash_table_insert_replace()) doesn't result in the SIGILL. I'm obviously missing something...
Comment 4 Jonathan Pryor 2013-07-19 16:59:45 UTC
Fixed in master/d0593e88 and monodroid-4.8.0-branch/c550526d.
Comment 5 Peter Collins 2013-07-22 17:17:44 UTC
Fix verified in X.A 4.8.0-13 (monodroid-4.8.0-branch / 3f1c339b)
Comment 6 t9mike 2013-07-22 23:40:22 UTC
My app runs AOK now on XOOM. Thank you.