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 1690422 - cc: Internal error: Segmentation fault (program cc1)
Summary: cc: Internal error: Segmentation fault (program cc1)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gcc
Version: 6.10
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Marek Polacek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-19 12:57 UTC by Jaroslav Škarvada
Modified: 2019-03-26 16:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-03-26 16:33:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
pre-processed file (371.38 KB, text/plain)
2019-03-20 12:59 UTC, Jaroslav Škarvada
no flags Details
pre-processed file (393.09 KB, text/plain)
2019-03-20 14:37 UTC, Jaroslav Škarvada
no flags Details

Description Jaroslav Škarvada 2019-03-19 12:57:57 UTC
Description of problem:
When upgrading putty in EPEL to version 0.71 to fix multiple security related problems (bug 1690386 I hit internal compiler error. The same code compiles OK on RHEL-7 / Fedora. And it also compiles OK on RHEL-7 ppc64. Unfortunately I haven't time to investigate it more deep.

Version-Release number of selected component (if applicable):
gcc-4.4.7-23.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. wget 'https://jskarvad.fedorapeople.org/putty/putty-0.71-1.el6.src.rpm'
2. rpmbuild --rebuild ./putty-0.71-1.el6.src.rpm
3.

* it may require EPEL-6 repository enabled

Actual results:
...
cc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -D _FILE_OFFSET_BITS=64  -c ../sshdes.c
cc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [sshaes.o] Error 1
make: *** Waiting for unfinished jobs....
...

Expected results:
No error

Additional info:

Comment 2 Jaroslav Škarvada 2019-03-19 17:34:44 UTC
(In reply to Jaroslav Škarvada from comment #0)
> Description of problem:
> When upgrading putty in EPEL to version 0.71 to fix multiple security
> related problems (bug 1690386 I hit internal compiler error. The same code
> compiles OK on RHEL-7 / Fedora. And it also compiles OK on RHEL-7 ppc64.
> Unfortunately I haven't time to investigate it more deep.
> 

I wanted to say it also compiles OK on RHEL-6 ppc64. Looks like the segfault is related to the rewrite of crypto routines in putty to gnu99 standard.

Comment 3 Jaroslav Škarvada 2019-03-19 18:14:07 UTC
In case it's known bug, please let me know how to workaround it in the code triggering this.

Comment 4 Marek Polacek 2019-03-19 18:47:08 UTC
Can you please provide the preprocessed source file?  Add -save-temps to
cc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -D _FILE_OFFSET_BITS=64  -c ../sshdes.c

There will be no 6.11, so the only way to fix something in RHEL 6 gcc would be via 6.10.z.

Comment 5 Jaroslav Škarvada 2019-03-20 12:55:02 UTC
(In reply to Marek Polacek from comment #4)
> Can you please provide the preprocessed source file?  Add -save-temps to
> cc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
> -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/
> -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
> -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0
> -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
> -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1
> -I/usr/include/freetype2 -I/usr/include/libpng12   -D _FILE_OFFSET_BITS=64 
> -c ../sshdes.c
> 
> There will be no 6.11, so the only way to fix something in RHEL 6 gcc would
> be via 6.10.z.

Thanks for replying. Unfortunately, I was wrong with the command causing the segfault, due to the make parallelism, it's actually the following command:
# LANG=C cc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -D _FILE_OFFSET_BITS=64  -c ../sshaes.c
cc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.

NP, I will provide the pre-processed files for it.

I am quite realistic about the possibility of the fix in the RHEL-6, so it would be enough for me to know how to workaround the problem in the code.

Comment 6 Jaroslav Škarvada 2019-03-20 12:57:17 UTC
Maybe getting closer:
# LANG=C cc  -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -DXDG_DEFAULT -std=gnu99 -Wvla -g -I.././ -I../charset/ -I../windows/ -I../unix/ -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12   -D _FILE_OFFSET_BITS=64  -c ../sshaes.c -save-temps
cc: warning: -pipe ignored because -save-temps specified
In file included from ../sshaes.c:1261:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/wmmintrin.h:34:3: error: #error "AES/PCLMUL instructions not enabled"
In file included from ../sshaes.c:1262:
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include/smmintrin.h:32:3: error: #error "SSE4.1 instruction set not enabled"

Comment 7 Jaroslav Škarvada 2019-03-20 12:59:16 UTC
Created attachment 1546057 [details]
pre-processed file

Comment 8 Jakub Jelinek 2019-03-20 13:12:24 UTC
For so old gcc versions, I'd strongly suggest not to use #pragma GCC target before including the intrinsic headers, but instead separate whatever you want to compile with AES/SSE4.1 support into a separate source file and build that with -maes -msse4.1.

Comment 9 Jakub Jelinek 2019-03-20 13:16:53 UTC
And because of the above errors, the preprocessed source is really useless, because the aes nor sse4.1 intrinsics aren't defined in there.
So, if -maes -msse4.1 on the command line doesn't help, please attach a new preprocessed source generated with those options.

Comment 10 Jaroslav Škarvada 2019-03-20 14:37:13 UTC
Created attachment 1546093 [details]
pre-processed file

-maes -msse4.1 helped, new pre-processed file.

Comment 11 Jaroslav Škarvada 2019-03-20 14:37:47 UTC
(In reply to Jaroslav Škarvada from comment #10)
> Created attachment 1546093 [details]
> pre-processed file
> 
> -maes -msse4.1 helped, new pre-processed file.

So with it compiles without internal error.

Comment 12 Jaroslav Škarvada 2019-03-20 15:04:02 UTC
I will probably disable the accelerated code on x86. The binary should run on all RHEL-6 supported HW. And if I am not mistaken the default RHEL-6 CFLAGS doesn't include the aes, msse4.1 support (please correct me if I am wrong).

Comment 13 Jakub Jelinek 2019-03-20 15:06:50 UTC
It depends if the functions from that TU are used unconditionally (that would be a bug that needs to be fixed) or or only conditionally, depending on what ISA flags cpuid detects (then it would be just fine).

Comment 14 Jaroslav Škarvada 2019-03-20 17:19:54 UTC
I compiled the package in question with SW AES which workarounded the problem. So this BZ is no longer blocking me. Thanks for info.


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