Bug 1827282 - clang crashes building .net core (pgo)
Summary: clang crashes building .net core (pgo)
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: clang9.0
Version: 31
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: serge_sans_paille
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-23 14:19 UTC by Tom Deseyn
Modified: 2020-11-24 20:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-24 20:13:09 UTC
Type: Bug


Attachments (Terms of Use)
codegencommon-5bf5d9.cpp (7.28 MB, text/plain)
2020-04-23 14:19 UTC, Tom Deseyn
no flags Details
codegencommon-5bf5d9.sh (12.51 KB, text/plain)
2020-04-23 14:19 UTC, Tom Deseyn
no flags Details
preprocessed.cpp (1.58 MB, text/plain)
2020-04-23 18:39 UTC, Tom Deseyn
no flags Details
clrjit.profdata (1.09 MB, application/octet-stream)
2020-05-04 11:27 UTC, Tom Deseyn
no flags Details

Description Tom Deseyn 2020-04-23 14:19:20 UTC
Created attachment 1681164 [details]
codegencommon-5bf5d9.cpp

Version-Release number of selected component (if applicable):

clang version 9.0.0 (Fedora 9.0.0-1.fc31)

Steps to Reproduce:

```
sudo dnf -y install automake clang cmake curl-devel findutils git glibc-langpack-en hostname krb5-devel libicu-devel libtool libunwind-devel lldb-devel llvm lttng-ust-devel make openssl-devel python3 systemtap-sdt-devel tar wget which zlib-devel

git clone https://github.com/dotnet/runtime

cd runtime

./build.sh --subset clr --configuration Release
```

Actual results:

