Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 449386

Summary: dev-lang/php-5.4.8[gmp] w/ gcc-4.7 segfaults
Product: Gentoo Linux Reporter: Diego Elio Pettenò (RETIRED) <flameeyes>
Component: New packagesAssignee: PHP Bugs <php-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal CC: gmiramir, kernelpanic, mattsch
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://tinderboxlogs.s3.amazonaws.com/tbamd64.excelsior.flameeyes.eu/dev-lang%3Aphp-5.4.8%3A20121231-014433.html
See Also: https://bugs.gentoo.org/show_bug.cgi?id=686506
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 390247    

Description Diego Elio Pettenò (RETIRED) gentoo-dev 2012-12-31 01:53:39 UTC
No I can't easily get a backtrace :(

Can somebody help me finding what else I can try, to see to get a PHP built?

Portage 2.2.0_alpha149 (default/linux/amd64/10.0, gcc-4.7.2-asneeded, glibc-2.17, 3.5.4-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.5.4-hardened-r1-x86_64-AMD_Opteron-TM-_Processor_6272-with-gentoo-2.2
Timestamp of tree: Sun, 30 Dec 2012 00:00:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p39-r1
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo tbamd64
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -ggdb -march=native -ftracer -frecord-gcc-switches"
DISTDIR="/var/cache/portage/distfiles"
FCFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox"
FFLAGS="-O2 -pipe -ggdb -march=native -frecord-gcc-switches"
GENTOO_MIRRORS="http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.mirrors.hoobly.com/ http://gentoo.llarian.net/"
LANG="en_US.utf8"
LC_ALL="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j24"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/var/cache/tinderbox/tree"
PORTDIR_OVERLAY="/root/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex acl amd64 berkdb bzip2 cli cracklib crypt cups cxx doc dri emacs ffmpeg fortran gnutls gpm iconv icu intl introspection ipv6 mmx modules mudflap multilib ncurses nls nptl openmp pam pax_kernel pcre pdf plasma pppd qt3support readline semantic-desktop session snmp sse sse2 sse3 sse4 ssl ssse3 tcmalloc tcpd udev unicode vhosts zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2013-01-02 13:26:13 UTC
Not the easiest to reproduce then :)

But based on the log, it seems like the segfault happens when building the phar extension, so you could try USE=-phar. Afaik, no package in the tree depends on USE=phar if you just need it built.
Comment 2 James Cloos 2013-01-04 00:04:10 UTC
I also had build failures for recent php versions w/ the default +phar in place.

