Bug 1215427

Summary: GCC13 fails to compile some packages with error: unrecognizable insn
Product: [openSUSE] openSUSE Tumbleweed Reporter: Guillaume GARDET <guillaume.gardet>
Component: DevelopmentAssignee: Richard Biener <rguenther>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: afaerber, christophe, dmueller, meissner, rguenther
Version: Current   
Target Milestone: ---   
Hardware: aarch64   
OS: Other   
See Also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111411
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Guillaume GARDET 2023-09-18 08:38:29 UTC
In openSUSE:Factory:ARM:Rings:1-MinimalX we have 3 packages failing the same way:
fcitx
libcamera
Mesa:drivers

Maybe related to gcc13 update? https://build.opensuse.org/request/show/1110686

The error log from Mesa:drivers is:
[ 1828s] ../src/gallium/frontends/nine/nine_state.c: In function ‘nine_update_state’:
[ 1828s] ../src/gallium/frontends/nine/nine_state.c:1316:1: error: unrecognizable insn:
[ 1828s]  1316 | }
[ 1828s]       | ^
[ 1828s] (insn 10725 4838 4840 277 (parallel [
[ 1828s]             (set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
[ 1828s]                         (const_int -260 [0xfffffffffffffefc])) [143 %sfp+-260 S4 A32])
[ 1828s]                 (reg:SI 0 x0 [orig:800 _1297 ] [800]))
[ 1828s]             (set (mem/c:SI (plus:DI (reg/f:DI 29 x29)
[ 1828s]                         (const_int -256 [0xffffffffffffff00])) [143 %sfp+-256 S4 A32])
[ 1828s]                 (reg:SI 0 x0 [orig:800 _1297 ] [800]))
[ 1828s]         ]) "../src/util/bitscan.h":219:22 discrim 1 -1
[ 1828s]      (expr_list:REG_DEAD (reg:SI 0 x0 [orig:800 _1297 ] [800])
[ 1828s]         (nil)))
[ 1828s] during RTL pass: cprop_hardreg
[ 1828s] ../src/gallium/frontends/nine/nine_state.c:1316:1: internal compiler error: in extract_insn, at recog.cc:2791
[ 1828s] 0xb8d633 internal_error(char const*, ...)
[ 1828s] 	???:0
[ 1828s] 0xb83a0b fancy_abort(char const*, int, char const*)
[ 1828s] 	???:0
[ 1828s] 0x77e717 _fatal_insn(char const*, rtx_def const*, char const*, int, char const*)
[ 1828s] 	???:0
[ 1828s] 0x77e753 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
[ 1828s] 	???:0
[ 1828s] 0x102b27b extract_insn(rtx_insn*)
[ 1828s] 	???:0
[ 1828s] Please submit a full bug report, with preprocessed source (by using -freport-bug).
[ 1828s] Please include the complete backtrace with any bug report.
[ 1828s] See <https://bugs.opensuse.org/> for instructions.
[ 1828s] make: *** [/tmp/cc1ZTVEw.mk:47: /tmp/cclOD5f9.ltrans15.ltrans.o] Error 1
[ 1828s] make: *** Waiting for unfinished jobs....
[ 1828s] lto-wrapper: fatal error: make returned 2 exit status
[ 1828s] compilation terminated.
[ 1828s] /usr/lib64/gcc/aarch64-suse-linux/13/../../../../aarch64-suse-linux/bin/ld: error: lto-wrapper failed
[ 1828s] collect2: error: ld returned 1 exit status
Comment 1 Richard Biener 2023-09-18 10:02:13 UTC
Yes, reported upstream already (caused by the recent CVE change).  Once the fix is backported I'll update our GCC 13 package.
Comment 2 Guillaume GARDET 2023-09-21 08:45:31 UTC
Another occurrence is 'knot' package
Comment 3 Dirk Mueller 2023-09-21 08:52:33 UTC
how important is that CVE fix? should I temporarily revert the package for aarch64?
Comment 4 Guillaume GARDET 2023-09-21 09:16:10 UTC
(In reply to Dirk Mueller from comment #3)
> how important is that CVE fix? should I temporarily revert the package for
> aarch64?

It seems the fix is already merged upstream in gcc13 branch, according to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111411#c13

So, better to update gcc13 instead.
Comment 5 OBSbugzilla Bot 2023-09-25 12:35:06 UTC
This is an autogenerated message for OBS integration:
This bug (1215427) was mentioned in
https://build.opensuse.org/request/show/1113437 Factory / gcc13
Comment 7 Maintenance Automation 2023-11-16 16:30:13 UTC
SUSE-SU-2023:4458-1: An update that solves one vulnerability, contains five features and has nine security fixes can now be installed.

Category: security (important)
Bug References: 1206480, 1206684, 1210557, 1211427, 1212101, 1213915, 1214052, 1214460, 1215427, 1216664
CVE References: CVE-2023-4039
Jira References: PED-153, PED-2005, PED-252, PED-253, PED-6584
Sources used:
openSUSE Leap Micro 5.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
openSUSE Leap Micro 5.4 (src): gcc13-13.2.1+git7813-150000.1.6.1
openSUSE Leap 15.4 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
openSUSE Leap 15.5 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP1 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP2 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing 15 SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Manager Server 4.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Desktop 15 SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Manager Retail Branch Server 4.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Manager Proxy 4.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing 15 SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Desktop 15 SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro for Rancher 5.4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.5 (src): gcc13-13.2.1+git7813-150000.1.6.1
Basesystem Module 15-SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
Basesystem Module 15-SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
Development Tools Module 15-SP4 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
Development Tools Module 15-SP5 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Package Hub 15 15-SP4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Package Hub 15 15-SP5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing 15 SP1 LTSS 15-SP1 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing 15 SP2 LTSS 15-SP2 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing ESPOS 15 SP3 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise High Performance Computing LTSS 15 SP3 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP1 LTSS 15-SP1 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP2 LTSS 15-SP2 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server 15 SP3 LTSS 15-SP3 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP1 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Enterprise Storage 7.1 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE CaaS Platform 4.0 (src): cross-nvptx-gcc13-13.2.1+git7813-150000.1.6.1, gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.1 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.2 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro for Rancher 5.2 (src): gcc13-13.2.1+git7813-150000.1.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 8 Maintenance Automation 2023-11-20 12:30:03 UTC
SUSE-SU-2023:4480-1: An update that solves one vulnerability, contains five features and has nine security fixes can now be installed.

Category: security (important)
Bug References: 1206480, 1206684, 1210557, 1211427, 1212101, 1213915, 1214052, 1214460, 1215427, 1216664
CVE References: CVE-2023-4039
Jira References: PED-153, PED-2005, PED-252, PED-253, PED-6584
Sources used:
Toolchain Module 12 (src): gcc13-13.2.1+git7813-1.10.1, cross-nvptx-gcc13-13.2.1+git7813-1.10.1
SUSE Linux Enterprise High Performance Computing 12 SP5 (src): gcc13-13.2.1+git7813-1.10.1
SUSE Linux Enterprise Server 12 SP5 (src): gcc13-13.2.1+git7813-1.10.1
SUSE Linux Enterprise Server for SAP Applications 12 SP5 (src): gcc13-13.2.1+git7813-1.10.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 9 Maintenance Automation 2024-01-08 20:30:24 UTC
SUSE-SU-2024:0045-1: An update that solves one vulnerability, contains five features and has nine security fixes can now be installed.

Category: security (important)
Bug References: 1206480, 1206684, 1210557, 1211427, 1212101, 1213915, 1214052, 1214460, 1215427, 1216664
CVE References: CVE-2023-4039
Jira References: PED-153, PED-2005, PED-252, PED-253, PED-6584
Sources used:
SUSE Linux Enterprise Micro for Rancher 5.4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.4 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.5 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro for Rancher 5.3 (src): gcc13-13.2.1+git7813-150000.1.6.1
SUSE Linux Enterprise Micro 5.3 (src): gcc13-13.2.1+git7813-150000.1.6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 10 Richard Biener 2024-01-25 07:56:27 UTC
Should be fixed.
Comment 11 Christophe Marin 2024-01-30 07:46:49 UTC
(In reply to Richard Biener from comment #10)
> Should be fixed.

Will Leap 15.5 and 15.6 get the fix?

I'm seeing similar errors in qt6-quick3dphysics with gcc13 and the :Update repo enabled

https://build.opensuse.org/package/live_build_log/KDE:Qt6/qt6-quick3dphysics/openSUSE_Leap_15.5/aarch64

https://build.opensuse.org/package/live_build_log/KDE:Qt6/qt6-quick3dphysics/openSUSE_Leap_15.6/aarch64


[   56s] ../src/3rdparty/PhysX/source/geomutils/src/pcm/GuPCMTriangleContactGen.cpp: In function 'void physx::generatedPolyContacts(const Gu::PolygonalData&, const Gu::HullPolygonData&, const Gu::TriangleV&, PxU32, PxU8, Gu::SupportLocal*, Gu::MeshPersistentContact*, PxU32&, const shdfnd::aos::FloatV&, const shdfnd::aos::Vec3V&, Cm::RenderOutput*)':
[   56s] ../src/3rdparty/PhysX/source/geomutils/src/pcm/GuPCMTriangleContactGen.cpp:1097:9: error: unrecognizable insn:
[   56s]  1097 |         }
[   56s]       |         ^
[   56s] (insn 4026 489 4027 11 (parallel [
[   56s]             (set (mem/c:SF (plus:DI (reg/f:DI 29 x29)
[   56s]                         (const_int -260 [0xfffffffffffffefc])) [61 %sfp+-260 S4 A32])
[   56s]                 (reg:SF 34 v2 [orig:388 _872 ] [388]))
[   56s]             (set (mem/c:SF (plus:DI (reg/f:DI 29 x29)
[   56s]                         (const_int -256 [0xffffffffffffff00])) [61 %sfp+-256 S4 A64])
[   56s]                 (reg:SF 34 v2 [orig:388 _872 ] [388]))
[   56s]         ]) "../src/3rdparty/PhysX/source/foundation/include/PsVecMathAoSScalarInline.h":1544:56 -1
[   56s]      (nil))
[   56s] during RTL pass: cprop_hardreg
[   56s] ../src/3rdparty/PhysX/source/geomutils/src/pcm/GuPCMTriangleContactGen.cpp:1097:9: internal compiler error: in extract_insn, at recog.cc:2791
[   56s] 0xffff94f5b543 __libc_start_call_main
[   56s] 	???:0
[   56s] 0xffff94f5b617 __libc_start_main_alias_2
[   56s] 	???:0
Comment 12 Richard Biener 2024-01-30 08:35:24 UTC
Leap 15.5 and later should have the fix already, it was in the gcc13.31413 update.  Specifically that has

-------------------------------------------------------------------
Tue Nov  7 12:57:49 UTC 2023 - Richard Biener <rguenther@suse.com>

- Add gcc13-bsc1216664.patch, works around SAP ASE DB crash during
  C++ standard library initialization.  [bsc#1216664]

-------------------------------------------------------------------
Fri Sep 22 08:07:30 UTC 2023 - Dirk Müller <dmueller@suse.com>

- add pr111411.patch (bsc#1215427)

on SLE15 SP5 the rpm is gcc13-13.2.1+git7813-150000.1.6.1.x86_64.
Comment 13 Marcus Meissner 2024-01-30 08:55:12 UTC
the KDE;Qt6 build above use gcc12 or gcc7 C++ in its logfiles.
Comment 14 Christophe Marin 2024-01-30 09:02:38 UTC
Oh right, my bad. Using gcc13 where it's available is something I planned but didn't push yet.

Seems gcc12 has the same issue then
Comment 15 Richard Biener 2024-01-30 09:07:48 UTC
(In reply to Christophe Marin from comment #14)
> Oh right, my bad. Using gcc13 where it's available is something I planned
> but didn't push yet.
> 
> Seems gcc12 has the same issue then

Yes, note that while GCC 12 might be officially out of support we still plan to push GCC 12.4 once that's available.

It's advisable to bump all "other" compiler usages in Leap to GCC 13 which
will be maintained for a quite long time by us and stop using GCCs inbetween
that and GCC 7 (so 8, 9, 10, 11 or 12).