Bug 1309682

Summary: gcc-4.8.5-4.el7 segfaults
Product: Red Hat Enterprise Linux 7 Reporter: Lukáš Nykrýn <lnykryn>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CANTFIX QA Contact: qe-baseos-tools-bugs
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: fweimer, mpolacek, ohudlick
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-04 12:42:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1413146    
Attachments:
Description Flags
some files none

Description Lukáš Nykrýn 2016-02-18 13:13:29 UTC
Description of problem:
We are trying to setup CI for upstream systemd, but compilation seems to always end with segfault of gcc. I am only able to reproduce on openstack machine from our QE. We have not seen it anywhere else.

Version-Release number of selected component (if applicable):
gcc-4.8.5-4.el7.x86_64

How reproducible:
always

Steps to Reproduce:

Ping me on IRC and I will prepare a machine, where this issue can be reproduced.


1. Fetch this repo https://copr.fedorainfracloud.org/coprs/lnykryn/systemd-centosci-environment/
2. install systemd-ci-environment metapackage
3. clone systemd upstream sources https://github.com/systemd/systemd
4.  apply this small patch
diff --git a/src/basic/missing.h b/src/basic/missing.h
index f3d3236..ddb70cc 100644
--- a/src/basic/missing.h
+++ b/src/basic/missing.h
@@ -889,6 +889,7 @@ static inline int setns(int fd, int nstype) {
 
 #define IFLA_BRPORT_MAX (__IFLA_BRPORT_MAX - 1)
 #endif
+#define IFLA_BRPORT_PROXYARP 10
 
 #if !HAVE_DECL_NDA_IFINDEX
 #define NDA_UNSPEC 0

5. run ./autogen.sh && ./configure && make


Actual results:
[0 root@qeos-33 systemd]# gcc -std=gnu99 -pipe -Wall -Wextra -Wundef -Wformat=2 -Wformat-security -Wformat-nonliteral -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Werror=overflow -Wnested-externs -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong -fPIE --param=ssp-buffer-size=4 -Werror=shadow -flto -ffunction-sections -fdata-sections -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/uuid -g -O2 -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -Wl,-fuse-ld=gold -o systemd-analyze src/analyze/systemd_analyze-analyze.o src/analyze/systemd_analyze-analyze-verify.o  ./.libs/libcore.a -lselinux -lcap -lrt -lm -lresolv -llzma -lgcrypt -ldl -lgpg-error -lacl -lidn -lseccomp -lpam -lpam_misc -laudit -lkmod -lmount -pthread
src/core/dbus.c: In function ‘bus_init’:
src/core/dbus.c:1041:5: internal compiler error: Neoprávněný přístup do paměti (SIGSEGV)
 int bus_init(Manager *m, bool try_bus_connect) {
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
lto-wrapper: gcc returned 1 exit status
/usr/bin/ld.gold: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

Comment 1 Marek Polacek 2016-02-18 13:18:21 UTC
Please attach preprocessed source (e.g. use -save-temps) and g++ options used
to compile it.

Comment 2 Marek Polacek 2016-02-18 13:18:49 UTC
(In reply to Marek Polacek from comment #1)
> Please attach preprocessed source (e.g. use -save-temps) and g++ options used
> to compile it.

gcc, not g++, in this case.

Comment 4 Lukáš Nykrýn 2016-02-18 14:00:27 UTC
Created attachment 1128226 [details]
some files

Comment 8 Marek Polacek 2017-04-04 12:42:55 UTC
I think we won't be able to fix this in RHEL7; not using -flto will help.  I think let's close this BZ.