Bug 2171964

Summary: ICE / segfault in process_function_and_variable_attributes() when building tokodon on ppc64le
Product: [Fedora] Fedora Reporter: Justin Zobel <justin.zobel>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 39CC: aoliva, dan, dmalcolm, fweimer, jakub, jlaw, jwakely, kde-sig, mcermak, mpolacek, msebor, nickc, sipoyare, thunderbirdtr
Target Milestone: ---   
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: 2024-11-27 21:07:13 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:
Embargoed:
Bug Depends On: 1071880    
Bug Blocks:    
Attachments:
Description Flags
preprocessed sources none

Description Justin Zobel 2023-02-21 02:32:53 UTC
Build has failed only on ppc64le 4 times now, one build example https://koji.fedoraproject.org/koji/taskinfo?taskID=97784827

Upstream has stated they will not support ppc64le.

Adding ExcludeArch until this can be fixed.

Comment 1 Dan Horák 2023-02-21 07:07:45 UTC
This is a gcc internal error, probably gcc13 related, I will try to get the details and switch the bug to gcc.

Comment 2 Justin Zobel 2023-02-21 07:29:45 UTC
Thanks Dan much appreciated!

Comment 3 Dan Horák 2023-02-21 08:04:58 UTC
(gdb) run
Starting program: /usr/bin/g++ -DHAVE_KIO -DKCOREADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_WEBSOCKETS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/sharkcz/tokodon/tokodon-23.02.0/redhat-linux-build/src -I/home/sharkcz/tokodon/tokodon-23.02.0/src -I/home/sharkcz/tokodon/tokodon-23.02.0/redhat-linux-build/src/tokodon_static_autogen/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQmlModels -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWebSockets -isystem /usr/include/qt5/QtQuickControls2 -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5 -isystem /usr/include/KF5/Kirigami2 -isystem /usr/include/KF5/KNotifications -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KConfig -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOGui -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KIO -isystem /usr/include/KF5/KService -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/KF5/Solid -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KAuthWidgets -isystem /usr/include/KF5/KAuthCore -isystem /usr/include/KF5/KAuth -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -DNDEBUG -std=gnu++17 -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -MD -MT src/CMakeFiles/tokodon_static.dir/linkpaginatedtimelinemodel.cpp.o -MF CMakeFiles/tokodon_static.dir/linkpaginatedtimelinemodel.cpp.o.d -o CMakeFiles/tokodon_static.dir/linkpaginatedtimelinemodel.cpp.o -c /home/sharkcz/tokodon/tokodon-23.02.0/src/linkpaginatedtimelinemodel.cpp
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Attaching after Thread 0x7ffff7ff34e0 (LWP 18708) vfork to child process 18710]
[New inferior 2 (process 18710)]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Detaching vfork parent process 18708 after child exec]
[Inferior 1 (process 18708) detached]
process 18710 is executing new program: /usr/libexec/gcc/ppc64le-redhat-linux/13/cc1plus
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Thread 2.1 "cc1plus" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7ff53c0 (LWP 18710)]
process_function_and_variable_attributes (first_var=0x7fffdc638a00, first=0x7fffdc539900) at ../../gcc/cgraphunit.cc:861
Downloading 0.02 MB source file /usr/src/debug/gcc-13.0.1-0.4.fc39.ppc64le/obj-ppc64le-redhat-linux/gcc/../../gcc/cgraphunit.cc
861	      tree decl = node->decl;
(gdb) cont
Continuing.