```
  Stack dump:
  0.	Program arguments: /usr/bin/clang-9 -cc1 -triple x86_64-unknown-linux-gnu -emit-llvm-bc -flto -flto-unit -disable-free -disable-llvm-verifier -discard-value-names -main-file-name codegencommon.cpp -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -momit-leaf-frame-pointer -fprofile-instrument-use-path=/home/tmds/.nuget/packages/optimization.linux-x64.pgo.coreclr/99.99.99-master-20200228.3/data/clrjit.profdata -coverage-notes-file /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/jit/standalone/CMakeFiles/clrjit.dir/__/codegencommon.cpp.gcno -nostdsysteminc -nobuiltininc -resource-dir /usr/lib64/clang/9.0.0 -D DEBUGGING_SUPPORTED -D DISABLE_CONTRACTS -D FEATURE_ARRAYSTUB_AS_IL -D FEATURE_BASICFREEZE -D FEATURE_CODE_VERSIONING -D FEATURE_COLLECTIBLE_TYPES -D FEATURE_CORECLR -D FEATURE_CORESYSTEM -D FEATURE_CORRUPTING_EXCEPTIONS -D FEATURE_DBGIPC_TRANSPORT_DI -D FEATURE_DBGIPC_TRANSPORT_VM -D FEATURE_DEFAULT_INTERFACES -D FEATURE_EH_FUNCLETS -D FEATURE_EVENTSOURCE_XPLAT -D FEATURE_EVENT_TRACE -D FEATURE_HIJACK -D FEATURE_HW_INTRINSICS -D FEATURE_ICASTABLE -D FEATURE_INSTANTIATINGSTUB_AS_IL -D FEATURE_ISYM_READER -D FEATURE_MANAGED_ETW -D FEATURE_MANAGED_ETW_CHANNELS -D FEATURE_MANUALLY_MANAGED_CARD_BUNDLES -D FEATURE_MULTICASTSTUB_AS_IL -D FEATURE_MULTICOREJIT -D FEATURE_MULTIREG_RETURN -D FEATURE_NO_HOST -D FEATURE_ON_STACK_REPLACEMENT -D FEATURE_PAL_ANSI -D FEATURE_PERFMAP -D FEATURE_PERFTRACING -D FEATURE_PORTABLE_SHUFFLE_THUNKS -D FEATURE_PROFAPI_ATTACH_DETACH -D FEATURE_READYTORUN -D FEATURE_READYTORUN_COMPILER -D FEATURE_REJIT -D FEATURE_REMOTE_PROC_MEM -D FEATURE_SIMD -D FEATURE_STANDALONE_GC -D FEATURE_STUBS_AS_IL -D FEATURE_SVR_GC -D FEATURE_SYMDIFF -D FEATURE_TIERED_COMPILATION -D FEATURE_USE_ASM_GC_WRITE_BARRIERS -D FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -D FEATURE_UTF8STRING -D FEATURE_WINMD_RESILIENT -D HOST_64BIT -D HOST_AMD64 -D HOST_UNIX -D JIT_BUILD -D NDEBUG -D PROFILING_SUPPORTED -D SELF_NO_HOST -D TARGET_64BIT -D TARGET_AMD64 -D TARGET_LINUX -D TARGET_UNIX -D UNICODE -D UNIX_AMD64_ABI -D UNIX_AMD64_ABI_ITF -D URTBLDENV_FRIENDLY=Retail -D _BLD_CLR -D _SECURE_SCL=0 -D _UNICODE -D clrjit_EXPORTS -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/pal/prebuilt/inc -I /home/tmds/repos/runtime/src/coreclr/../../artifacts/obj/coreclr -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt -I /home/tmds/repos/runtime/src/coreclr/src/pal/src/safecrt -I /home/tmds/repos/runtime/src/coreclr/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/inc/winrt -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/amd64 -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/dump -I /home/tmds/repos/runtime/src/coreclr/src/md/inc -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/bcltype -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/cryptography -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/inc -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt/cpp -I /home/tmds/repos/runtime/src/coreclr/src/nativeresources -I /home/tmds/repos/runtime/src/coreclr/src/jit/./jitstd -I /home/tmds/repos/runtime/src/coreclr/src/jit/../inc -D NDEBUG -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/x86_64-redhat-linux -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/9/../../../../include/c++/9/backward -O3 -Wall -Wno-null-conversion -Werror -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-invalid-offsetof -Wno-unused-private-field -Wno-microsoft -Wno-tautological-compare -Wno-constant-logical-operand -Wno-pragma-pack -Wno-unknown-warning-option -Wno-incompatible-ms-struct -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled -std=gnu++11 -fdeprecated-macro -fdebug-compilation-dir /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/jit/standalone -ferror-limit 4096 -fmessage-length 0 -fvisibility hidden -fwrapv -stack-protector 2 -fms-extensions -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -o CMakeFiles/clrjit.dir/__/codegencommon.cpp.o -x c++ /home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp 
  1.	/home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp:5632:1: current parser token 'void'
  2.	/home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp:4852:24: LLVM IR generation of declaration 'CodeGen::genPushCalleeSavedRegisters'
  3.	/home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp:4852:24: Generating code for declaration 'CodeGen::genPushCalleeSavedRegisters'
   #0 0x00007f9317f7a2ee llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib64/libLLVM-9.so+0xbb82ee)
   #1 0x00007f9317f781e4 llvm::sys::RunSignalHandlers() (/lib64/libLLVM-9.so+0xbb61e4)
   #2 0x00007f9317f78365 (/lib64/libLLVM-9.so+0xbb6365)
   #3 0x00007f93140ac6b0 __restore_rt (/lib64/libc.so.6+0x3c6b0)
   #4 0x00007f93140ac625 raise (/lib64/libc.so.6+0x3c625)
   #5 0x00007f93140958d9 abort (/lib64/libc.so.6+0x258d9)
   #6 0x00007f9314c86518 (/lib64/libclang-cpp.so.9+0x839518)
   #7 0x00007f9315daba87 (/lib64/libclang-cpp.so.9+0x195ea87)
   #8 0x00007f9315daf373 (/lib64/libclang-cpp.so.9+0x1962373)
   #9 0x00007f9315db075e (/lib64/libclang-cpp.so.9+0x196375e)
  #10 0x00007f9315daf1a3 (/lib64/libclang-cpp.so.9+0x19621a3)
  #11 0x00007f9315daf3d6 (/lib64/libclang-cpp.so.9+0x19623d6)
  #12 0x00007f9315db075e (/lib64/libclang-cpp.so.9+0x196375e)
  #13 0x00007f9315daf1a3 (/lib64/libclang-cpp.so.9+0x19621a3)
  #14 0x00007f9315daf54f (/lib64/libclang-cpp.so.9+0x196254f)
  #15 0x00007f9315db075e (/lib64/libclang-cpp.so.9+0x196375e)
  #16 0x00007f9315daf1a3 (/lib64/libclang-cpp.so.9+0x19621a3)
  #17 0x00007f9315dc9e0e clang::CodeGen::CodeGenPGO::computeRegionCounts(clang::Decl const*) (/lib64/libclang-cpp.so.9+0x197ce0e)
  #18 0x00007f9315dca0ff clang::CodeGen::CodeGenPGO::assignRegionCounters(clang::GlobalDecl, llvm::Function*) (/lib64/libclang-cpp.so.9+0x197d0ff)
  #19 0x00007f9315d63621 clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl, llvm::Function*, clang::CodeGen::CGFunctionInfo const&) (/lib64/libclang-cpp.so.9+0x1916621)
  #20 0x00007f9315d99546 clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/lib64/libclang-cpp.so.9+0x194c546)
  #21 0x00007f9315d96cc3 clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl, llvm::GlobalValue*) (/lib64/libclang-cpp.so.9+0x1949cc3)
  #22 0x00007f9315d97253 clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl) (/lib64/libclang-cpp.so.9+0x194a253)
  #23 0x00007f9315d9cf3d clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (/lib64/libclang-cpp.so.9+0x194ff3d)
  #24 0x00007f9315e1002f (/lib64/libclang-cpp.so.9+0x19c302f)
  #25 0x00007f9315d46201 (/lib64/libclang-cpp.so.9+0x18f9201)
  #26 0x00007f9314da1d14 clang::ParseAST(clang::Sema&, bool, bool) (/lib64/libclang-cpp.so.9+0x954d14)
  #27 0x00007f9315d4bbc1 clang::CodeGenAction::ExecuteAction() (/lib64/libclang-cpp.so.9+0x18febc1)
  #28 0x00007f93164afa11 clang::FrontendAction::Execute() (/lib64/libclang-cpp.so.9+0x2062a11)
  #29 0x00007f93164662bb clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-cpp.so.9+0x20192bb)
  #30 0x00007f9316533928 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-cpp.so.9+0x20e6928)
  #31 0x0000562769cc79ff cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang-9+0x179ff)
  #32 0x0000562769cc3466 main (/usr/bin/clang-9+0x13466)
  #33 0x00007f93140971a3 __libc_start_main (/lib64/libc.so.6+0x271a3)
  #34 0x0000562769cc3ffe _start (/usr/bin/clang-9+0x13ffe)
  [ 52%] Building CXX object src/vm/CMakeFiles/cee_dac.dir/debughelp.cpp.o
  [ 52%] Building CXX object src/utilcode/CMakeFiles/utilcode.dir/loaderheap.cpp.o
  [ 53%] Building CXX object src/vm/CMakeFiles/cee_dac.dir/debuginfostore.cpp.o
  [ 53%] Building CXX object src/vm/wks/CMakeFiles/cee_wks.dir/__/debughelp.cpp.o
  [ 53%] Building CXX object src/utilcode/CMakeFiles/utilcode_dac.dir/guidfromname.cpp.o
  [ 54%] Building CXX object src/utilcode/CMakeFiles/utilcode_dac.dir/memorypool.cpp.o
  clang-9: error: unable to execute command: Aborted (core dumped)
  clang-9: error: clang frontend command failed due to signal (use -v to see invocation)
  clang version 9.0.0 (Fedora 9.0.0-1.fc31)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin
  clang-9: note: diagnostic msg: PLEASE submit a bug report to  and include the crash backtrace, preprocessed source, and associated run script.
  [ 54%] Building CXX object src/debug/di/CMakeFiles/cordbdi.dir/shared.cpp.o
  clang-9: note: diagnostic msg: 
  ********************
  
  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
  Preprocessed source(s) and associated run script(s) are located at:
  clang-9: note: diagnostic msg: /tmp/codegencommon-5bf5d9.cpp
  clang-9: note: diagnostic msg: /tmp/codegencommon-5bf5d9.sh
  clang-9: note: diagnostic msg: 
  
  ********************
  gmake[2]: *** [src/jit/standalone/CMakeFiles/clrjit.dir/build.make:128: src/jit/standalone/CMakeFiles/clrjit.dir/__/codegencommon.cpp.o] Error 254

```

