Discussion:
[PHP-INSTALL] segmentation fault with --disable-debug
Jonathan P
2009-02-24 22:40:43 UTC
Permalink
Hi there,

Details:

PHP Version: 5.3.0beta 1
OS: zLinux - SLES 10 s390x 64bit

Description:

../configure --disable-all --disable-debug results in a segmentation fault on
'make test':

/bin/sh: line 1: 7788 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/modules/ ` 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 for i in ""; do . $i;
/home/php-5.3.0beta1/build/shtool echo -n -- " -d
zend_extension=/home/php-5.3.0beta1/modules/$dlname"; done; fi`
make: [test] Error 139 (ignored)


Backtrace:

lin003:/ # TEST_PHP_EXECUTABLE=/home/php-5.3.0beta1/sapi/cli gdb
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".
(gdb) target exec /home/php-5.3.0beta1/sapi/cli/php
(gdb) run /home/php-5.3.0beta1/run-tests.php
Starting program: /home/php-5.3.0beta1/sapi/cli/php
/home/php-5.3.0beta1/run-tests.php
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)

Program received signal SIGSEGV, Segmentation fault.
0x000000008014f986 in ?? ()
(gdb)


However ./configure --disable-all --enable-debug results in an OK 'make
test' and 'make install'.

Can anyone help me figure out why PHP is giving the segmentation error when
I use the --disable-debug option?
I require PHP to be configured with the --disable-debug option.
Any help is much appreciated.

kind regards.
J
Paul Reinheimer
2009-02-25 14:00:10 UTC
Permalink
Good Morning,

One of the side effects of running --enable-debug is that it exports a
few CFLAGS, including -O1 or -O0 or the like. Do you
want to try setting that flag manually, then rebuilding PHP? See if
the same errors occur.


paul
Jonathan P
2009-02-25 18:12:25 UTC
Permalink
Hi Paul,

Thanks for the reply.

I'm trying to compile with --disable-debug, should I still compile with
those flags?

PS: what would the configure line look like? I'm not clued up on flags etc

Any help would be fantastic.

regards
Jonathan
Post by Paul Reinheimer
Good Morning,
One of the side effects of running --enable-debug is that it exports a
few CFLAGS, including -O1 or -O0 or the like. Do you
want to try setting that flag manually, then rebuilding PHP? See if
the same errors occur.
paul
Paul Reinheimer
2009-02-25 18:30:58 UTC
Permalink
Hi Jonathan,

Before compiling PHP at the command line run export CFLAGS=-O1, then
use your ./configure line.

You may wish to make clean before this.



paul
Jonathan P
2009-02-26 18:07:37 UTC
Permalink
Excellent thanks David it worked!

I am getting the following failed test results on 'make test', I'm not sure
if any of them are a major worry.....are you aware of any that are?

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 43
Exts tested : 36
---------------------------------------------------------------------

Number of tests : 6673 5544
Tests borked : 1 ( 0.0%) --------
Tests skipped : 1128 ( 16.9%) --------
Tests warned : 3 ( 0.0%) ( 0.1%)
Tests failed : 40 ( 0.6%) ( 0.7%)
Expected fail : 4 ( 0.1%) ( 0.1%)
Tests passed : 5497 ( 82.4%) ( 99.2%)
---------------------------------------------------------------------
Time taken : 800 seconds
=====================================================================

