ARM Regression / Assert failure: isRuntimeSuspended
On ARM/Linux, CoreCLR currently failed to execute "Hello, World" console application with the following message:
Assert failure(PID 1059 [0x00000423], Thread: 1059 [0x0423]): isRuntimeSuspended File: /home/parjong/projects/toolchains/coreclr/src/vm/arm/stubs.cpp Line: 487 Image: /mnt/dotnet-c235ae17cd3a87f8032948bdcb838641d8e6c055/corerun
I checked various commits, and attached the result at below.
- 'O' means that CoreCLR from that commit can print Hello, World,
- 'X' means that CoreCLR failed to print Hello, World with the above assertion failrue, and
- '?' means that CoreCLR failed to print Hello, World with a different reason.
bd7ee6206f05fbc321e7f69383423f05d440e7b6, X dc86158d1ce41dfcb775c921a9e6d1f7fed90868, X 8614810caec4b5a2a33547fe3f9dfd3982357b6e, X deadffbd21fde9706e3237969208f995928cd843, X 257951f3a30b880d863c813bf5528fef5f44fdea, X a207199a67acee162c0ed865fa70252add2dccef, O 0ec739e4416d12eeaac0c365fae09e503b080eaf, X 3ad8f15af54add9dcc3ecb8b89f3b9a82c65bef3, X 8ba667ba08a57f420aa3067e8b57e51185802650, X 517207b9d3f2a53c726a8682c1331cf7bdb0360b, X 8beda3c1561aa7a4b4a18ea98e719fc9fd52a638, X 39ac49632a499877db8b8656dc63d147c7a8fe39, O 5ad8da8b1239585a9e75a20ed2137e8b92bfe6c9, X 2ef3e9124d883c859995ded1a1f177d91f789197, O afdce3a592e5f6f2047bed057d121225be91743d, X 98d914bc0c9b167ee3e7abd3f4aee636f88cba59, O 5ef243f597b8198efce1add587f16aae59b1f568, O 867b8f1ff301d1d0842abec75447be4e94c1f17c, O c235ae17cd3a87f8032948bdcb838641d8e6c055, X 5d55afa3600904dd2376db9af9838f2fbba27945, O e735df2e106e2a119ced1db2a6fdcbe0ad5890c6, O 3409ad136021c42da1d982478ea0b609db1202a3, O ae2d2f3d103d0a20d1609725c7eec0830e0cf654, O b7e35b9c3d87ba84b859f9f9f795857dfbbda653, O d241f9d5bcdaf9e99e4c4e54508d2cec2ed35d04, O a1eedcb8767e5833b5f1134efcb26ff8612ec315, O 121a91d73c7ac1f0264f62eff1451d742b94e0dd, O c2d2efffe0ed58c55be1db5f254056b54ec41654, O 7c4c8f3efc6e9acdbd1aa972b10b00ea11b63c27, O ed172f6944eb5fd3a1b9390ceaef0ee09f3fb122, O 6b9efccc55654928225829b853267f1062fa42fa, O 63554209e89d38785f2a1241939c490370e3efed, O 5c9b92876a4b1641393e20ac2e7638c3c0f296c8, ? 68e27689d709b846505813af806dfb11b19777ef, O 9475224327e45faa56e6ecbfcc5fa503656d5c20, O 2c737588bed6550f56b9470278382d807a6fd9b4, O 0fe70e83f801002521b658372f5e1390016fe09a, O e59013a59744d05fa4c60570f25198c160ba3582, O 67d03ca438bf8327b82655669d616d1aa7ad8541, O b6502aae0447fe7ccbc21b354c545c8ba58c902a, O 3a6e9459c0b5dc69f898272b290ce0333cebd55b, O 484c855fe4a91a8ea67213457d69182669c65ded, O
This results indicates that 'c235ae17cd3a87f8032948bdcb838641d8e6c055' may be the first commit that introduces this symptom.
@kouvel, Could you check your existing PRs? It seems that your PR (commit number: c235ae17cd3a87f8032948bdcb838641d8e6c055) makes the running break of Linux/ARM.
\CC: @jkotas , @benpye
Hmm do you happen to have a stack trace for the assertion failure?
Starting program: /sdcard/sf/test4344/corerun /sdcard/hf/example/MS\ Official\ Hello\ World/HelloWorld.exe linux
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
[New Thread 0xb615a450 (LWP 8268)]
[New Thread 0xb58fa450 (LWP 8269)]
[New Thread 0xb4eff450 (LWP 8270)]
Assert failure(PID 8265 [0x00002049], Thread: 8265 [0x2049]): isRuntimeSuspended
File: /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/arm/stubs.cpp Line: 487
Image: /sdcard/sf/test4344/corerun
Program received signal SIGABRT, Aborted.
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
44 pop {r7, pc}
(gdb) bt
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
dotnet/coreclr#1 0xb6d788fe in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:55
dotnet/coreclr#2 0xb6d79612 in __GI_abort () at abort.c:89
dotnet/coreclr#3 0xb6b2bed2 in PROCEndProcess (hProcess=0xffffff01, uExitCode=1, bTerminateUnconditionally=1) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/pal/src/thread/process.cpp:1338
dotnet/coreclr#4 0xb6b2c026 in TerminateProcess (hProcess=0xffffff01, uExitCode=1) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/pal/src/thread/process.cpp:1254
dotnet/coreclr#5 0xb62c6e64 in _DbgBreakCheck (szFile=0xb6b8904f "/source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/arm/stubs.cpp", iLine=487, szExpr=0xb6b89403 "isRuntimeSuspended", fConstrained=0)
at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/utilcode/debug.cpp:492
dotnet/coreclr#6 0xb62c714c in _DbgBreakCheckNoThrow (szFile=0xb6b8904f "/source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/arm/stubs.cpp", iLine=487, szExpr=0xb6b89403 "isRuntimeSuspended", fConstrained=0)
at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/utilcode/debug.cpp:558
dotnet/coreclr#7 0xb62c7462 in DbgAssertDialog (szFile=0xb6b8904f "/source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/arm/stubs.cpp", iLine=487, szExpr=0xb6b89403 "isRuntimeSuspended")
at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/utilcode/debug.cpp:745
dotnet/coreclr#8 0xb6505350 in StompWriteBarrierEphemeral (isRuntimeSuspended=false) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/arm/stubs.cpp:487
dotnet/coreclr#9 0xb666643c in WKS::gc_heap::adjust_ephemeral_limits () at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/gc/gc.cpp:9648
dotnet/coreclr#10 0xb6667792 in WKS::gc_heap::init_gc_heap (h_number=0) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/gc/gc.cpp:10445
dotnet/coreclr#11 0xb666723a in WKS::gc_heap::make_gc_heap () at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/gc/gc.cpp:10047
dotnet/coreclr#12 0xb66c06e2 in WKS::GCHeap::Init (this=0x49040, hn=0) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/gc/gc.cpp:33668
dotnet/coreclr#13 0xb66c0996 in WKS::GCHeap::Initialize (this=0x49040) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/gc/gc.cpp:33789
dotnet/coreclr#14 0xb63e0f3e in InitializeGarbageCollector () at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:3748
dotnet/coreclr#15 0xb63e042c in EEStartupHelper (fFlags=COINITEE_DEFAULT) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:1241
dotnet/coreclr#16 0xb63e1036 in EEStartup(tagCOINITEE)::$_1::operator()(tagCOINITEE*) const (this=0xbefff860, pfFlags=0xbefff868) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:1449
dotnet/coreclr#17 0xb63df4ba in EEStartup (fFlags=COINITEE_DEFAULT) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:1451
dotnet/coreclr#18 0xb63df2aa in EnsureEEStarted (flags=COINITEE_DEFAULT) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:429
dotnet/coreclr#19 0xb63df1d8 in InitializeEE (flags=COINITEE_DEFAULT) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/ceemain.cpp:358
dotnet/coreclr#20 0xb62d43d6 in CorRuntimeHostBase::Start (this=0x1f084) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/corhost.cpp:897
dotnet/coreclr#21 0xb62d42ee in CorHost2::Start (this=0x1f080) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/vm/corhost.cpp:842
dotnet/coreclr#22 0xb62a10a2 in coreclr_initialize (exePath=0x17014 "/sdcard/sf/test4344/corerun", appDomainFriendlyName=0xd422 "unixcorerun", propertyCount=7, propertyKeys=0xbefffb78, propertyValues=0xbefffb5c,
hostHandle=0xbefffb40, domainId=0xbefffb3c) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/dlls/mscoree/unixinterface.cpp:198
dotnet/coreclr#23 0x0000bdee in ExecuteManagedAssembly (currentExeAbsolutePath=0x17014 "/sdcard/sf/test4344/corerun", clrFilesAbsolutePath=0x17074 "/sdcard/sf/test4344",
managedAssemblyAbsolutePath=0x1709c "/sdcard/hf/example/MS Official Hello World/HelloWorld.exe", managedAssemblyArgc=1, managedAssemblyArgv=0xbefffe0c)
at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/coreclr/hosts/unixcoreruncommon/coreruncommon.cpp:369
dotnet/coreclr#24 0x0000b47a in corerun (argc=3, argv=0xbefffe04) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/coreclr/hosts/unixcorerun/corerun.cpp:149
dotnet/runtime#3858 0x0000b528 in main (argc=3, argv=0xbefffe04) at /source/tizen_3.0/dotnet/coreclr_upstreaming/src/coreclr/hosts/unixcorerun/corerun.cpp:161
(gdb)
Thanks @myungjoo, I'll post a fix shortly. I believe I have forgotten to include the g_fEEInit case in the call to StompWriteBarrierEphemeral.
FYI. We can normally run in the debug-build mode on "Linux/ARM Emulator" with commit number f21291a702a4247b1dd1c3219eaf5319e94df061 (Apr-16-2016) after the PR (#4352) of @kouvel.