-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Description
Native crash in Xamarin.Android. This seems related to #12947, but I was under the impression that Xamarin.Android did not use virtual memory. I do not have repro steps, as this just seems to happen after leaving the application running for multiple days (my application runs on dedicated hardware, in a "kiosk" type of application). I also can confirm that there is plenty of memory available when the crash occurs. Is there anything besides exceeding the max_map_count that could cause this crash? Could it be a fragmentation issue?
Edit:
I opened a potentially related issue in the xamarin.android repo #7357, which also happens after days of running the app. The log output of that one is different, but they are both memory related, and I'm wondering if it's a fragmentation issue. I apologize for opening this here, as this probably belongs in the xamarin.android repo, but as I mentioned, this seems like it could be related to #12947 in this repo.
Note that the first 20 lines or so are logs of GC activity, which is what indicates to me that there is plenty of memory available at the time of the crash. The "46080 outstanding GREFs" output just before the crash is quite suspicious, though. Could this be an issue of too many GREFs?
Log output:
D/MEMORY ( 798): Starting periodic garbage collection per 5 minute timer.
D/MEMORY ( 798): 9/6/2022 4:16:33 PM, used 12,720,864 B / max 402,653,184 B (3 %), used 12,720,864 B / total 14,819,328 B (86 %), GC reported allocated 202,177,640 B
D/Mono ( 798): GC_BRIDGE waiting for bridge processing to finish
D/Mono ( 798): GC_BRIDGE waiting for bridge processing to finish
D/Mono ( 798): GC_BRIDGE waiting for bridge processing to finish
D/dalvikvm( 798): GC_EXPLICIT freed 2156K, 30% free 10269K/14472K, paused 5ms+8ms, total 81ms
D/Mono ( 798): GC_TAR_BRIDGE bridges 25179 objects 25282 opaque 15 colors 25179 colors-bridged 25179 colors-visible 25179 xref 2 cache-hit 0 cache-semihit 0 cache-miss 0 setup 5.75ms tarjan 27.77ms scc-setup 17.55ms gather-xref 3.64ms xref-setup 2.46ms cleanup 13.25ms
D/Mono ( 798): GC_BRIDGE: Complete, was running for 380.33ms
D/Mono ( 798): GC_MAJOR: (user request) time 521.77ms, stw 530.79ms los size: 47264K in use: 46779K
D/Mono ( 798): GC_MAJOR_SWEEP: major size: 23888K in use: 18537K
D/MEMORY ( 798): 9/6/2022 4:16:35 PM, used 10,624,480 B / max 402,653,184 B (3 %), used 10,624,480 B / total 14,819,328 B (72 %), GC reported allocated 201,597,744 B
D/dalvikvm( 798): GC_CONCURRENT freed 2201K, 28% free 10486K/14472K, paused 5ms+7ms, total 98ms
D/dalvikvm( 798): GC_CONCURRENT freed 2268K, 26% free 10712K/14472K, paused 5ms+8ms, total 92ms
D/dalvikvm( 798): GC_CONCURRENT freed 2349K, 25% free 10932K/14472K, paused 6ms+9ms, total 93ms
D/dalvikvm( 798): GC_CONCURRENT freed 2429K, 23% free 11143K/14472K, paused 6ms+9ms, total 97ms
D/dalvikvm( 480): GC_CONCURRENT freed 404K, 14% free 4825K/5588K, paused 2ms+4ms, total 38ms
D/dalvikvm( 798): GC_CONCURRENT freed 2515K, 22% free 11338K/14472K, paused 7ms+9ms, total 96ms
D/dalvikvm( 798): GC_CONCURRENT freed 2603K, 21% free 11512K/14472K, paused 7ms+9ms, total 116ms
I/monodroid-gc( 798): 46080 outstanding GREFs. Performing a full GC!
F/ ( 798): * Assertion at /Users/builder/jenkins/workspace/archive-mono/2019-06/android/release/mono/utils/lock-free-alloc.c:145, condition `sb_header' not met, function:alloc_sb, Failed to allocate memory for the lock free allocator
F/libc ( 798): Fatal signal 6 (SIGABRT) at 0x0000031e (code=-6), thread 854 (Thread Pool Wor)
I/DEBUG ( 185): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 185): Build fingerprint: 'boundary/lakeshore/lakeshore:4.4.3/ls2.6.4_4.4.3_2.0.1-ga/ls2.6.4_20160816:user/dev-keys'
I/DEBUG ( 185): Revision: '405522'
I/DEBUG ( 185): pid: 798, tid: 854, name: Thread Pool Wor >>> com.lakeshore.xip.triton.instrument <<<
I/DEBUG ( 185): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
I/DEBUG ( 185): r0 00000000 r1 00000356 r2 00000006 r3 00000000
I/DEBUG ( 185): r4 00000006 r5 0000000c r6 00000356 r7 0000010c
I/DEBUG ( 185): r8 00000001 r9 00004000 sl 00000924 fp 73a50ba0
I/DEBUG ( 185): ip 2b11e384 sp 73a50b40 lr 2b0e30bd pc 2b0f2088 cpsr 000f0010
I/DEBUG ( 185): d0 0000000000000000 d1 0000000000000000
I/DEBUG ( 185): d2 0000000000000000 d3 0000000000000000
I/DEBUG ( 185): d4 00000001509f79fb d5 392377ce858a5d48
I/DEBUG ( 185): d6 3ff0000000000000 d7 3ff0000000000000
I/DEBUG ( 185): d8 4040000000000003 d9 00000000c1b40000
I/DEBUG ( 185): d10 42900000c4ca8000 d11 0000000000000000
I/DEBUG ( 185): d12 0000000000000000 d13 0000000000000000
I/DEBUG ( 185): d14 0000000000000000 d15 0000000000000000
I/DEBUG ( 185): d16 0000000000000000 d17 3fd287a7636f4361
I/DEBUG ( 185): d18 3ff0000000000000 d19 bcce000000000000
I/DEBUG ( 185): d20 3fe6db6d00000000 d21 3fd6db6d00000000
I/DEBUG ( 185): d22 3e21ee9ebdb4b1c4 d23 3fe02995b6ed2ab6
I/DEBUG ( 185): d24 3ff0000000000000 d25 0000000000000000
I/DEBUG ( 185): d26 b92377ce858a5d48 d27 b92377ce858a5d48
I/DEBUG ( 185): d28 3ff0000000000000 d29 0000000000000000
I/DEBUG ( 185): d30 3ff0000000000000 d31 4024000000000000
I/DEBUG ( 185): scr 6000001d
I/DEBUG ( 185):
I/DEBUG ( 185): backtrace:
I/DEBUG ( 185): #00 pc 00022088 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 185): #1 pc 000130b9 /system/lib/libc.so (pthread_kill+48)
I/DEBUG ( 185): #2 pc 000132cd /system/lib/libc.so (raise+10)
I/DEBUG ( 185): #3 pc 00012003 /system/lib/libc.so
I/DEBUG ( 185): #4 pc 0002193c /system/lib/libc.so (abort+4)
I/DEBUG ( 185): #5 pc 002e5bf8 /data/app-lib/com.lakeshore.xip.triton.instrument-2/libmonosgen-2.0.so (monoeg_assert_abort+28)
I/DEBUG ( 185):
I/DEBUG ( 185): stack:
I/DEBUG ( 185): 73a50b00 7326b8a0 [anon:libc_malloc]
I/DEBUG ( 185): 73a50b04 2b0e191f /system/lib/libc.so (dlrealloc+122)
I/DEBUG ( 185): 73a50b08 2b0e18a5 /system/lib/libc.so (dlrealloc)
I/DEBUG ( 185): 73a50b0c 000000df
I/DEBUG ( 185): 73a50b10 00000000
I/DEBUG ( 185): 73a50b14 73a50bac [stack:854]
I/DEBUG ( 185): 73a50b18 55cdfea1 /data/app-lib/com.lakeshore.xip.triton.instrument-2/libmonosgen-2.0.so
I/DEBUG ( 185): 73a50b1c 2b0ddd0d /system/lib/libc.so (realloc+12)
I/DEBUG ( 185): 73a50b20 000000e0
I/DEBUG ( 185): 73a50b24 2b0f6b49 /system/lib/libc.so (vasprintf+88)
I/DEBUG ( 185): 73a50b28 2b0cc0b1 /system/lib/liblog.so
I/DEBUG ( 185): 73a50b2c 2b0cd5f9 /system/lib/liblog.so
I/DEBUG ( 185): 73a50b30 7326b8a0 [anon:libc_malloc]
I/DEBUG ( 185): 73a50b34 00000000
I/DEBUG ( 185): 73a50b38 e3a070ad
I/DEBUG ( 185): 73a50b3c ef9000ad
I/DEBUG ( 185): #00 73a50b40 00000006
I/DEBUG ( 185): 73a50b44 0000000c
I/DEBUG ( 185): 73a50b48 00000356
I/DEBUG ( 185): 73a50b4c 2b11e384
I/DEBUG ( 185): 73a50b50 2b11e384
I/DEBUG ( 185): 73a50b54 2b0e30bd /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 185): #1 73a50b58 00000006
I/DEBUG ( 185): 73a50b5c 00000000
I/DEBUG ( 185): 73a50b60 55c72a10 /data/app-lib/com.lakeshore.xip.triton.instrument-2/libmonosgen-2.0.so
I/DEBUG ( 185): 73a50b64 2b0e32d1 /system/lib/libc.so (raise+14)
I/DEBUG ( 185): #2 73a50b68 73a50b74 [stack:854]
I/DEBUG ( 185): 73a50b6c 2b0e2007 /system/lib/libc.so