View previous topic :: View next topic |
Author |
Message |
`VL n00b
Joined: 30 Apr 2004 Posts: 71 Location: Russia
|
Posted: Fri May 25, 2007 6:02 pm Post subject: php 5.2.2 + mysql 5.0.40 = segfault. + more php problems |
|
|
Here what happens:
Code: |
# php
PHP Warning: PHP Startup: zip: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
<?
$link=mysql_pconnect("localhost:/var/run/mysqld/mysqld.sock","login","pass");
?>
Segmentation fault
|
Same if things are run as apache module...
I can connect to mysql from mysqlclient normally, php looks as working, except messages about zip module. I tried to build php with external zip or without it, result is same.
So, questions;
1) Where should i start investigations about segfault? What should i do? How do i understand where is bug: mysql,php or maybe gcc(3.3.6 with hardened profile)?
2) What about these zip warnings? _________________ Life is too short to be taken seriously. |
|
Back to top |
|
|
`VL n00b
Joined: 30 Apr 2004 Posts: 71 Location: Russia
|
Posted: Sat May 26, 2007 7:06 pm Post subject: |
|
|
damn it!
i installed gdb, recompiled php with debug USE flag... and what you think? it just works now....
any thouts about API warning messages? _________________ Life is too short to be taken seriously. |
|
Back to top |
|
|
Nadie n00b
Joined: 29 Oct 2005 Posts: 24
|
Posted: Sun May 27, 2007 3:36 am Post subject: |
|
|
mmh...no...but I've the same problem (segfault). Wich flags are you using? |
|
Back to top |
|
|
`VL n00b
Joined: 30 Apr 2004 Posts: 71 Location: Russia
|
Posted: Sun May 27, 2007 7:41 am Post subject: |
|
|
Code: |
[ebuild R ] dev-lang/php-5.2.2-r1 USE="apache2 berkdb calendar cgi cli crypt ctype doc force-cgi-redirect gd iconv imap mysql nls pcre pdo pic posix readline session simplexml soap sockets ssl truetype unicode xml xsl zlib -adabas -bcmath -birdstep -bzip2 -cdb -cjk -concurrentmodphp -curl -curlwrappers -db2 -dbase -dbmaker debug -discard-path -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -frontbase -ftp -gd-external -gdbm -gmp -hash -inifile -interbase -iodbc -ipv6 -java-external -json -kerberos -ldap -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -ncurses -oci8 (-oci8-instant-client) -odbc -pcntl -pdo-external -postgres -qdbm -recode -reflection -sapdb -sharedext -sharedmem -snmp -solid -spell -spl -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -yaz -zip -zip-external" 0 kB
[ebuild R ] dev-db/mysql-5.0.40 USE="berkdb ssl -big-tables -cluster -debug -embedded -extraengine -latin1 -max-idx-128 -minimal -perl (-selinux) -static" 0 kB
|
Also i found that this is more probably php problem, than mysql. I tried to connect with wrong password and saw message about 'login denied' and only after that php segfaulted.. _________________ Life is too short to be taken seriously. |
|
Back to top |
|
|
Nadie n00b
Joined: 29 Oct 2005 Posts: 24
|
Posted: Sun May 27, 2007 1:16 pm Post subject: |
|
|
Thanks. I will give it a try. I have this friggin issue with segfaulting from over two months now... |
|
Back to top |
|
|
Nadie n00b
Joined: 29 Oct 2005 Posts: 24
|
Posted: Sun May 27, 2007 10:25 pm Post subject: |
|
|
No luck here. Same apache segfault on PHP accessing Mysql... |
|
Back to top |
|
|
`VL n00b
Joined: 30 Apr 2004 Posts: 71 Location: Russia
|
Posted: Mon May 28, 2007 5:19 am Post subject: |
|
|
so i think it`s time to post to bugzilla about php... _________________ Life is too short to be taken seriously. |
|
Back to top |
|
|
Dave_Lindquist Apprentice
Joined: 15 Mar 2004 Posts: 160
|
Posted: Mon May 28, 2007 3:20 pm Post subject: |
|
|
If this is the same thing I'm having, it's entirely PHP.
The behaviour I'm seeing (after upgrading to 5.2) is:
- Any PHP script that contains a <?php tag of any kind segfaults the apache child process
- Any PHP script that contains ONLY html (no <?php tag) works fine.
I can do this with the most simple, brain-dead script, and it still causes the problem.
And (dammit!), PHP 5.1 is now on the security advisory list.... Sigh....
No-one has seen any solutions? |
|
Back to top |
|
|
Dave_Lindquist Apprentice
Joined: 15 Mar 2004 Posts: 160
|
Posted: Mon May 28, 2007 5:48 pm Post subject: |
|
|
SOLVED!
After much digging, I managed to find references to bad CFLAGS causing this problem.
Apparently "-funroll-loops" in your CFLAGS will cause this.
Specifically, I removed:
Code: | -funroll-loops -mmmx -m3dnow |
from my CFLAGS, and the problem no longer seems to occur! |
|
Back to top |
|
|
Nijinski n00b
Joined: 28 Nov 2004 Posts: 72 Location: Fife, Scotland
|
Posted: Tue May 29, 2007 12:16 pm Post subject: |
|
|
My PHP is doing similar, while a simple phpinfo() will display correctly, anything else just seg faults, either the apache child process (attempting to access squirrelmail) or command line also (cacti poller cron).
My emerge info is currently
Code: |
Portage 2.1.2.7 (default-linux/sparc/sparc64/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.17-gentoo-r5 sparc64)
=================================================================
System uname: 2.6.17-gentoo-r5 sparc64 sun4u
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 29 May 2007 01:50:01 +0000
dev-lang/python: 2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox: 1.2.17
sys-devel/autoconf: 2.13, 2.61
sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils: 2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool: 1.5.22
virtual/os-headers: 2.6.19.2-r2
ACCEPT_KEYWORDS="sparc"
AUTOCLEAN="yes"
CBUILD="sparc-unknown-linux-gnu"
CFLAGS="-mcpu=v9 -mtune=v9 -O2 -pipe"
CHOST="sparc-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-mcpu=v9 -mtune=v9 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LINGUAS="en"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portageoverlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="acl amavis apache2 async authlib bash-completion berkdb bluetooth buffysize bzip2 caps clamav cli cracklib crypt curl curlwrappers dbm diskio dri ecaggressive ecc ecmark3 exif ext-png ext-zlib extraengine fam filter flatfile force-cgi-redirect ftp gd gd-external gdbm gif glibc-omitfp gmail gmailtimestamps gmp gocr gpgme gpm graphviz iconv idea idn imagemagick imap imlib2 inifile inode isdnlog ithreads javascript jce jpeg justify latin1 lcms lesstif libg++ logrotate lzw-tiff maildir math memlimit mhash midi mime mng mpm-prefork mudflap mysql mysqli ncurses nls nntp no-helper no-old-linux no-suexec nomac nptl nptlonly ocrad offensive openmp pam pcre pdf pear-db perl php png posix postfix ppds pppd pri private python pyzor quotas razor readline reflection rrdtool sasl session sharedext sharedmem smime snmp sockets spamassassin sparc spell spf spl sqlite sqlite3 ssl symlink syslog szip tcpd tesseract tetex theora tiff tokenizer truetype truetype-fonts unicode ups urandom usb vda vhosts watchdog wmf wsconvert xml xsl xslt xtended zip zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="dummy fbdev glint mach64 mga r128 radeon savage sisusb sunbw2 suncg14 suncg3 suncg6 sunffb sunleo tdfx v4l voodoo"
Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
|
Everything was fine with 5.1.x but that's not much good with the GLSA on that version.
Had a look at my CFLAGS and unroll-loops wasn't one of them.
Anybody seen anything resembling a solution/fix ? _________________ Help ! Help ! I'm being repressed |
|
Back to top |
|
|
Nadie n00b
Joined: 29 Oct 2005 Posts: 24
|
Posted: Tue May 29, 2007 9:42 pm Post subject: |
|
|
Doesnt work for me. those are my CFLAGS:
Code: | USE="-X -v4l -xv -gtk -xmms -xosd -svga -trusted -truetype \
-truetype-fonts -type1-fonts -motif -wxwindows -wavelan -voodoo3 -pda \
-pam -oss -opengl -mozilla -kde -qt -gtkhtml -gtk2 -gtk \
-gphoto2 -gnome -dga -3dfx -3dnow -arts -ipv6 libwww imap \
maildir sasl ssl vhosts php berkdb mmx cups acpi samba \
oav pm readline acpi -nls apm php apache2 mysql xml xml2 unicode \
openntpd tesseract nptl nptonly funroll-loops" |
and this my packege.use
Quote: |
dev-lang/php -* apache2 berkdb calendar doc imap mysql readline session xml soc$
dev-db/mysql berkdb ssl -big-tables -cluster -debug -embedded -extraengine -la$
|
|
|
Back to top |
|
|
beep n00b
Joined: 20 Jan 2005 Posts: 33
|
Posted: Tue Jun 19, 2007 11:46 am Post subject: |
|
|
Hi,
It has hit me too, on different system with different CFLAGS and USE flags.
May i see your PHP use flags (do #emerge -vp php), gcc version (do #gcc --version) and your CFLAGS (do #grep 'CFLAGS' /etc/make.conf)
here are mine
Code: |
# emerge -vp php
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild R ] dev-lang/php-5.2.2-r1 USE="apache2 berkdb bzip2 calendar cgi cli crypt ctype curl exif ftp gd-external gdbm hash iconv imap ldap mhash mssql mysql ncurses nls pcre pdo posix readline session snmp soap spell spl ssl threads tidy truetype unicode xml xmlreader xmlrpc xmlwriter xsl yaz zip zlib -adabas -bcmath -birdstep -cdb -cjk -concurrentmodphp -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -gd -gmp -inifile -interbase -iodbc -ipv6 -java-external -json -kerberos -ldap-sasl -libedit -mcve -msql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo-external -pic -postgres -qdbm -recode -reflection -sapdb -sharedext -sharedmem -simplexml -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -tokenizer -wddx -xpm -zip-external"
# gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# grep 'CFLAGS' /etc/make.conf
CFLAGS="-O3 -mtune=pentium3 -march=pentium3 -pipe -fprefetch-loop-arrays -funroll-loops -fforce-addr -ftracer -mfpmath=sse,387 -mmmx -msse -maccumulate-outgoing-args -minline-all-stringops"
CXXFLAGS="${CFLAGS}"
|
Thanks,
::Beep |
|
Back to top |
|
|
m3ph n00b
Joined: 09 Jan 2004 Posts: 39 Location: Estonia
|
Posted: Mon Aug 11, 2008 12:35 am Post subject: |
|
|
Thank god I found this thread
Been trying to fix this thing for the last 15 hours or so...
Removing funroll-loops from CFLAGS did the trick for me... <relieved breathing>
Time to go horizontal and press my standby button... |
|
Back to top |
|
|
|