ID: 47441 User updated by: jpilling at fortvale dot com Reported By: jpilling at fortvale dot com -Status: Feedback +Status: Open Bug Type: Compile Failure Operating System: zLinux - SLES 10 s390x 64bit PHP Version: 5.3.0beta1 New Comment:
The bottom line is that if I try to compile PHP as an apache module OR as Fast-CGI - the "make test" fails with a segmentation fault unless --enable-debug is present in my configure line, and -liconv and -glibc are present in the EXTRA_LIBS part of my makefile. I've been testing this for months now. So how is this NOT a PHP bug? Previous Comments: ------------------------------------------------------------------------ [2009-02-19 15:26:05] j...@php.net Since you're compiling a handler, and that crash happens inside Apache's filter stuff, how is this PHP bug..? And why are you posting a crash in apache here when this bug report was originally about make test failing? ------------------------------------------------------------------------ [2009-02-19 09:28:42] jpilling at fortvale dot com I tried to compile PHP with the following configure line: ./configure --with-apxs2=/home/apache2/bin/apxs --with-mysql=/home/mysql --prefix=/home/apache2/php --with-config-file-path=/home/apache2/php --enable-debug During "make" I received an error as follows: ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor': /home/php-5.3.0beta1/ext/iconv/iconv.c:2466: undefined reference to `libiconv_op en' ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_append_bucket': /home/php-5.3.0beta1/ext/iconv/iconv.c:2512: undefined reference to `libiconv' /home/php-5.3.0beta1/ext/iconv/iconv.c:2590: undefined reference to `libiconv' /home/php-5.3.0beta1/ext/iconv/iconv.c:2590: undefined reference to `libiconv' collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1 So I added -liconv to the EXTRA_LIBS part of the makefile, and ran "make" again. This time "make" worked and I was able to run the "make test". Here are the results showing errors: ===================================================================== TEST RESULT SUMMARY --------------------------------------------------------------------- Exts skipped : 51 Exts tested : 27 --------------------------------------------------------------------- Number of tests : 9414 6044 Tests skipped : 3370 ( 35.8%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 29 ( 0.3%) ( 0.5%) Expected fail : 7 ( 0.1%) ( 0.1%) Tests passed : 6008 ( 63.8%) ( 99.4%) --------------------------------------------------------------------- Time taken : 754 seconds ===================================================================== ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- ob_start(): Ensure unerasable buffer cannot be accessed or erased by ob_get_clean(). [tests/output/ob_start_basic_unerasable_003.phpt] ob_start(): Ensure unerasable buffer cannot be accessed or flushed by ob_get_flush(). [tests/output/ob_start_basic_unerasable_004.phpt] Testing operations with undefined variable [Zend/tests/024.phpt] Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt] iconv_mime_encode() [ext/iconv/tests/iconv_mime_encode.phpt] iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt] mysql connect [ext/mysql/tests/001.phpt] mysql_connect() [ext/mysql/tests/mysql_connect.phpt] mysql_[p]connect() - max_links/max_persistent [ext/mysql/tests/mysql_max_links.phpt] via [ext/pdo_sqlite/tests/common.phpt] SQLite PDO Common: Bug #39398 (Booleans are not automatically translated to integers) [ext/pdo_sqlite/tests/bug_39398.phpt] via [ext/pdo_sqlite/tests/common.phpt] SQLite PDO Common: Bug #39656 (Crash when calling fetch() on a PDO statment object after closeCursor()) [ext/pdo_sqlite/tests/bug_39656.phpt] Testing PDOStatement::debugDumpParams() with bound params [ext/pdo_sqlite/tests/debugdumpparams_001.phpt] posix_initgroups(): Basic tests [ext/posix/tests/posix_initgroups.phpt] Bug #46205 (Closure - Memory leaks when ReflectionException is thrown) [ext/reflection/tests/bug46205.phpt] SPL: FilesystemIterator and foreach [ext/spl/tests/dit_003.phpt] SQLite3::open error test [ext/sqlite3/tests/sqlite3_15_open_error.phpt] Bug #43008 (php://filter uris ignore url encoded filternames and can't handle slashes) [ext/standard/tests/file/bug43008.phpt] Test file_put_contents() function : variation - include path testing [ext/standard/tests/file/file_put_contents_variation5.phpt] Test is_executable() function: usage variations - file/dir with diff. perms [ext/standard/tests/file/is_executable_variation2.phpt] Test is_readable() function: usage variations - file/dir with diff. perms [ext/standard/tests/file/is_readable_variation2.phpt] Test is_writable() and its alias is_writeable() function: usage variations - file/dir with diff. perms [ext/standard/tests/file/is_writable_variation2.phpt] Test lchown() function : error functionality [ext/standard/tests/file/lchown_error.phpt] Test tempnam() function: usage variations - permissions(0000 to 0777) of dir [ext/standard/tests/file/tempnam_variation4.phpt] Test mail() function : basic functionality [ext/standard/tests/mail/mail_basic2.phpt] Test mail() function : variation force extra parameters [ext/standard/tests/mail/mail_variation2.phpt] http-stream test [ext/standard/tests/network/http-stream.phpt] Bug #38770 (unpack() broken with longs on 64 bit machines) [ext/standard/tests/strings/bug38770.phpt] Test setlocale() function : usage variations - Setting all available locales in the platform [ext/standard/tests/strings/setlocale_variation2.phpt] substr_compare() [ext/standard/tests/strings/substr_compare.phpt] ===================================================================== ===================================================================== EXPECTED FAILED TEST SUMMARY --------------------------------------------------------------------- ob_start(): Ensure unerasable buffer cannot be flushed by ob_flush(). [tests/output/ob_start_basic_unerasable_005.phpt] Inconsistencies when accessing protected members [Zend/tests/access_modifiers_008.phpt] Inconsistencies when accessing protected members - 2 [Zend/tests/access_modifiers_009.phpt] via [ext/pdo_sqlite/tests/common.phpt] SQLite PDO Common: Bug #34630 (inserting streams as LOBs) [ext/pdo_sqlite/tests/bug_34630.phpt] SimpleXML: array casting bug [ext/simplexml/tests/034.phpt] via [ext/sqlite/tests/pdo/common.phpt] SQLite2 PDO Common: Bug #34630 (inserting streams as LOBs) [ext/sqlite/tests/pdo/bug_34630.phpt] Test file_put_contents() function : variation - include path testing [ext/standard/tests/file/file_put_contents_variation6.phpt] ===================================================================== You may have found a problem in PHP. We would like to send this report automatically to the PHP QA team, to give us a better understanding of how the test cases are doing. If you don't want to send it immediately, you can choose "s" to save the report to a file that you can send us later. Do you want to send this report now? [Yns]: I don't know if this helps at all???? If I go ahead and "make install" it seems to be OK and I can create PHP web pages and view them in the browser. However, if I configure and "make" with: ./configure --with-apxs2=/home/apache2/bin/apxs --with-mysql=/home/mysql --prefix=/home/apache2/php --with-config-file-path=/home/apache2/php --disable-debug i.e. no debug mode and add -liconv to the EXTRA_LIBS in makefile,I get the following error at "make test": Build complete. Don't forget to run 'make test'. make: warning: Clock skew detected. Your build may be incomplete. lin003:/home/php-5.3.0beta1 # make test Build complete. Don't forget to run 'make test'. /bin/sh: line 1: 27882 Segmentation fault TEST_PHP_EXECUTABLE=/home/php-5.3 .0beta1/sapi/cli/php TEST_PHP_SRCDIR=/home/php-5.3.0beta1 CC="gcc" /home/php-5.3 .0beta1/sapi/cli/php -n -c /home/php-5.3.0beta1/tmp-php.ini -d 'open_basedir=' - d 'output_buffering=0' -d 'memory_limit=-1' /home/php-5.3.0beta1/run-tests.php - n -c /home/php-5.3.0beta1/tmp-php.ini -d extension_dir=/home/php-5.3.0beta1/modu les/ ` if test "x" != "x"; then for i in ""; do . $i; /home/php-5.3.0beta1/build /shtool echo -n -- " -d extension=$dlname"; done; fi; if test "x" != "x"; then f or i in ""; do . $i; /home/php-5.3.0beta1/build/shtool echo -n -- " -d zend_exte nsion=/home/php-5.3.0beta1/modules/$dlname"; done; fi` make: [test] Error 139 (ignored) lin003:/home/php-5.3.0beta1 # HOWEVER, with the configuration that I actually got to install, I get the following backtrace when running gdb in the CLI, and then browsing my PHP pages via apache: GNU gdb 6.6 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 "s390x-suse-linux"... Using host libthread_db library "/lib64/libthread_db.so.1". (gdb) run -X Starting program: /home/apache2/bin/httpd -X [Thread debugging using libthread_db enabled] [New Thread 2199027543344 (LWP 26825)] Program received signal SIGPIPE, Broken pipe. [Switching to Thread 2199027543344 (LWP 26825)] 0x0000020000389650 in do_writev () from /lib64/libc.so.6 (gdb) bt #0 0x0000020000389650 in do_writev () from /lib64/libc.so.6 #1 0x000002000023c2e2 in apr_socket_sendv (sock=0x805694e8, vec=<value optimized out>, nvec=1, len=0x3ffff91a230) at network_io/unix/sendrecv.c:205 #2 0x000000008007042c in writev_it_all (s=0x805694e8, vec=0x3ffff91c440, nvec=1, len=244, nbytes=0x3ffff91c568) at core_filters.c:321 #3 0x0000000080070f76 in ap_core_output_filter (f=0x80569f28, b=0x8058f638) at core_filters.c:868 #4 0x0000000080199714 in ap_process_request (r=0x805815a8) at http_request.c:231 #5 0x0000000080196bdc in ap_process_http_connection (c=0x805696d8) at http_core.c:190 #6 0x000000008007982c in ap_run_process_connection (c=0x805696d8) at connection.c:43 #7 0x00000000801b6c7c in child_main (child_num_arg=<value optimized out>) at prefork.c:650 #8 0x00000000801b6efa in make_child (s=0x802924a0, slot=<value optimized out>) at prefork.c:690 #9 0x00000000801b7bc8 in ap_mpm_run (_pconf=<value optimized out>, plog=<value optimized out>, s=0x80276dd8) at prefork.c:966 #10 0x000000008005ce5a in main (argc=<value optimized out>, argv=0x3ffff91ce98) at main.c:740 Any help is much appreciated ------------------------------------------------------------------------ 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/47441 -- Edit this bug report at http://bugs.php.net/?id=47441&edit=1