RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1668072 - rustc 1.32.0 gets SIGSEGV when compiling with LTO
Summary: rustc 1.32.0 gets SIGSEGV when compiling with LTO
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: llvm-toolset
Version: 8.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: serge_sans_paille
QA Contact: Miloš Prchlík
Vladimír Slávik
URL:
Whiteboard:
Depends On: 1668033
Blocks: 1699374 1701002
TreeView+ depends on / blocked
 
Reported: 2019-01-21 20:36 UTC by Josh Stone
Modified: 2021-09-17 08:35 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of: 1668033
: 1699374 (view as bug list)
Environment:
Last Closed: 2019-11-05 20:56:03 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2019:3370 0 None None None 2019-11-05 20:56:22 UTC

Description Josh Stone 2019-01-21 20:36:50 UTC
+++ This bug was initially created as a clone of Bug #1668033 +++

Koschei is reporting build failures in several packages, and the common thread is that they're all applications building with "-C lto", via "lto = true" in Config.toml.

Here's what coredumpctl captured from one crash:

Stack trace of thread 18508:                                                                                                                               
#0  0x00007f2398ae02e3 _ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEEPKNS_15DICompositeTypeE (libLLVM-7.so)                                                
#1  0x00007f2398ae055c _ZN4llvm9DwarfUnit18getOrCreateTypeDIEEPKNS_6MDNodeE (libLLVM-7.so)                                                                 
#2  0x00007f2398ae0588 _ZN4llvm9DwarfUnit7addTypeERNS_3DIEEPKNS_6DITypeENS_5dwarf9AttributeE (libLLVM-7.so)                                                
#3  0x00007f2398ae21c4 _ZN4llvm9DwarfUnit18constructMemberDIEERNS_3DIEEPKNS_13DIDerivedTypeE (libLLVM-7.so)                                                
#4  0x00007f2398ae0094 _ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEEPKNS_15DICompositeTypeE (libLLVM-7.so)                                                
#5  0x00007f2398ae055c _ZN4llvm9DwarfUnit18getOrCreateTypeDIEEPKNS_6MDNodeE (libLLVM-7.so)                                                                 
#6  0x00007f2398ae0588 _ZN4llvm9DwarfUnit7addTypeERNS_3DIEEPKNS_6DITypeENS_5dwarf9AttributeE (libLLVM-7.so)                                                
#7  0x00007f2398ae29d5 _ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEEPKNS_13DIDerivedTypeE (libLLVM-7.so)                                                  
#8  0x00007f2398ae0549 _ZN4llvm9DwarfUnit18getOrCreateTypeDIEEPKNS_6MDNodeE (libLLVM-7.so)                                                                 
#9  0x00007f2398ae0588 _ZN4llvm9DwarfUnit7addTypeERNS_3DIEEPKNS_6DITypeENS_5dwarf9AttributeE (libLLVM-7.so)                                                
#10 0x00007f2398ae0904 _ZN4llvm9DwarfUnit33constructTemplateTypeParameterDIEERNS_3DIEEPKNS_23DITemplateTypeParameterE (libLLVM-7.so)                       
#11 0x00007f2398ae09ab _ZN4llvm9DwarfUnit17addTemplateParamsERNS_3DIEENS_24MDTupleTypedArrayWrapperINS_6DINodeEEE (libLLVM-7.so)                           
#12 0x00007f2398adff36 _ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEEPKNS_15DICompositeTypeE (libLLVM-7.so)                                                
#13 0x00007f2398ae055c _ZN4llvm9DwarfUnit18getOrCreateTypeDIEEPKNS_6MDNodeE (libLLVM-7.so)                                                                 
#14 0x00007f2398ae0588 _ZN4llvm9DwarfUnit7addTypeERNS_3DIEEPKNS_6DITypeENS_5dwarf9AttributeE (libLLVM-7.so)                                                
#15 0x00007f2398ae21c4 _ZN4llvm9DwarfUnit18constructMemberDIEERNS_3DIEEPKNS_13DIDerivedTypeE (libLLVM-7.so)                                                
#16 0x00007f2398ae0094 _ZN4llvm9DwarfUnit16constructTypeDIEERNS_3DIEEPKNS_15DICompositeTypeE (libLLVM-7.so)                                                
#17 0x00007f2398ae055c _ZN4llvm9DwarfUnit18getOrCreateTypeDIEEPKNS_6MDNodeE (libLLVM-7.so)                                                                 
#18 0x00007f2398ae0588 _ZN4llvm9DwarfUnit7addTypeERNS_3DIEEPKNS_6DITypeENS_5dwarf9AttributeE (libLLVM-7.so)                                                
#19 0x00007f2398aba11e _ZN4llvm16DwarfCompileUnit28getOrCreateGlobalVariableDIEEPKNS_16DIGlobalVariableENS_8ArrayRefINS0_10GlobalExprEEE (libLLVM-7.so)    
#20 0x00007f2398ad24a8 _ZN4llvm10DwarfDebug11beginModuleEv (libLLVM-7.so)                                                                                  
#21 0x00007f2398a9b828 _ZN4llvm10AsmPrinter16doInitializationERNS_6ModuleE (libLLVM-7.so)                                                                  
#22 0x00007f23984e2386 _ZN4llvm13FPPassManager16doInitializationERNS_6ModuleE (libLLVM-7.so)
#23 0x00007f23984ed42e _ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE (libLLVM-7.so)
#24 0x00007f239b3bed2f LLVMRustWriteOutputFile (librustc_codegen_llvm-llvm.so)
#25 0x00007f239b2f003c _ZN18rustc_codegen_llvm4back5write17write_output_file17h8640b21091d225e7E (librustc_codegen_llvm-llvm.so)                           
#26 0x00007f239b2f39bd _ZN18rustc_codegen_llvm4back5write7codegen28_$u7b$$u7b$closure$u7d$$u7d$17h1a7e36b365c885d3E (librustc_codegen_llvm-llvm.so)        
#27 0x00007f239b2f2cdf _ZN18rustc_codegen_llvm4back5write7codegen17h3fb5e75aa61c6649E (librustc_codegen_llvm-llvm.so)                                      
#28 0x00007f239b2b232a _ZN17rustc_codegen_ssa4back5write17execute_work_item17h8478d07a81e84411E (librustc_codegen_llvm-llvm.so)                            
#29 0x00007f239b385ea2 _ZN3std10sys_common9backtrace28__rust_begin_short_backtrace17h1a45e9838c6e7a5eE (librustc_codegen_llvm-llvm.so)                     
#30 0x00007f239b27d0e9 _ZN3std9panicking3try7do_call17h11ffb085c1ba8f61E.llvm.13712037126756632532 (librustc_codegen_llvm-llvm.so)                         
#31 0x00007f239def30ea __rust_maybe_catch_panic (libstd-3572d7be0ebc7029.so)
#32 0x00007f239b2834b8 _ZN50_$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$8call_box17h6199afcf2d39ee01E (librustc_codegen_llvm-llvm.so)                
#33 0x00007f239dee3dfe _ZN3std10sys_common6thread12start_thread17hd08795d0743f8679E (libstd-3572d7be0ebc7029.so)                                           
#34 0x00007f239deb7366 _ZN3std3sys4unix6thread6Thread3new12thread_start17h075b38fc29fe00c4E (libstd-3572d7be0ebc7029.so)                                   
#35 0x00007f239b6b058e start_thread (libpthread.so.0)
#36 0x00007f239dd9b6a3 __clone (libc.so.6)