=====================================================================
BORKED TEST SUMMARY
---------------------------------------------------------------------
duplicated INI section [/home/php-5.2.8/ext/json/tests/bug41567.phpt]
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
[tests/lang/bug45392.phpt]
short tags [tests/lang/short_tags.002.phpt]
tags [tests/lang/short_tags.003.phpt]
Bug #40236 (php -a function allocation eats memory)
[Zend/tests/bug40236.phpt]
Testing declare statement with several type values
[Zend/tests/declare_001.phpt]
testing integer overflow (64bit) [Zend/tests/int_overflow_64bit.phpt]
Zend Multibyte and UTF-16 BOM
[Zend/tests/multibyte/multibyte_encoding_003.phpt]
mb_stripos() [ext/mbstring/tests/mb_stripos.phpt]
Test mb_stripos() function : basic functionality
[ext/mbstring/tests/mb_stripos_basic.phpt]
Test mb_stripos() function : basic functionality
[ext/mbstring/tests/mb_stripos_basic2.phpt]
Test mb_stripos() function : usage variations - pass different data types as
$needle arg [ext/mbstring/tests/mb_stripos_variation2.phpt]
Test mb_stripos() function : usage variations - pass different data types as
$offset arg [ext/mbstring/tests/mb_stripos_variation3.phpt]
Test mb_stripos() function : usage variations - pass different data types as
$encoding arg [ext/mbstring/tests/mb_stripos_variation4.phpt]
Test mb_stristr() function : basic functionality
[ext/mbstring/tests/mb_stristr_basic.phpt]
Test mb_stristr() function : usage variation - different values for part
[ext/mbstring/tests/mb_stristr_variation3.phpt]
Test mb_stristr() function : usage variation - multiple needles
[ext/mbstring/tests/mb_stristr_variation5.phpt]
Test mb_strrichr() function : basic functionality
[ext/mbstring/tests/mb_strrichr_basic.phpt]
Test mb_strrichr() function : usage variation - different values for part
[ext/mbstring/tests/mb_strrichr_variation3.phpt]
Test mb_strrichr() function : usage variation - multiple needles
[ext/mbstring/tests/mb_strrichr_variation5.phpt]
Test mb_strripos() function : basic functionality
[ext/mbstring/tests/mb_strripos_basic.phpt]
Test mb_strripos() function : basic functionality
[ext/mbstring/tests/mb_strripos_basic2.phpt]
Test mb_strripos() function : usage variations - pass different data types
as $needle arg [ext/mbstring/tests/mb_strripos_variation2.phpt]
Test mb_strripos() function : usage variations - pass different data types
as $encoding arg [ext/mbstring/tests/mb_strripos_variation4.phpt]
openssl_csr_new() tests [ext/openssl/tests/004.phpt]
Bug #36732 (add support for req_extensions in openss_csr_new and sign)
[ext/openssl/tests/bug36732.phpt]
via [ext/pdo_sqlite/tests/common.phpt]
SQLite PDO Common: Bug #34630 (inserting streams as LOBs)
[ext/pdo_sqlite/tests/bug_34630.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]
Test session_decode() function : variation
[ext/session/tests/session_decode_variation3.phpt]
Test session_encode() function : variation
[ext/session/tests/session_encode_variation8.phpt]
Bug #44811 (Improve error messages when creating new SoapClient which
contains invalid data) [ext/soap/tests/bugs/bug44811.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 rsort() function : usage variations - referenced variables
[ext/standard/tests/array/rsort_variation4.phpt]
Test tempnam() function: usage variations - permissions(0000 to 0777) of dir
[ext/standard/tests/file/tempnam_variation4.phpt]
Test split() function : usage variations - out-of-range values for limit
[ext/standard/tests/reg/split_variation_004.phpt]
Test spliti() function : usage variations - out-of-range values for limit
[ext/standard/tests/reg/spliti_variation_004.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15)
[ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead
libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
[ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly braindead
libc)
htmlentities() test 15 (setlocale / KOI8-R)
[ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly braindead
libc)
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]
Test vsprintf() function : usage variations - unsigned formats with unsigned
values [ext/standard/tests/strings/vsprintf_variation15_64bit.phpt]
=====================================================================

=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
SPL: ArrayObject::__construct basic usage with ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject___construct_basic4.phpt]
SPL: ArrayObject::__construct basic usage with
ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject___construct_basic5.phpt]
SPL: ArrayObject::exchangeArray() basic usage with object as underlying data
store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt]
SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject_setFlags_basic1.phpt]
=====================================================================
Post by Paul Reinheimer
Hi Jonathan,
Before compiling PHP at the command line run export CFLAGS=-O1, then
use your ./configure line.
You may wish to make clean before this.
paul
Jonathan P
2009-02-26 21:02:16 UTC
Permalink
David? Where did I get that from.....sorry!