Comment 1 Tom Deseyn 2020-04-23 14:19:56 UTC
Created attachment 1681165 [details]
codegencommon-5bf5d9.sh

Comment 2 Tom Deseyn 2020-04-23 14:21:10 UTC
I've attached the files that are mentioned in the crash message.

Comment 3 serge_sans_paille 2020-04-23 17:17:31 UTC
Thanks Tom for the report. could you attach the preprocessed file to this bug? it's likely to be the output of

/usr/bin/clang-9 -E -D DEBUGGING_SUPPORTED -D DISABLE_CONTRACTS -D FEATURE_ARRAYSTUB_AS_IL -D FEATURE_BASICFREEZE -D FEATURE_CODE_VERSIONING -D FEATURE_COLLECTIBLE_TYPES -D FEATURE_CORECLR -D FEATURE_CORESYSTEM -D FEATURE_CORRUPTING_EXCEPTIONS -D FEATURE_DBGIPC_TRANSPORT_DI -D FEATURE_DBGIPC_TRANSPORT_VM -D FEATURE_DEFAULT_INTERFACES -D FEATURE_EH_FUNCLETS -D FEATURE_EVENTSOURCE_XPLAT -D FEATURE_EVENT_TRACE -D FEATURE_HIJACK -D FEATURE_HW_INTRINSICS -D FEATURE_ICASTABLE -D FEATURE_INSTANTIATINGSTUB_AS_IL -D FEATURE_ISYM_READER -D FEATURE_MANAGED_ETW -D FEATURE_MANAGED_ETW_CHANNELS -D FEATURE_MANUALLY_MANAGED_CARD_BUNDLES -D FEATURE_MULTICASTSTUB_AS_IL -D FEATURE_MULTICOREJIT -D FEATURE_MULTIREG_RETURN -D FEATURE_NO_HOST -D FEATURE_ON_STACK_REPLACEMENT -D FEATURE_PAL_ANSI -D FEATURE_PERFMAP -D FEATURE_PERFTRACING -D FEATURE_PORTABLE_SHUFFLE_THUNKS -D FEATURE_PROFAPI_ATTACH_DETACH -D FEATURE_READYTORUN -D FEATURE_READYTORUN_COMPILER -D FEATURE_REJIT -D FEATURE_REMOTE_PROC_MEM -D FEATURE_SIMD -D FEATURE_STANDALONE_GC -D FEATURE_STUBS_AS_IL -D FEATURE_SVR_GC -D FEATURE_SYMDIFF -D FEATURE_TIERED_COMPILATION -D FEATURE_USE_ASM_GC_WRITE_BARRIERS -D FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -D FEATURE_UTF8STRING -D FEATURE_WINMD_RESILIENT -D HOST_64BIT -D HOST_AMD64 -D HOST_UNIX -D JIT_BUILD -D NDEBUG -D PROFILING_SUPPORTED -D SELF_NO_HOST -D TARGET_64BIT -D TARGET_AMD64 -D TARGET_LINUX -D TARGET_UNIX -D UNICODE -D UNIX_AMD64_ABI -D UNIX_AMD64_ABI_ITF -D URTBLDENV_FRIENDLY=Retail -D _BLD_CLR -D _SECURE_SCL=0 -D _UNICODE -D clrjit_EXPORTS -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/pal/prebuilt/inc -I /home/tmds/repos/runtime/src/coreclr/../../artifacts/obj/coreclr -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt -I /home/tmds/repos/runtime/src/coreclr/src/pal/src/safecrt -I /home/tmds/repos/runtime/src/coreclr/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/inc/winrt -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/amd64 -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/dump -I /home/tmds/repos/runtime/src/coreclr/src/md/inc -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/bcltype -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/cryptography -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/inc -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt/cpp -I /home/tmds/repos/runtime/src/coreclr/src/nativeresources -I /home/tmds/repos/runtime/src/coreclr/src/jit/./jitstd -I /home/tmds/repos/runtime/src/coreclr/src/jit/../inc -D NDEBUG -O3 -Wall -Wno-null-conversion -Werror -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-invalid-offsetof -Wno-unused-private-field -Wno-microsoft -Wno-tautological-compare -Wno-constant-logical-operand -Wno-pragma-pack -Wno-unknown-warning-option -Wno-incompatible-ms-struct -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled -std=gnu++11 -fdeprecated-macro -fvisibility hidden -fwrapv -stack-protector 2 -fms-extensions -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -o - /home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp

Comment 4 Tom Deseyn 2020-04-23 18:39:08 UTC
Created attachment 1681228 [details]
preprocessed.cpp

Comment 5 Tom Deseyn 2020-04-23 18:40:08 UTC
Hi Serge, I've added the preprocessed output.

I made some small changes to the command based on errors clang gave. This is what I ran:

/usr/bin/clang-9 -E -D DEBUGGING_SUPPORTED -D DISABLE_CONTRACTS -D FEATURE_ARRAYSTUB_AS_IL -D FEATURE_BASICFREEZE -D FEATURE_CODE_VERSIONING -D FEATURE_COLLECTIBLE_TYPES -D FEATURE_CORECLR -D FEATURE_CORESYSTEM -D FEATURE_CORRUPTING_EXCEPTIONS -D FEATURE_DBGIPC_TRANSPORT_DI -D FEATURE_DBGIPC_TRANSPORT_VM -D FEATURE_DEFAULT_INTERFACES -D FEATURE_EH_FUNCLETS -D FEATURE_EVENTSOURCE_XPLAT -D FEATURE_EVENT_TRACE -D FEATURE_HIJACK -D FEATURE_HW_INTRINSICS -D FEATURE_ICASTABLE -D FEATURE_INSTANTIATINGSTUB_AS_IL -D FEATURE_ISYM_READER -D FEATURE_MANAGED_ETW -D FEATURE_MANAGED_ETW_CHANNELS -D FEATURE_MANUALLY_MANAGED_CARD_BUNDLES -D FEATURE_MULTICASTSTUB_AS_IL -D FEATURE_MULTICOREJIT -D FEATURE_MULTIREG_RETURN -D FEATURE_NO_HOST -D FEATURE_ON_STACK_REPLACEMENT -D FEATURE_PAL_ANSI -D FEATURE_PERFMAP -D FEATURE_PERFTRACING -D FEATURE_PORTABLE_SHUFFLE_THUNKS -D FEATURE_PROFAPI_ATTACH_DETACH -D FEATURE_READYTORUN -D FEATURE_READYTORUN_COMPILER -D FEATURE_REJIT -D FEATURE_REMOTE_PROC_MEM -D FEATURE_SIMD -D FEATURE_STANDALONE_GC -D FEATURE_STUBS_AS_IL -D FEATURE_SVR_GC -D FEATURE_SYMDIFF -D FEATURE_TIERED_COMPILATION -D FEATURE_USE_ASM_GC_WRITE_BARRIERS -D FEATURE_USE_SOFTWARE_WRITE_WATCH_FOR_GC_HEAP -D FEATURE_UTF8STRING -D FEATURE_WINMD_RESILIENT -D HOST_64BIT -D HOST_AMD64 -D HOST_UNIX -D JIT_BUILD -D NDEBUG -D PROFILING_SUPPORTED -D SELF_NO_HOST -D TARGET_64BIT -D TARGET_AMD64 -D TARGET_LINUX -D TARGET_UNIX -D UNICODE -D UNIX_AMD64_ABI -D UNIX_AMD64_ABI_ITF -D URTBLDENV_FRIENDLY=Retail -D _BLD_CLR -D _SECURE_SCL=0 -D _UNICODE -D clrjit_EXPORTS -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/jit/standalone -I /home/tmds/repos/runtime/src/coreclr/src/pal/prebuilt/inc -I /home/tmds/repos/runtime/src/coreclr/../../artifacts/obj/coreclr -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt -I /home/tmds/repos/runtime/src/coreclr/src/pal/src/safecrt -I /home/tmds/repos/runtime/src/coreclr/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/inc/winrt -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/amd64 -I /home/tmds/repos/runtime/src/coreclr/src/debug/inc/dump -I /home/tmds/repos/runtime/src/coreclr/src/md/inc -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/bcltype -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/cryptography -I /home/tmds/repos/runtime/src/coreclr/src/classlibnative/inc -I /home/tmds/repos/runtime/artifacts/obj/coreclr/Linux.x64.Release/src/inc -I /home/tmds/repos/runtime/src/coreclr/src/pal/inc/rt/cpp -I /home/tmds/repos/runtime/src/coreclr/src/nativeresources -I /home/tmds/repos/runtime/src/coreclr/src/jit/./jitstd -I /home/tmds/repos/runtime/src/coreclr/src/jit/../inc -D NDEBUG -O3 -Wall -Wno-null-conversion -Werror -Wno-unused-variable -Wno-unused-value -Wno-unused-function -Wno-invalid-offsetof -Wno-unused-private-field -Wno-microsoft -Wno-tautological-compare -Wno-constant-logical-operand -Wno-pragma-pack -Wno-unknown-warning-option -Wno-incompatible-ms-struct -Wno-profile-instr-out-of-date -Wno-profile-instr-unprofiled -std=gnu++11 -fwrapv -fstack-protector -fms-extensions -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -faddrsig -o - /home/tmds/repos/runtime/src/coreclr/src/jit/codegencommon.cpp >/tmp/preprocessed.cpp