Thread 2.1 "cc1plus" hit Breakpoint 1, 0x0000000010747e9c in internal_error (gmsgid=0x11927bf8 "%s") at ../../gcc/diagnostic.cc:2138
2138	{
(gdb) bt
#0  0x0000000010747e9c in internal_error (gmsgid=0x11927bf8 "%s") at ../../gcc/diagnostic.cc:2138
#1  0x00000000103f7a5c in crash_signal (signo=11) at ../../gcc/toplev.cc:317
#2  <signal handler called>
#3  process_function_and_variable_attributes (first_var=0x7fffdc638a00, first=0x7fffdc539900) at ../../gcc/cgraphunit.cc:861
#4  analyze_functions (first_time=first_time@entry=true) at ../../gcc/cgraphunit.cc:1181
#5  0x00000000112bf628 in symbol_table::finalize_compilation_unit (this=0x7fffe8080000) at ../../gcc/cgraphunit.cc:2545
#6  0x000000001125c410 in compile_file () at ../../gcc/toplev.cc:474
#7  0x00000000111dd510 in do_compile (no_backend=<optimized out>) at ../../gcc/toplev.cc:2128
#8  toplev::main (this=this@entry=0x7fffffffca00, argc=<optimized out>, argv=<optimized out>) at ../../gcc/toplev.cc:2282
#9  0x00000000111dc5d0 in main (argc=<optimized out>, argv=<optimized out>) at ../../gcc/main.cc:39

Comment 4 Dan Horák 2023-02-21 08:05:48 UTC
Created attachment 1945415 [details]
preprocessed sources

Comment 5 Dan Horák 2023-02-21 08:22:23 UTC
reduced g++ command line with only defines or include paths still reproducing the issue is

/usr/bin/g++ -DHAVE_KIO -DKCOREADDONS_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_WEBSOCKETS_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/home/sharkcz/tokodon/tokodon-23.02.0/redhat-linux-build/src -I/home/sharkcz/tokodon/tokodon-23.02.0/src -I/home/sharkcz/tokodon/tokodon-23.02.0/redhat-linux-build/src/tokodon_static_autogen/include -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQmlModels -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtWebSockets -isystem /usr/include/qt5/QtQuickControls2 -isystem /usr/include/KF5/KI18n -isystem /usr/include/KF5 -isystem /usr/include/KF5/Kirigami2 -isystem /usr/include/KF5/KNotifications -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtDBus -isystem /usr/include/KF5/KConfig -isystem /usr/include/KF5/KConfigCore -isystem /usr/include/KF5/KConfigGui -isystem /usr/include/qt5/QtXml -isystem /usr/include/KF5/KCoreAddons -isystem /usr/include/KF5/KIOWidgets -isystem /usr/include/KF5/KIOGui -isystem /usr/include/KF5/KIOCore -isystem /usr/include/KF5/KIO -isystem /usr/include/KF5/KService -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/KF5/KWindowSystem -isystem /usr/include/KF5/KJobWidgets -isystem /usr/include/KF5/Solid -isystem /usr/include/KF5/KCompletion -isystem /usr/include/KF5/KWidgetsAddons -isystem /usr/include/KF5/KConfigWidgets -isystem /usr/include/KF5/KCodecs -isystem /usr/include/KF5/KAuthWidgets -isystem /usr/include/KF5/KAuthCore -isystem /usr/include/KF5/KAuth -O2 -pipe -m64 -mcpu=power8 -mtune=power8 -fPIC -o CMakeFiles/tokodon_static.dir/linkpaginatedtimelinemodel.cpp.o -c /home/sharkcz/tokodon/tokodon-23.02.0/src/linkpaginatedtimelinemodel.cpp

Comment 6 Jakub Jelinek 2023-02-21 21:14:20 UTC
cvise reduced to -std=gnu++17 -O2 -mcpu=power8:

template <int __v> struct integral_constant {
  static constexpr int value = __v;
};
using false_type = integral_constant<false>;
template <bool, bool, typename...> struct __result_of_impl;
template <typename _Functor, typename... _ArgTypes>
struct __result_of_impl<false, false, _Functor, _ArgTypes...> {
  typedef decltype(0) type;
};
template <typename... _ArgTypes>
struct __invoke_result
    : __result_of_impl<false_type::value, false_type::value, _ArgTypes...> {};
template <typename, typename _Fn, typename... _Args>
void __invoke_impl(_Fn __f, _Args... __args) {
  __f(__args...);
}
template <typename, typename _Callable, typename... _Args>
void __invoke_r(_Callable __fn, _Args... __args) {
  using __result = __invoke_result<_Args...>;
  using __type = typename __result::type;
  __invoke_impl<__type>(__fn, __args...);
}
struct QString {
  QString(const char *);
};
template <typename> class function;
template <typename _Functor> struct _Base_manager {
  static _Functor _M_get_pointer(int) { __builtin_abort (); }
};
template <typename, typename> class _Function_handler;
template <typename _Res, typename _Functor, typename... _ArgTypes>
struct _Function_handler<_Res(_ArgTypes...), _Functor> {
  using _Base = _Base_manager<_Functor>;
  static _Res _M_invoke(const int &__functor, _ArgTypes &&...__args) {
    auto __trans_tmp_1 = _Base::_M_get_pointer(__functor);
    __invoke_r<_Res>(__trans_tmp_1, __args...);
  }
};
template <typename _Res, typename... _ArgTypes>
struct function<_Res(_ArgTypes...)> {
  template <typename _Functor>
  using _Handler = _Function_handler<_Res(_ArgTypes...), _Functor>;
  template <typename _Functor> function(_Functor) {
    using _My_handler = _Handler<_Functor>;
    _M_invoker = _My_handler::_M_invoke;
  }
  using _Invoker_type = _Res (*)(const int &, _ArgTypes &&...);
  _Invoker_type _M_invoker;
};
struct QRegularExpression {
  QRegularExpression(QString);
};
struct AbstractAccount {
  void get(function<void(AbstractAccount *)>,
           function<void(AbstractAccount *)>);
};
struct AbstractTimelineModel {
  AbstractAccount m_account;
};
struct LinkPaginationTimelineModel : AbstractTimelineModel {
  void fillTimeline();
};
void LinkPaginationTimelineModel::fillTimeline() {
  [] {};
  m_account.get([](AbstractAccount *) { static QRegularExpression re(""); },
                [](AbstractAccount *) {});
}

But, strangely can't reproduce with a cross-compiler from x86_64 to powerpc64le.

Comment 7 Fedora Release Engineering 2023-08-16 07:10:03 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 8 Aoife Moloney 2024-11-08 10:48:01 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
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
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 9 Aoife Moloney 2024-11-27 21:07:13 UTC
Fedora Linux 39 entered end-of-life (EOL) status on 2024-11-26.

Fedora Linux 39 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

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