It only happens with LLVM7 -- F28 with LLVM6 and EPEL7 with LLVM5 are fine. Upstream rustc using a snapshot of LLVM trunk (pre-8) is also fine.

--- Additional comment from Josh Stone on 2019-01-21 10:16:38 PST ---

Rust 1.31.1 was fine, but it fails on 1.32.0 through to master (though strangely only if I set --release-channel stable). I already bisected the rust side to commit 71ce4c3007b9, part of Rust #54004. That new debug change is only enabled for LLVM7+, so it makes sense that older LLVMs are unaffected.

https://github.com/rust-lang/rust/pull/54004

I will now try to reproduce with pre-release LLVM8, and if that's working I'll see if I can bisect a possible fix from that side.

--- Additional comment from Josh Stone on 2019-01-21 10:59:42 PST ---

I confirmed that LLVM r342725 solves it, as mentioned here:
https://github.com/rust-lang/rust/issues/57762#issuecomment-456155466

Comment 3 Oneata Mircea Teodor 2019-04-12 14:31:56 UTC
This bug has been copied as 8.0.0 z-stream  bug #1699374  and now must be
resolved in the current update release, set blocker flag.

Comment 4 serge_sans_paille 2019-05-15 12:10:10 UTC
tstellar, should we apply the patch to llvm-compat that still ships llvm-7.0.1?

Comment 5 Josh Stone 2019-05-15 15:10:39 UTC
Those patches are already present with a comment for rhbz#1699374.

Comment 6 serge_sans_paille 2019-05-16 10:57:37 UTC
josh: correct, the patch is actually already applied to llvm-compat through 0001-Ensure-that-variant-part-discriminator-is-read-by-Me.patch, and naturally present in llvm-8.0.0.

Comment 8 Miloš Prchlík 2019-08-27 09:11:06 UTC
Verified with llvm-toolset:rhel8:8010020190802085723:cdc1202b.

Comment 10 errata-xmlrpc 2019-11-05 20:56:03 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:3370


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