Comment 6 serge_sans_paille 2020-05-04 08:52:52 UTC
Thanks Tom! I'd also need this file: /home/tmds/.nuget/packages/optimization.linux-x64.pgo.coreclr/99.99.99-master-20200228.3/data/clrjit.profdata

Comment 7 Tom Deseyn 2020-05-04 11:27:36 UTC
Created attachment 1684786 [details]
clrjit.profdata

Comment 8 serge_sans_paille 2020-05-06 06:54:31 UTC
Thanks. i've been able to reproduce using Fedora's rpm, but currently fails to reproduce using self-built versions. I'm investigating :-)

Comment 9 serge_sans_paille 2020-05-11 15:40:46 UTC
Tom, I've been digging (a lot) in that issue, and the profile info fail to load correctly whatever the clang version, from 9.0.1 to master version. I also see that the profile information are downloaded instead of being produced, so there's a risk of mismatch here. Does that ring any bell?

Comment 10 Tom Deseyn 2020-05-11 16:02:50 UTC
Serge, thank you for investigating this!

Given the path, I also think the pgo data is downloaded.
If you think the root cause is likely to be a version mismatch, we can create an issue for it in .NET Core repo.
The repo is at https://github.com/dotnet/runtime. You can create the issue, or I can do it if you like. My handle is @tmds.


