pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: PHP core dumps (gcc 10?)



On Fri, 31 Jan 2025, Jonathan Perkin wrote:
* On 2025-01-31 at 08:46 GMT, Stephen Borrill wrote:

GCC_REQD=10

Hard to say what the cause of the crashes are without backtraces, but JFYI you should append to GCC_REQD, not set it, otherwise you may break packages that require > 10.

Noted.

I've struggled to get usable backtraces. I thought that building all of PHP with --enable-debug would achieve this, but it appears to do little.

/usr/pkg/bin/php: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /usr/libexec/ld.elf_so, for NetBSD 9.4, PaX: -mprotect, with debug_info, not stripped

#0  0x00007efa5a6110dd in ?? ()
#1  0x00007efa54404795 in __do_global_dtors_aux () from /usr/pkg/lib/php/20231123/zlib.so
#2  0x00007efa63947560 in ?? ()
#3  0x00007efa6358ec00 in ?? ()
#4  0x00007efa5440b970 in ?? () from /usr/pkg/lib/php/20231123/zlib.so
#5  0x00007efa5440b979 in _fini () from /usr/pkg/lib/php/20231123/zlib.so
#6  0x0000000000000000 in ?? ()

I'd assumed that "build everything with the same compiler" would have been more reliable, especially as gcc 10.5 is the same as NetBSD 10 ships with (this is NetBSD 9.4 machine). If PHP didn't work with gcc 10.5 from NetBSD 10, it would have been noticed.

I have rebuilt all packages without setting GCC_REQD+=10 and, while some packages still get built with it (notably mysql80-server via protobuf), I end up with a stable system once again.

Unrelated, but this week I've been chasing bugs caused by building older versions of nodejs with GCC 13 instead of 7, where C++ code just completely breaks even though it builds fine, no other changes, so yes certainly in C++ code it's possible for an upgrade to the compiler to completely break things in subtle ways even if everything else is identical (same -std=, flags, etc).

--
Jonathan Perkin                    pkgsrc.smartos.org
Open Source Complete Cloud   www.tritondatacenter.com



Home | Main Index | Thread Index | Old Index