I am able to build 5.4.10 with USE=-phar.
Comment 3 Ole Markus With (RETIRED) gentoo-dev 2013-01-04 13:09:41 UTC
There is also a suspiciously similar bug here: https://bugs.php.net/bug.php?id=51216
Comment 4 Ole Markus With (RETIRED) gentoo-dev 2013-01-11 17:21:21 UTC
*** Bug 451380 has been marked as a duplicate of this bug. ***
Comment 5 Ole Markus With (RETIRED) gentoo-dev 2013-01-11 17:33:29 UTC
Filed a new upstream bug https://bugs.php.net/bug.php?id=63971
Comment 6 Ole Markus With (RETIRED) gentoo-dev 2013-01-15 16:36:36 UTC
It would be nice if anyone who could reproduce it could check:
1. Does it break with a bare minimum USE flags (cli sapi + phar ..)
2. Does it still break if you drop our patchset? (PHP should build without it)
3. Obtain a stack trace: https://bugs.php.net/bugs-generating-backtrace.php
Comment 7 Michelangelo Scopelliti 2013-01-17 12:21:47 UTC
(In reply to comment #6)
> It would be nice if anyone who could reproduce it could check:
> 1. Does it break with a bare minimum USE flags (cli sapi + phar ..)
> 2. Does it still break if you drop our patchset? (PHP should build without
> it)
> 3. Obtain a stack trace: https://bugs.php.net/bugs-generating-backtrace.php

I've done some test.
I get the segfault when using both gmp and phar. It builds fine with -gmp + phar, +gmp -phar, -gmp -phar.
Currently, this is my "emerge -vp php"

[ebuild   R    ] dev-lang/php-5.4.10:5.4  USE="apache2 berkdb bzip2 calendar cjk cli crypt ctype curl exif fileinfo filter flatfile ftp gd gdbm hash iconv ipv6
json mysql mysqli mysqlnd nls pdo phar posix postgres readline session simplexml soap sockets spell sqlite ssl sysvipc threads tidy tokenizer truetype unicode xml xmlreader xmlrpc xmlwriter xpm xsl zip zlib -bcmath -cdb -cgi -curlwrappers -debug -doc -embed -enchant -firebird -fpm (-frontbase) -gmp -imap -inifile -intl -iodbc -kerberos (-kolab) -ldap -ldap-sasl -libedit -mhash -mssql -oci8-instant-client -odbc -pcntl -pic -qdbm -recode (-selinux) -sharedmem -snmp (-sybase-ct) -wddx"
Comment 8 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-18 13:36:17 UTC
*** Bug 452818 has been marked as a duplicate of this bug. ***
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-01-18 13:37:15 UTC
Confirmed with -gmp it works fine...
Comment 10 Michelangelo Scopelliti 2013-01-29 09:30:35 UTC
still present in php-5.4.11-r1
Comment 11 Ole Markus With (RETIRED) gentoo-dev 2013-01-29 09:52:41 UTC
It is not really that much I can do about it.
If you can contribute to the upstream issue linked to in comment #5, thinks should speed up.
Comment 12 Ole Markus With (RETIRED) gentoo-dev 2013-02-18 09:33:49 UTC
Upstream closed the issue on their end with 'no feedback'. I'll be doing the same shortly if not the information they need can be provided.
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-02-18 09:36:25 UTC
No you're not.

I can't get the info, but you can reproduce it, can't you?

The bug stays open (and this is said as QA.)
Comment 14 Ole Markus With (RETIRED) gentoo-dev 2013-02-18 09:38:11 UTC
I already said I cannot reproduce this issue. That is why I asked for information in the first place.
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-02-18 09:40:37 UTC
Have you tried with gcc 4.7 _and_ gmp rebuilt with it?
Comment 16 Ole Markus With (RETIRED) gentoo-dev 2013-02-18 09:43:44 UTC
Yep. I have tested this on a bunch of systems running gcc 4.7.2.

Rebuild at least emerge -e php with gcc 4.7, and gmp has been rebuild numerous times.
Comment 17 Diego Elio Pettenò (RETIRED) gentoo-dev 2013-02-18 09:46:00 UTC
Grml.
Michelangelo, can you post your full emerge --info? Maybe it's some flag
Comment 18 Michelangelo Scopelliti 2013-02-18 10:52:55 UTC
(In reply to comment #17)
> Grml.
> Michelangelo, can you post your full emerge --info? Maybe it's some flag

My emerge --info is already posted in Bug 451380.

Anyhow, there is the current emerge --info:

Portage 2.2.0_alpha163 (default/linux/amd64/13.0, gcc-4.7.2, glibc-2.16.0, 3.7.8 x86_64)
=================================================================
System uname: Linux-3.7.8-x86_64-AMD_A8-3870_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.2
KiB Mem:    15891548 total,  12625900 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Mon, 18 Feb 2013 08:15:01 +0000
ld ld di GNU (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p42
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/cmake:           2.8.10.2-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.13.1
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.16.0
Repositories: gentoo science kernelpanic
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/polkit-1/actions"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs candy clean-logs compress-build-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/science /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext SECURITY_HAZARD X a52 aac aalib acl adolc aio alisp alsa amd64 amr ao apng atlas audiofile bazaar berkdb bidi bitmap blas bluetooth branding bs2b bzip2 cairo calendar caps cblas-external cdda cdio chm cjk cli clucene compact conntrack consolekit context contrast contrib corefonts cracklib crypt ctypes-python cups curl cvs cxx dbus demosaic detex device-mapper devil dga dhcp dhcp-tools dia dirac discouraged djbfft djvu dri dts dv dvb dvd dvi dvi2tty dvipdfm ebook ecdsa eigen emf encode epspdf excel exif extensions extra extra-tools extras faac facedetect ffmpeg fftw firmware fits flac flatfile fltk fontconfig fontforge fortran fortran2003 fpx frei0r ftp fts3 fuse g3dvl games gbm gcj gd gdbm geoip gif gimp git gl2ps glut gmp gnuplot gnutls go gold gost gpg gphoto2 gpm graphics graphicsmagick graphite graphviz gsm gstreamer gtk gtk3 gtkstyle gts gudev guile hdf hdf5 hdri heterogeneous hfs highlight hpn http humanities hwdb i18n iconv icu id3tag idn imagemagick imaging imlib inkjar inotify ios ipv6 ipython ithreads ivorbis jadetex jbig jemalloc jpeg jpeg2k json kdrive keymap kmod kpathsea ladspa lame lapack lasi latex lcms ldns lensfun libass libcaca libevent libkms libnl libnotify libproxy libsamplerate libv4l llvm lpsol lqr lua luatex lynxkeymap lzma lzo mad math mathml matplotlib matroska mdev melt mem-scramble mercurial metalink metapost metis metric midi minizip mjpeg mmap mms mmx mmxext mng modplug modules mount mp3 mp3rtp mp4 mpeg mpi mpi-threads mudflap multicall multilib multimedia multitarget musepack music musicbrainz mysql mysqli mysqlnd nat-pmp natspec ncat ncurses ndiff netlink nettle network network-cron networking newnet nlpsolver nls nodrm normalize nping nptl nsplugin ntfs numpy nut nuv objc objc++ objc-gc ocaml ocr odk offensive offlinehelp ofx ogg ogm openal openexr opengl openmp openvg opus osmesa pam pango passwdqc pcap pch pcre pdf pdfannotextractor pdo perl pgf pgo phonon pkcs11 plotutils plugins png pnm policykit postgres postproc postscript pstricks pth publishers pvr pyglet python python3 q16 q32 q64 q8 qt3support quicktime quvi rar raw readline reencrypt reiserfs replaygain rle romio rpc rtaudio rtmp ruby scale0tilt scanner schroedinger science script sctp sdl sdlgfx secure-delete secure-messaging session smartcard smi smp sndfile soap sockets soundex sox speex spell spoof-source sql sqlite srt sse sse2 sse3 ssl startup-notification subversion suid svg syslog system-jpeg system-sqlite sysvipc szip t1lib taglib tbb tcl templates tex4ht tftp tga theora thin-splines threads tidy tiff timezone tk tls tools transparent-proxy truetype twolame type3 udev udis86 udisks umfpack unicode unlock-notify urandom usb utils v4l v8 vaapi vala vcd vdr verse video vim vim-syntax vorbis vpx wav wavpack webdav webgl webp wmf wxwidgets x264 xa xanim xattr xcb xcomposite xdg xetex xft xml xmlpatterns xmlreader xmlrpc xmlwriter xmp xorg xpm xps xscreensaver xsl xv xvfb xvid xvmc yuv4mpeg zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="gnutls" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer scripting-beanshell wiki-publisher" LINGUAS="it en fr" OPENMPI_FABRICS="knem" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" QEMU_SOFTMMU_TARGETS="arm i386 x86_64" QEMU_USER_TARGETS="arm i386 x86_64" RUBY_TARGETS="ruby19" SANE_BACKENDS="plustek" USERLAND="GNU" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON



Some extra info (maybe useful?): I'm not using mysql, but mariadb; I've tried to compile php with new gmp (currently using 5.1.1); my gcc is compiled as

emerge -vpq gcc

[ebuild   R   ] sys-devel/gcc-4.7.2  USE="cxx doc fortran gcj go graphite gtk mudflap (multilib) nls nptl objc objc++ objc-gc openmp (-altivec) (-fixed-point) (-hardened) (-libssp) -multislot -nopie -nossp {-test} -vanilla"

hoping that it helps.
Comment 19 Ole Markus With (RETIRED) gentoo-dev 2013-02-18 12:11:14 UTC
Seems like you are using mysqlnd, so it does not matter which mysqlish version you are using.
Comment 20 Michelangelo Scopelliti 2013-06-10 17:48:34 UTC
Status update:
this problem was still present with php-5.5.0_rc1.
It disappeared with rc2, and it did not re-appeared with rc3.
Comment 21 Peter Asplund 2013-06-17 09:18:28 UTC
That does mean it's fixed upstream?
Comment 22 Michelangelo Scopelliti 2013-06-23 13:43:27 UTC
(In reply to Peter Asplund from comment #21)
> That does mean it's fixed upstream?

Apparently...
Still no problems with 5.5.0