I think the first question we may get is: what kind of compatibility there is between versions.

Comment 11 serge_sans_paille 2020-05-13 14:45:47 UTC
Thanks for the hint. I'm unsure of the wording, but I opened https://github.com/dotnet/runtime/issues/36344

Comment 12 serge_sans_paille 2020-05-14 20:07:03 UTC
https://reviews.llvm.org/D79961 should fix the issue. This turned to be an important bug, thanks *a lot* Tom for raising it.

Comment 13 Tom Deseyn 2020-05-19 13:08:05 UTC
Hi Serge, great that you found the root cause!

I had a look at the bug report, do I understand correctly that pgo data for .NET Core will need to be regenerated?

Comment 14 serge_sans_paille 2020-07-02 14:11:50 UTC
That's the easier and safer path, yes. Ideally use the same compiler version to generate and use the profdata. The patch landed upstream but won't be available until clang-11.

Comment 15 serge_sans_paille 2020-07-28 08:53:09 UTC
Small update: the patch is in the release/11.x branch of llvm, so the bug is going to be fixed once llvm 11 lands in rawhide.

Comment 16 Ben Cotton 2020-11-03 16:38:37 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 17 Ben Cotton 2020-11-24 20:13:09 UTC
Fedora 31 changed to end-of-life (EOL) status on 2020-11-24. Fedora 31 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.