-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIsource-buildIssues relating to dotnet/source-buildIssues relating to dotnet/source-build
Milestone
Description
Description
I built .NET 10 Preview 7 on CentOS Stream 10 using the VMR ("bootstrap build"). When I use that just-built SDK (the "bootstrap build") to build the VMR again, the SDK crashes.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f5b01a01868 in LinearScan::RegisterSelection::try_SPILL_COST (this=0x7f5afc13f628) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra.cpp:13078
13078 if ((linearScan->getNextIntervalRef(spillCandidateRegNum, regType) == thisLocation) &&
[Current thread is 1 (Thread 0x7f5b02bff6c0 (LWP 1399195))]
Missing rpms, try: dnf --enablerepo='*debug*' install glibc-debuginfo-2.39-54.el10.x86_64
(gdb) bt
#0 0x00007f5b01a01868 in LinearScan::RegisterSelection::try_SPILL_COST (this=0x7f5afc13f628) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra.cpp:13078
#1 0x00007f5b01a013ed in LinearScan::RegisterSelection::select<false> (this=0x7f5afc13f628, currentInterval=0x7f5afc13fc00, refPosition=0x7f5afc13fc60) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra_score.h:41
#2 0x00007f5b019fa7c7 in LinearScan::allocateReg<false> (this=0x7f5afc13d920, currentInterval=0xc, refPosition=0xe38) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra.cpp:2945
#3 0x00007f5b019f3243 in LinearScan::allocateRegisters (this=0x7f5afc13d920) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra.cpp:6583
#4 0x00007f5b019f0a99 in LinearScan::doLinearScan (this=0x7f5afc13d920) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/lsra.cpp:1350
#5 0x00007f5b018e5208 in Compiler::compCompile(void**, unsigned int*, JitFlags*)::$_5::operator()() const (this=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:5001
#6 ActionPhase<Compiler::compCompile(void**, unsigned int*, JitFlags*)::$_5>::DoPhase (this=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/phase.h:69
#7 0x00007f5b01a451dc in Phase::Run (this=0x7f5b02bfdce0) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/phase.cpp:61
#8 0x00007f5b018e0e44 in DoPhase<Compiler::compCompile(void**, unsigned int*, JitFlags*)::$_5>(Compiler*, Phases, Compiler::compCompile(void**, unsigned int*, JitFlags*)::$_5) (_compiler=0x7f5afc135028, _phase=PHASE_LINEAR_SCAN, _action=...)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/phase.h:83
#9 Compiler::compCompile (this=0x7f5afc135028, methodCodePtr=0x7f5b02bfe388, methodCodeSize=0x7f5b02bfe47c, compileFlags=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:5003
#10 0x00007f5b018e3457 in Compiler::compCompileHelper (this=0x7f5afc135028, classPtr=0x7fb976e54000, compHnd=<optimized out>, methodInfo=0x7f5b02bfe558, methodCodePtr=0x7f5b02bfe388, methodCodeSize=0x7f5b02bfe47c, compileFlags=0x7f5b02bfe3b0)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:7086
#11 0x00007f5b018e22e1 in Compiler::compCompile(CORINFO_MODULE_STRUCT_*, void**, unsigned int*, JitFlags*)::$_0::operator()(Compiler::compCompile(CORINFO_MODULE_STRUCT_*, void**, unsigned int*, JitFlags*)::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:6274
#12 Compiler::compCompile (this=0x7f5afc135028, classPtr=0x7fb976e54000, methodCodePtr=0x7f5b02bfe388, methodCodeSize=0x7f5b02bfe47c, compileFlags=0x7f5b02bfe3b0)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:6293
#13 0x00007f5b018e3e77 in jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_0::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::{lambda(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_0::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::__JITParam*)#1}::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_0::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:7732
#14 jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::$_0::operator()(jitNativeCode(CORINFO_METHOD_STRUCT_*, CORINFO_MODULE_STRUCT_*, ICorJitInfo*, CORINFO_METHOD_INFO*, void**, unsigned int*, JitFlags*, void*)::__JITParam*) const (this=<optimized out>, __JITpParam=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:7756
#15 jitNativeCode (methodHnd=0x7fb978920450, classPtr=0x7fb976e54000, compHnd=0x7f5b02bfe4d0, methodInfo=0x7f5b02bfe558, methodCodePtr=0x7f5b02bfe388, methodCodeSize=0x7f5b02bfe47c, compileFlags=0x7f5b02bfe3b0, inlineInfoPtr=0x0)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/compiler.cpp:7758
#16 0x00007f5b018e82cc in CILJit::compileMethod (this=<optimized out>, compHnd=0x7f5b02bfe4d0, methodInfo=0x7f5b02bfe558, flags=<optimized out>, entryAddress=0x7f5b02bfe480, nativeSizeOfCode=0x7f5b02bfe47c)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/jit/ee_il_dll.cpp:302
#17 0x00007fb9f61b7e7a in invokeCompileMethod (jitMgr=0x555d73561910, comp=0x7f5b02bfe4d0, nativeEntry=0x7f5b02bfe480, nativeSizeOfCode=0x7f5b02bfe47c, nativeCodeVersion=...)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/jitinterface.cpp:12833
#18 UnsafeJitFunctionWorker (pJitMgr=0x555d73561910, pJitInfo=0x7f5b02bfe4d0, nativeCodeVersion=..., pSizeOfCode=0x7f5b02bfe8cc) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/jitinterface.cpp:13056
#19 UnsafeJitFunction (config=0x7f5b02bfeab8, ILHeader=0x7f5b02bfe890, isTier0=0x7f5b02bfe797, isInterpreterCode=0x7f5b02bfe88f, pSizeOfCode=0x7f5b02bfe8cc) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/jitinterface.cpp:13384
#20 0x00007fb9f61f45fa in MethodDesc::JitCompileCodeLocked (this=0x7fb978920450, pConfig=0x7f5b02bfeab8, pilHeader=0x7f5b02bfe890, pEntry=0x7f5afc1bd070, pSizeOfCode=0x7f5b02bfe8cc, pIsInterpreterCode=0x7f5b02bfe88f)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/prestub.cpp:916
#21 0x00007fb9f61f3edf in MethodDesc::JitCompileCodeLockedEventWrapper (this=0x7fb978920450, pConfig=0x7f5b02bfeab8, pEntry=0x7f5afc1bd070) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/prestub.cpp:814
#22 0x00007fb9f61f35fe in MethodDesc::JitCompileCode (this=0x7fb978920450, pConfig=0x7f5b02bfeab8) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/prestub.cpp:694
#23 0x00007fb9f61f30a6 in MethodDesc::PrepareILBasedCode (this=0x7fb978920450, pConfig=0x7f5b02bfeab8) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/prestub.cpp:424
#24 0x00007fb9f6224d18 in TieredCompilationManager::CompileCodeVersion (this=<optimized out>, nativeCodeVersion=...) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:956
#25 0x00007fb9f62240a0 in TieredCompilationManager::OptimizeMethod (this=0x555d735141f0, nativeCodeVersion=...) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:933
#26 TieredCompilationManager::DoBackgroundWork (this=0x555d735141f0, workDurationTicksRef=0x7f5b02bfec68, minWorkDurationTicks=50000000, maxWorkDurationTicks=50000000)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:819
#27 0x00007fb9f62236a5 in TieredCompilationManager::BackgroundWorkerStart (this=0x555d735141f0) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:533
#28 0x00007fb9f622351c in TieredCompilationManager::BackgroundWorkerBootstrapper1 () at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:483
#29 0x00007fb9f621fb7d in ManagedThreadBase_DispatchInner (pCallState=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:6832
#30 ManagedThreadBase_DispatchMiddle (pCallState=0xfe) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:6876
#31 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::$_0::operator()(ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::TryArgs*) const::{lambda(Param*)#1}::operator()(Param*) const (this=<optimized out>, pParam=<optimized out>)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:7034
#32 ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::$_0::operator()(ManagedThreadBase_DispatchOuter(ManagedThreadCallState*)::TryArgs*) const (this=<optimized out>, pArgs=<optimized out>)
at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:7036
#33 ManagedThreadBase_DispatchOuter (pCallState=0x7f5b02bfecf8) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:7060
#34 ManagedThreadBase::KickOff (pTarget=<optimized out>, args=<optimized out>) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/threads.cpp:7074
#35 0x00007fb9f6223444 in TieredCompilationManager::BackgroundWorkerBootstrapper0 (args=0x555d735367c0) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/vm/tieredcompilation.cpp:464
#36 0x00007fb9f645efd2 in CorUnix::CPalThread::ThreadEntry (pvParam=0x555d73557cc0) at /usr/src/debug/dotnet10.0-10.0.100~preview.7.25380.108-0.7.el10.x86_64/src/runtime/src/coreclr/pal/src/thread/thread.cpp:1618
#37 0x00007fb9f680e128 in start_thread () from /lib64/libc.so.6
#38 0x00007fb9f687eafc in clone3 () from /lib64/libc.so.6
I see the same behaviour on both Preview 6 and Preview 7 releases.
Reproduction Steps
The first SDK was compiled with:
$ export CFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -Wno-used-but-marked-unused'
$ export CXXFLAGS='-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -Wno-used-but-marked-unused'
$ export LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now --config=/usr/lib/rpm/redhat/redhat-hardened-clang-ld.cfg -Wl,--build-id=sha1 '
$ export 'EXTRA_CFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -Wno-used-but-marked-unused'
$ export 'EXTRA_CXXFLAGS=-O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS --config=/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong -m64 -march=x86-64-v3 -mtune=generic -fasynchronous-unwind-tables -fcf-protection -Wno-used-but-marked-unused'
$ export 'EXTRA_LDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now --config=/usr/lib/rpm/redhat/redhat-hardened-clang-ld.cfg -Wl,--build-id=sha1 '
$ EXTRA_LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now --config=/usr/lib/rpm/redhat/redhat-hardened-clang-ld.cfg -Wl,--build-id=sha1 '
$ ./build.sh --source-only --release-manifest /home/omajid/dotnet10.0/release.json -- /p:UseSystemLibs=+brotli++zlib+-lttng- /p:TargetRid=centos.10-x64 /p:OfficialBuilder=CentOS /p:MinimalConsoleLogOutput=false /p:ContinueOnPrebuiltBaselineError=true /v:n /p:LogVerbosity=n
Expected behavior
No crash
Actual behavior
crash
Regression?
Yes. I don't see any such crashes on .NET 9.
I tried testing with older .NET 10 preview releases, but Preview 5 doesn't even build anymore.
Known Workarounds
No response
Configuration
No response
Other information
No response
Metadata
Metadata
Assignees
Labels
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMICLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIsource-buildIssues relating to dotnet/source-buildIssues relating to dotnet/source-build