ID: 42293 User updated by: m dot artuso at etraspa dot it Reported By: m dot artuso at etraspa dot it -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: linux debian testing/unstable PHP Version: 5CVS-2007-08-14 (snap) New Comment:
I tried # rm config.cache && ./configure && make test Testing did not complete smoothly: I was invited to send a report so I did that and also saved the result in a file. Here is the summary ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] Test copy() function: usage variations - dir as source (Bug #42111) [ext/standard/tests/file/copy_variation12.phpt] Test copy() function: usage variations - destination dir access perms [ext/standard/tests/file/copy_variation15.phpt] Test copy() function: usage variations - destination file access perms [ext/standard/tests/file/copy_variation9.phpt] Test fgetcsv() : usage variations - reading the blank line (Bug #42228) [ext/standard/tests/file/fgetcsv_variation14.phpt] Test fgetcsv() : usage variations - with length as 0 (Bug #42175) [ext/standard/tests/file/fgetcsv_variation2.phpt] Test fgetcsv() : usage variations - with default enclosure, file pointer pointing at end of file (Bug #42175) [ext/standard/tests/file/fgetcsv_variation22.phpt] Test fgetcsv() : usage variations - with only file handle as argument, file pointer pointing at end of file (Bug #42175) [ext/standard/tests/file/fgetcsv_variation29.phpt] Test fgetcsv() : usage variations - with file handle and length, file pointer pointing at end of file (Bug #42175) [ext/standard/tests/file/fgetcsv_variation30.phpt] Test fgetcsv() : usage variations - with length and enclosure, file pointer pointing at end of file (Bug #42175) [ext/standard/tests/file/fgetcsv_variation31.phpt] Test unlink() function : usage variations - unlinking file in a directory [ext/standard/tests/file/unlink_variation1.phpt] Test strtolower() function [ext/standard/tests/strings/strtolower.phpt] Test strtoupper() function [ext/standard/tests/strings/strtoupper1.phpt] ===================================================================== If you need the whole file I'll post it (I did not do so now because it's very long and don't know how usefull it is for you). Anyway ./sapi/cli/php doesn't segfault and executes correctly (simple "hello world" test script). So I added options until I encountered the segfault again. It seems that option --enable-sockets is responsible for the fault. Compiling without this option I still got the testing alert that something went wrong, but sapi/cli/php did not segfault # rm config.cache && ./configure --prefix=/usr --enable-force-cgi-redirect --enable-fastcgi --with-config-file-path=/etc/php5/cgi --with-config-file-scan-dir=/etc/php5/cgi/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --mandir=/usr/share/man --enable-debug --with-regex=php --with-pic --with-layout=GNU --with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-db4 --without-gdbm --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --enable-shmop --enable-wddx --with-libxml-dir=/usr --with-zlib --with-kerberos=/usr --with-openssl=/usr --enable-soap --enable-zip --with-mime-magic=/usr/share/file/magic.mime --with-exec-dir=/usr/lib/php5/libexec --without-mm --disable-pdo --without-mysql --without-sybase-ct --without-sqlite && make test I then tried to compile with only the --enable-sockets option # rm config.cache && ./configure --enable-sockets && make test I did not get the segfault! It just compiled smoothly. So I got back to the original segfaulting code and used valgrind as you required: # USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php run-tests.php ==19574== Memcheck, a memory error detector. ==19574== Copyright (C) 2002-2007, and GNU GPL'd, by Julian Seward et al. ==19574== Using LibVEX rev 1732, a library for dynamic binary translation. ==19574== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP. ==19574== Using valgrind-3.2.3-Debian, a dynamic binary instrumentation framework. ==19574== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al. ==19574== For more details, rerun with: -v ==19574== PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/curl.so' - /usr/lib/php/20060613-debug/curl.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/gd.so' - /usr/lib/php/20060613-debug/gd.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/imap.so' - /usr/lib/php/20060613-debug/imap.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/interbase.so' - /usr/lib/php/20060613-debug/interbase.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/ldap.so' - /usr/lib/php/20060613-debug/ldap.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/mcrypt.so' - /usr/lib/php/20060613-debug/mcrypt.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/mhash.so' - /usr/lib/php/20060613-debug/mhash.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/mysql.so' - /usr/lib/php/20060613-debug/mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/mysqli.so' - /usr/lib/php/20060613-debug/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/odbc.so' - /usr/lib/php/20060613-debug/odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pdo.so' - /usr/lib/php/20060613-debug/pdo.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pdo_mysql.so' - /usr/lib/php/20060613-debug/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pdo_odbc.so' - /usr/lib/php/20060613-debug/pdo_odbc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pdo_pgsql.so' - /usr/lib/php/20060613-debug/pdo_pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pdo_sqlite.so' - /usr/lib/php/20060613-debug/pdo_sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pgsql.so' - /usr/lib/php/20060613-debug/pgsql.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/pspell.so' - /usr/lib/php/20060613-debug/pspell.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/recode.so' - /usr/lib/php/20060613-debug/recode.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/snmp.so' - /usr/lib/php/20060613-debug/snmp.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/sqlite.so' - /usr/lib/php/20060613-debug/sqlite.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/ssh2.so' - /usr/lib/php/20060613-debug/ssh2.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/sybase_ct.so' - /usr/lib/php/20060613-debug/sybase_ct.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/tidy.so' - /usr/lib/php/20060613-debug/tidy.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/xmlrpc.so' - /usr/lib/php/20060613-debug/xmlrpc.so: cannot open shared object file: No such file or directory in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20060613-debug/xsl.so' - /usr/lib/php/20060613-debug/xsl.so: cannot open shared object file: No such file or directory in Unknown on line 0 ==19574== Invalid write of size 4 ==19574== at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so) ==19574== by 0x7972E50: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x7972F14: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x79717E2: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x7971A17: _nss_db_getprotobyname_r (in /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x6E284F7: getprotobyname_r@@GLIBC_2.2.5 (getXXbyYY_r.c:210) ==19574== by 0x6E2837F: getprotobyname (getXXbyYY.c:116) ==19574== by 0x61BD10: zm_startup_sockets (sockets.c:521) ==19574== by 0x775326: zend_startup_module_ex (zend_API.c:1466) ==19574== by 0x77D04F: zend_hash_apply (zend_hash.c:673) ==19574== by 0x775524: zend_startup_modules (zend_API.c:1513) ==19574== by 0x70EBA4: php_module_startup (main.c:1802) ==19574== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==19574== ==19574== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==19574== Access not within mapped region at address 0x0 ==19574== at 0x55DA9EA: __db_get_lorder (in /usr/lib/libdb-4.5.so) ==19574== by 0x7972E50: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x7972F14: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x79717E2: (within /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x7971A17: _nss_db_getprotobyname_r (in /usr/lib/libnss_db-2.2.3.so) ==19574== by 0x6E284F7: getprotobyname_r@@GLIBC_2.2.5 (getXXbyYY_r.c:210) ==19574== by 0x6E2837F: getprotobyname (getXXbyYY.c:116) ==19574== by 0x61BD10: zm_startup_sockets (sockets.c:521) ==19574== by 0x775326: zend_startup_module_ex (zend_API.c:1466) ==19574== by 0x77D04F: zend_hash_apply (zend_hash.c:673) ==19574== by 0x775524: zend_startup_modules (zend_API.c:1513) ==19574== by 0x70EBA4: php_module_startup (main.c:1802) ==19574== ==19574== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 7 from 4) ==19574== malloc/free: in use at exit: 1,017,987 bytes in 6,480 blocks. ==19574== malloc/free: 7,929 allocs, 1,449 frees, 1,612,893 bytes allocated. ==19574== For counts of detected errors, rerun with: -v ==19574== searching for pointers to 6,480 not-freed blocks. ==19574== checked 1,518,128 bytes. ==19574== ==19574== LEAK SUMMARY: ==19574== definitely lost: 0 bytes in 0 blocks. ==19574== possibly lost: 0 bytes in 0 blocks. ==19574== still reachable: 1,017,987 bytes in 6,480 blocks. ==19574== suppressed: 0 bytes in 0 blocks. ==19574== Reachable blocks (those to which a pointer was found) are not shown. ==19574== To see them, rerun with: --leak-check=full --show-reachable=yes Segmentation fault Thanks, Matteo Previous Comments: ------------------------------------------------------------------------ [2007-08-14 09:49:46] [EMAIL PROTECTED] Sorry, didn't notice you had --enable-debug there. Please try this: # rm config.cache && ./configure && make test And if that doesn't crash, add the rest of the configure options one by one to see which causes the crash. You could also try this: # USE_ZEND_ALLOC=0 valgrind --leak-check=full sapi/cli/php run-tests.php ------------------------------------------------------------------------ [2007-08-14 09:25:50] m dot artuso at etraspa dot it --enable-debug was set since the beginning... The CVS snapshot was downloaded early this morning from http://snaps.php.net/ and is php5.2-200708140430.tar.bz2 I tried again with these options (--enable-debug is set, while I left out --disable-rpath, --disable-static and --with-pcre-regex) # ./configure --prefix=/usr --enable-force-cgi-redirect --enable-fastcgi --with-config-file-path=/etc/php5/cgi --with-config-file-scan-dir=/etc/php5/cgi/conf.d --build=x86_64-linux-gnu --host=x86_64-linux-gnu --mandir=/usr/share/man --enable-debug --with-regex=php --with-pic --with-layout=GNU --with-pear=/usr/share/php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-db4 --without-gdbm --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --enable-shmop --enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib --with-kerberos=/usr --with-openssl=/usr --enable-soap --enable-zip --with-mime-magic=/usr/share/file/magic.mime --with-exec-dir=/usr/lib/php5/libexec --without-mm --disable-pdo --without-mysql --without-sybase-ct --without-sqlite # make # make test I then run # gdb ./sapi/cli/php core GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"...BFD: /usr/src/php5.2-200708140430/sapi/cli/php: don't know how to handle OS specific section `.gnu.hash' [0x6ffffff6] "/usr/src/php5.2-200708140430/sapi/cli/php": not in executable format: File format not recognized Core was generated by `./sapi/cli/php'. Program terminated with signal 11, Segmentation fault. #0 0x00002b41c2d939ea in ?? () (gdb) bt #0 0x00002b41c2d939ea in ?? () Surely I'm doing something wrong if the debug result is unsatisfying, but I don't understand wthat... Thanks, Matteo ------------------------------------------------------------------------ [2007-08-14 08:46:44] [EMAIL PROTECTED] And you ARE using the latest 5.2CVS snapshot downloaded from http://snaps.php.net/ ?? ------------------------------------------------------------------------ [2007-08-14 08:45:28] [EMAIL PROTECTED] Well, add --enable-debug to the build and perhaps then you can get useful GDB backtrace.. ------------------------------------------------------------------------ [2007-08-14 08:15:20] m dot artuso at etraspa dot it I come from a debian package that is not compiling (I was doing a custom install) for the same reason. Debian mantainers suggested to file a bug here, since I noticed that the problem arises also with the latest snapshot. The compiling options came from the standard debian configure lines. Using --with-pcre-regex and leaving out --disable-rpath and --disable-static the segfault persists: Core was generated by `./sapi/cli/php'. Program terminated with signal 11, Segmentation fault. #0 0x00002b65ccba69ea in ?? () (gdb) bt #0 0x00002b65ccba69ea in ?? () I also tried to exclude the --with-pcre-regex option but I got the same output. Thanks for your help, Matteo ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/42293 -- Edit this bug report at http://bugs.php.net/?id=42293&edit=1
