Trying to build PHP in rawhide in a segfault during the build (in some PHP command run) https://koji.fedoraproject.org/koji/taskinfo?taskID=27745701 According to Koschei https://apps.fedoraproject.org/koschei/package/php this could be related to glibc update from 2.27.9000-22.fc29 to 2.27.9000-25.fc29 F28 build is ok. https://koji.fedoraproject.org/koji/taskinfo?taskID=27745817 there is no change since 7.2.7RC1 which build ok. Backtrace doesn't seems really useful: (gdb) bt #0 ZEND_UNSET_DIM_SPEC_CV_CONST_HANDLER () at /builddir/build/BUILD/php-7.2.7/Zend/zend_vm_execute.h:37870 #1 0x5682ca0b in execute_ex () at /builddir/build/BUILD/php-7.2.7/Zend/zend_vm_execute.h:62305 #2 0x56832808 in zend_execute (op_array=<optimized out>, return_value=<optimized out>) at /builddir/build/BUILD/php-7.2.7/Zend/zend_vm_execute.h:63760 #3 0x567878ad in zend_execute_scripts () at /builddir/build/BUILD/php-7.2.7/Zend/zend.c:1496 #4 0x56722744 in php_execute_script () at /builddir/build/BUILD/php-7.2.7/main/main.c:2590 #5 0x56834f85 in do_cli (argc=13, argv=0x569ce4f0) at /builddir/build/BUILD/php-7.2.7/sapi/cli/php_cli.c:1011 #6 0x565d9f29 in main (argc=<optimized out>, argv=<optimized out>) at /builddir/build/BUILD/php-7.2.7/sapi/cli/php_cli.c:1404 Any help on this issue is very welcome.
It's not the glibc update. It's triggered by the build flag changes in redhat-rpm-config-113-1.fc29. If I back that out locally by editing /usr/lib/rpm/redhat/rpmrc, the build gets much further. It looks like just dropping -mstackrealign is sufficient. Therefore, this is probably a GCC bug. I will try to narrow down which object gets miscompiled.
The affected object file is Zend/zend_execute.o. I made a guess at what's wrong and filed the bug upstream.
Since a combination of fastcall, global register variables, and -mstackrealign triggers this, I ran some benchmarks. Disabling the global register variables has a huge impact on performance, so this is not a viable fix for PHP. If the GCC bug can't be fixed for real (although we could use %eax in the DRAP prologue and %ecx in the DRAP epilogue, I assume), then we'd have to drop -mstackrealign from the PHP build purely for performance reasons. Curiously, with -mstackrealign disabled, there is some slight regression in the mandel and mandel2 benchmarks when SSE2 is enabled. SSE2 is supposed to be faster, but perhaps the i386 calling convention simply penalizes SSE2 usage too much (all those FPU—memory—SSE2 transfers probably aren't cheap taken together).
For memory, -mstackrealign temporarily removed from PHP build option https://src.fedoraproject.org/cgit/rpms/php.git/commit/?id=d73b5b97d2e4baa54fa2642fef4dc427aa11d765
GCC8 on Fedora 28 heavily breaks custom PGO-build of PHP 7.2.8 and 7.2.x-HEAD after "apachectl graceful" under load with mod_php - no single problem with unchanged spec with F27 "-mstackrealign" is not part of the game and i get tired of GCC bugs + CC='gcc -m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer -fopt-info-vec-optimized -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -fuse-ld=gold -fuse-linker-plugin -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack' Stack trace of thread 70471: #0 0x00007ff92d4cbfeb raise (libc.so.6) #1 0x00007ff92d4b65c1 abort (libc.so.6) #2 0x00007ff92d50e9d7 __libc_message (libc.so.6) #3 0x00007ff92d5a05ad __GI___fortify_fail_abort (libc.so.6) #4 0x00007ff92d5a0564 __stack_chk_fail (libc.so.6) #5 0x00007ff92127c6d8 n/a (intl.so) #6 0x00005579b5ef3246 n/a (httpd) Jul 29 21:51:47 srv-rhsoft systemd-coredump[70479]: Process 70473 (httpd) of user 0 dumped core. Stack trace of thread 70473: #0 0x00007ff92d4cbfeb raise (libc.so.6) #1 0x00007ff92d4b65c1 abort (libc.so.6) #2 0x00007ff92d50e9d7 __libc_message (libc.so.6) #3 0x00007ff92d5a05ad __GI___fortify_fail_abort (libc.so.6) #4 0x00007ff92d5a0564 __stack_chk_fail (libc.so.6) #5 0x00007ff92127c6d8 n/a (intl.so) #6 0x00005579b5ef3246 n/a (httpd) Jul 29 21:51:47 srv-rhsoft systemd-coredump[70482]: Process 70463 (httpd) of user 0 dumped core. Stack trace of thread 79803: #0 0x00007fdba7136306 __GI___strlen_sse2 (libc.so.6) #1 0x00007fdb9aeb6104 mysqlnd_connection_connect (mysqlnd.so) #2 0x00007fdb9ae83b61 n/a (mysqli.so) #3 0x0000000000000001 n/a (n/a) Jul 29 22:34:15 srv-rhsoft systemd-coredump[79812]: Process 79806 (httpd) of user 0 dumped core. Stack trace of thread 79806: #0 0x00007fdba7136306 __GI___strlen_sse2 (libc.so.6) #1 0x00007fdb9aeb6104 mysqlnd_connection_connect (mysqlnd.so) #2 0x00007fdb9ae83b61 n/a (mysqli.so) #3 0x0000000000000001 n/a (n/a) Jul 29 22:34:15 srv-rhsoft systemd-coredump[79819]: Process 79790 (httpd) of user 0 dumped core. Stack trace of thread 79790: #0 0x00007fdb9ae9f595 n/a (mysqlnd.so) #1 0x00007fdb9ae83b61 n/a (mysqli.so) #2 0x0000000000000001 n/a (n/a) Jul 29 22:34:15 srv-rhsoft systemd-coredump[79818]: Process 79792 (httpd) of user 0 dumped core. Stack trace of thread 79792: #0 0x00007fdba7136306 __GI___strlen_sse2 (libc.so.6) #1 0x00007fdb9aeb6104 mysqlnd_connection_connect (mysqlnd.so) #2 0x00007fdb9ae83b61 n/a (mysqli.so) #3 0x0000000000000001 n/a (n/a) Jul 29 22:34:15 srv-rhsoft systemd-coredump[79814]: Process 79801 (httpd) of user 0 dumped core. Stack trace of thread 86181: #0 0x00007ff6db55b6ec n/a (intl.so) #1 0x000056317bbcf246 n/a (httpd) Jul 29 22:50:36 srv-rhsoft systemd-coredump[86193]: Process 86173 (httpd) of user 0 dumped core.
GCC8 is simply broken this all started with GCC7 (https://bugzilla.redhat.com/show_bug.cgi?id=1494290) but now you can't get any stable PGO-build - first i thought it's something about "intl.so" but without that extension the messages just change ------------ %changelog * Sun Jul 29 2018 Reindl Harald <h.reindl> - disable strict-aliasing - build with '-fno-strict-aliasing -fno-align-functions -fno-align-jumps -fno-align-loops -fno-align-labels' don't change anything ------------ Stack trace of thread 105972: #0 0x00007f27c565442a _zval_ptr_dtor (libphp7.so) #1 0x00007f27bd62c6ef n/a (intl.so) #2 0x000056362f20f246 n/a (httpd) Jul 29 23:54:12 srv-rhsoft systemd-coredump[106102]: Process 106100 (httpd) of user 0 dumped core. Stack trace of thread 106100: #0 0x00007f27c565442a _zval_ptr_dtor (libphp7.so) #1 0x00007f27bd62c6ef n/a (intl.so) #2 0x000056362f20f246 n/a (httpd) Jul 29 23:54:12 srv-rhsoft systemd-coredump[105990]: Process 105974 (httpd) of user 0 dumped core. Jul 29 23:55:39 srv-rhsoft systemd[1]: systemd-coredump.socket: Too many incoming connections (16), dropping connection. Jul 29 23:55:39 srv-rhsoft systemd-coredump[106647]: Failed to send coredump datagram: Connection reset by peer Jul 29 23:55:39 srv-rhsoft systemd[1]: systemd-coredump.socket: Too many incoming connections (16), dropping connection. Jul 29 23:55:39 srv-rhsoft systemd-coredump[106649]: Failed to send coredump datagram: Connection reset by peer Jul 29 23:55:39 srv-rhsoft systemd[1]: systemd-coredump.socket: Too many incoming connections (16), dropping connection. Jul 29 23:55:39 srv-rhsoft systemd-coredump[106638]: Failed to send coredump datagram: Connection reset by peer Jul 29 23:55:39 srv-rhsoft systemd-coredump[106583]: Process 106572 (httpd) of user 0 dumped core. Stack trace of thread 106572: #0 0x00007f77ffd326cc n/a (intl.so) #1 0x0000556dab7ccc95 n/a (httpd) #2 0x0000556dab7cd3d3 n/a (httpd) #3 0x0000556dab817ab7 ap_run_mpm (httpd) #4 0x0000556dab7ca4bf main (httpd) #5 0x00007f780bf7224b __libc_start_main (libc.so.6) #6 0x0000556dab7ca53a _start (httpd) Jul 29 23:55:39 srv-rhsoft systemd-coredump[106582]: Process 106574 (httpd) of user 0 dumped core. Stack trace of thread 106574: #0 0x00007f77ffd326cc n/a (intl.so) #1 0x0000556dab7ccc95 n/a (httpd) #2 0x0000556dab7cd3d3 n/a (httpd) #3 0x0000556dab817ab7 ap_run_mpm (httpd) #4 0x0000556dab7ca4bf main (httpd) #5 0x00007f780bf7224b __libc_start_main (libc.so.6) #6 0x0000556dab7ca53a _start (httpd) Jul 29 23:55:39 srv-rhsoft systemd-coredump[106580]: Process 106578 (httpd) of user 0 dumped core. Stack trace of thread 106578: #0 0x00007f77ffd326cc n/a (intl.so) #1 0x0000556dab7ccc95 n/a (httpd) #2 0x0000556dab7cd3d3 n/a (httpd) #3 0x0000556dab817ab7 ap_run_mpm (httpd) #4 0x0000556dab7ca4bf main (httpd) #5 0x00007f780bf7224b __libc_start_main (libc.so.6) #6 0x0000556dab7ca53a _start (httpd) Jul 29 23:55:39 srv-rhsoft systemd-coredump[106581]: Process 106576 (httpd) of user 0 dumped core. Stack trace of thread 106576: #0 0x00007f77ffd326cc n/a (intl.so) #1 0x0000556dab7ccc95 n/a (httpd) #2 0x0000556dab7cd3d3 n/a (httpd) #3 0x0000556dab817ab7 ap_run_mpm (httpd) #4 0x0000556dab7ca4bf main (httpd) #5 0x00007f780bf7224b __libc_start_main (libc.so.6) #6 0x0000556dab7ca53a _start (httpd) Jul 29 23:55:43 srv-rhsoft php[105300]: /usr/local/bin/monitor-httpd.php: ERROR - httpd.service: Service hold-off time over, scheduling restart Jul 29 23:55:43 srv-rhsoft systemd[1]: Stopping Apache Webserver... Jul 29 23:55:45 srv-rhsoft systemd[1]: Stopped Apache Webserver. Jul 29 23:55:45 srv-rhsoft systemd[1]: Started Apache Webserver. Jul 29 23:55:45 srv-rhsoft systemd-coredump[106607]: Process 106592 (httpd) of user 0 dumped core.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
This message is a reminder that Fedora 29 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-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 Fedora 'version' of '29'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 29 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, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 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 please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed.