runtime: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

Android framework version

net8.0-android

Affected platform version

NET 8.0.403

Description

I’m encountering an error in my application, but only in the release build. In debug mode, the application works without any issues, but in the release build, I get an error at the same point during certain actions. Since the project is commercial, I cannot provide the specific code.

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10008

Steps to Reproduce

Run the application in release mode

Did you find any workaround?

No response

Relevant log output

2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A  signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x10008
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x0  0000000000010000  x1  0000007ff23d5ce0  x2  ffffffffffffffe0  x3  02000074c890b100
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x4  02000074c890b120  x5  0000000000000000  x6  0000007ff23d5a68  x7  00000073e8958000
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x8  0000000000000075  x9  0000007588338d80  x10 0000007ff23d5ce0  x11 0000000000000002
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x12 0000007588353740  x13 0000007ff23d7f90  x14 0000007ff23d5bac  x15 0000000000000001
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x16 0000007769050078  x17 0000007768fd9fb0  x18 0000007778990000  x19 0000007ff23d5ce0
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x20 0000000000010000  x21 00000073e86bad29  x22 00000073bac24278  x23 00000075e8406f10
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x24 00000074c890b108  x25 00000075e8ed02a8  x26 00000075e84c6790  x27 00000000000001ee
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      x28 0000000000000241  x29 0000007ff23d5ca0
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A      lr  00000073e889aa4c  sp  0000007ff23d5ca0  pc  00000073e889a6c4  pst 0000000000000000
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A  backtrace:
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        #00 pc 00000000002506c4  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#1 pc 0000000000250a48  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#2 pc 00000000002029f0  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (mono_class_inflate_generic_method_full_checked+404) (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#3 pc 000000000014d7ec  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#4 pc 000000000014de34  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#5 pc 000000000022a27c  /data/app/~~wjcc1Wg6l4ADjoWSBeHaBQ==/com.enjin.mobile.wallet-lbMLBHQAEa-31C81eXWpRw==/split_config.arm64_v8a.apk!libmonosgen-2.0.so (BuildId: b429a6405c79e0852cf3694861f0a6c5234a833a)
2024-10-28 13:35:52.954 16507-16507 DEBUG                   pid-16507                            A        dotnet/android#6 pc 0000000000006514  <anonymous:7448b66000>

update: the fault address is always the same fault addr 0x10008

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

@vyacheslav-volkov it’s something we are looking into. Nothing to report now. If you have code to share, that would likely help us in the investigation.

@vyacheslav-volkov thanks, it looks much better! Is libmonosgen-2.0.so the same as the one you attached earlier? If not, please attach the current one

The symbolicated backtrace suggests your application throws some exception and the runtime trips over it, for some reason (locations presented in the same order as frames in the backtrace):

0x2506c4
collect_type_images
/__w/1/s/src/mono/mono/metadata/metadata.c:3112

0x250a48
collect_ginst_images
/__w/1/s/src/mono/mono/metadata/metadata.c:3051
collect_method_images
/__w/1/s/src/mono/mono/metadata/metadata.c:3093
mono_metadata_get_mem_manager_for_method
/__w/1/s/src/mono/mono/metadata/metadata.c:3343

0x2029f0
mono_class_inflate_generic_method_full_checked
/__w/1/s/src/mono/mono/metadata/class.c:1224

0x14d7ec
get_method_from_stack_frame
/__w/1/s/src/mono/mono/mini/mini-exceptions.c:935

0x14de34
mono_get_frame_info
/__w/1/s/src/mono/mono/mini/mini-exceptions.c:1506

0x22a27c
ves_icall_System_Diagnostics_StackFrame_GetFrameInfo
/__w/1/s/src/mono/mono/metadata/icall.c:7392

@vyacheslav-volkov if you are able to reproduce the segfault locally, please record it using the following commands from the VS developer prompt (or mac terminal):

$ adb shell setprop debug.mono.log default,assembly,mono_log_level=debug,mono_log_mask=all
$ adb logcat -G 64M
$ adb logcat -c
# Start and crash the application here, wait 10s and then:
$ adb logcat -d > log.txt

In the resulting log.txt file, look for a managed exception stacktrace, somewhere above the segfault line.