Thanks Paul!!!
Post by Jonathan P
Excellent thanks David it worked!
I am getting the following failed test results on 'make test', I'm not
sure if any of them are a major worry.....are you aware of any that are?
=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 43
Exts tested : 36
---------------------------------------------------------------------
Number of tests : 6673 5544
Tests borked : 1 ( 0.0%) --------
Tests skipped : 1128 ( 16.9%) --------
Tests warned : 3 ( 0.0%) ( 0.1%)
Tests failed : 40 ( 0.6%) ( 0.7%)
Expected fail : 4 ( 0.1%) ( 0.1%)
Tests passed : 5497 ( 82.4%) ( 99.2%)
---------------------------------------------------------------------
Time taken : 800 seconds
=====================================================================
=====================================================================
BORKED TEST SUMMARY
---------------------------------------------------------------------
duplicated INI section [/home/php-5.2.8/ext/json/tests/bug41567.phpt]
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
Bug #45392 (ob_start()/ob_end_clean() and memory_limit)
[tests/lang/bug45392.phpt]
short tags [tests/lang/short_tags.002.phpt]
tags [tests/lang/short_tags.003.phpt]
Bug #40236 (php -a function allocation eats memory)
[Zend/tests/bug40236.phpt]
Testing declare statement with several type values
[Zend/tests/declare_001.phpt]
testing integer overflow (64bit) [Zend/tests/int_overflow_64bit.phpt]
Zend Multibyte and UTF-16 BOM
[Zend/tests/multibyte/multibyte_encoding_003.phpt]
mb_stripos() [ext/mbstring/tests/mb_stripos.phpt]
Test mb_stripos() function : basic functionality
[ext/mbstring/tests/mb_stripos_basic.phpt]
Test mb_stripos() function : basic functionality
[ext/mbstring/tests/mb_stripos_basic2.phpt]
Test mb_stripos() function : usage variations - pass different data types
as $needle arg [ext/mbstring/tests/mb_stripos_variation2.phpt]
Test mb_stripos() function : usage variations - pass different data types
as $offset arg [ext/mbstring/tests/mb_stripos_variation3.phpt]
Test mb_stripos() function : usage variations - pass different data types
as $encoding arg [ext/mbstring/tests/mb_stripos_variation4.phpt]
Test mb_stristr() function : basic functionality
[ext/mbstring/tests/mb_stristr_basic.phpt]
Test mb_stristr() function : usage variation - different values for part
[ext/mbstring/tests/mb_stristr_variation3.phpt]
Test mb_stristr() function : usage variation - multiple needles
[ext/mbstring/tests/mb_stristr_variation5.phpt]
Test mb_strrichr() function : basic functionality
[ext/mbstring/tests/mb_strrichr_basic.phpt]
Test mb_strrichr() function : usage variation - different values for part
[ext/mbstring/tests/mb_strrichr_variation3.phpt]
Test mb_strrichr() function : usage variation - multiple needles
[ext/mbstring/tests/mb_strrichr_variation5.phpt]
Test mb_strripos() function : basic functionality
[ext/mbstring/tests/mb_strripos_basic.phpt]
Test mb_strripos() function : basic functionality
[ext/mbstring/tests/mb_strripos_basic2.phpt]
Test mb_strripos() function : usage variations - pass different data types
as $needle arg [ext/mbstring/tests/mb_strripos_variation2.phpt]
Test mb_strripos() function : usage variations - pass different data types
as $encoding arg [ext/mbstring/tests/mb_strripos_variation4.phpt]
openssl_csr_new() tests [ext/openssl/tests/004.phpt]
Bug #36732 (add support for req_extensions in openss_csr_new and sign)
[ext/openssl/tests/bug36732.phpt]
via [ext/pdo_sqlite/tests/common.phpt]
SQLite PDO Common: Bug #34630 (inserting streams as LOBs)
[ext/pdo_sqlite/tests/bug_34630.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]
Test session_decode() function : variation
[ext/session/tests/session_decode_variation3.phpt]
Test session_encode() function : variation
[ext/session/tests/session_encode_variation8.phpt]
Bug #44811 (Improve error messages when creating new SoapClient which
contains invalid data) [ext/soap/tests/bugs/bug44811.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 rsort() function : usage variations - referenced variables
[ext/standard/tests/array/rsort_variation4.phpt]
Test tempnam() function: usage variations - permissions(0000 to 0777) of
dir [ext/standard/tests/file/tempnam_variation4.phpt]
Test split() function : usage variations - out-of-range values for limit
[ext/standard/tests/reg/split_variation_004.phpt]
Test spliti() function : usage variations - out-of-range values for limit
[ext/standard/tests/reg/spliti_variation_004.phpt]
htmlentities() test 2 (setlocale / fr_FR.ISO-8859-15)
[ext/standard/tests/strings/htmlentities02.phpt] (warn: possibly braindead
libc)
htmlentities() test 4 (setlocale / ja_JP.EUC-JP)
[ext/standard/tests/strings/htmlentities04.phpt] (warn: possibly braindead
libc)
htmlentities() test 15 (setlocale / KOI8-R)
[ext/standard/tests/strings/htmlentities15.phpt] (warn: possibly braindead
libc)
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]
Test vsprintf() function : usage variations - unsigned formats with
unsigned values
[ext/standard/tests/strings/vsprintf_variation15_64bit.phpt]
=====================================================================
=====================================================================
EXPECTED FAILED TEST SUMMARY
---------------------------------------------------------------------
SPL: ArrayObject::__construct basic usage with
ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject___construct_basic4.phpt]
SPL: ArrayObject::__construct basic usage with
ArrayObject::STD_PROP_LIST|ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject___construct_basic5.phpt]
SPL: ArrayObject::exchangeArray() basic usage with object as underlying
data store. [ext/spl/tests/arrayObject_exchangeArray_basic3.phpt]
SPL: ArrayObject::setFlags basic usage with ArrayObject::ARRAY_AS_PROPS.
[ext/spl/tests/arrayObject_setFlags_basic1.phpt]
=====================================================================
Post by Paul Reinheimer
Hi Jonathan,
Before compiling PHP at the command line run export CFLAGS=-O1, then
use your ./configure line.
You may wish to make clean before this.
paul
Loading...