php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42491 Segmentation fault during install-pear-installer
Submitted: 2007-08-31 10:56 UTC Modified: 2007-09-11 11:51 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: bernard dot prevosto at ifremer dot fr Assigned:
Status: Not a bug Package: Reproducible crash
PHP Version: 5.2.4 OS: solaris 5.8
Private report: No CVE-ID: None
 [2007-08-31 10:56 UTC] bernard dot prevosto at ifremer dot fr
Description:
------------
Make install of  php-5.2.4 seems not to work  our
servers. Configure goes
well, make seems to work also, but we've got a segmentation fault during
make install. 
Everything was OK  with PHP 5.1.6 .

(it's the sams problem that Bug #40474)

Reproduce code:
---------------
./configure  --prefix=/home/services/logiciels/compilateurs/php-5.2.4 --with-ldap=/home/services/bibli/openldap --with-mysql=/home/services/bibli/mysql --with-pgsql=/home/services/logiciels/compilateurs/php-5.2.4/bases/pgsql --with-oci8=/home/services/logiciels/compilateurs/php-5.2.4/bases/ora920 --with-gd --with-zlib-dir=/home/services/bibli/zlib --enable-zip --with-jpeg-dir=/home/services/bibli/jpeglib --with-png-dir=/home/services/bibli/pnglib --with-gettext=/home/services/logiciels/gettext --with-libxml-dir=/home/services/bibli/xml2lib --with-iconv --enable-calendar --enable-mbstring=all --enable-exif --disable-pdo --with-config-file-path=/home/services/logiciels/compilateurs/php-5.2.4
#(it's OK)

make   (it's OK)
make install  (segmentation fault)

Expected result:
----------------
no segmentation fault

Actual result:
--------------
louet>47% make install
Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI binary:        /home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI man page:      /home/services/logiciels/compilateurs/php-5.2.4/man/man1/
Installing build environment:     /home/services/logiciels/compilateurs/php-5.2.4/lib/php/build/
Installing header files:          /home/services/logiciels/compilateurs/php-5.2.4/include/php/
Installing helper programs:       /home/services/logiciels/compilateurs/php-5.2.4/bin/
  program: phpize
  program: php-config
Installing man pages:             /home/services/logiciels/compilateurs/php-5.2.4/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /home/services/logiciels/compilateurs/php-5.2.4/lib/php/
Segmentation Fault
gmake[1]: *** [install-pear-installer] Error 139
gmake: *** [install-pear] Error 2

---------

I have the same problem whith:

louet>138% sapi/cli/php pear/install-pear-nozlib.phar
Segmentation Fault


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-05 09:44 UTC] bernard dot prevosto at ifremer dot fr
it's OK whith  --enable-debug

??????

louet>50% make install
Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI binary:        /home/services/logiciels/compilateurs/php-5.2.4/bin/
Installing PHP CLI man page:      /home/services/logiciels/compilateurs/php-5.2.4/man/man1/
Installing build environment:     /home/services/logiciels/compilateurs/php-5.2.4/lib/php/build/
Installing header files:          /home/services/logiciels/compilateurs/php-5.2.4/include/php/
Installing helper programs:       /home/services/logiciels/compilateurs/php-5.2.4/bin/
  program: phpize
  program: php-config
Installing man pages:             /home/services/logiciels/compilateurs/php-5.2.4/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /home/services/logiciels/compilateurs/php-5.2.4/lib/php/
[PEAR] Console_Getopt - installed: 1.2.3
[PEAR] Archive_Tar    - installed: 1.3.2
[PEAR] Structures_Graph- installed: 1.0.2
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
[PEAR] PEAR           - installed: 1.6.1
Wrote PEAR system config file at: /home/services/logiciels/compilateurs/php-5.2.4/etc/pear.conf
You may want to add: /home/services/logiciels/compilateurs/php-5.2.4/lib/php to your php.ini include_path
louet>51%
 [2007-09-05 11:05 UTC] bernard dot prevosto at ifremer dot fr
but with the PEAR generated with --enble-debug I've:




louet>74% pear install HTTP_Request
downloading HTTP_Request-1.4.1.tgz ...
Starting to download HTTP_Request-1.4.1.tgz (15,927 bytes)
......done: 15,927 bytes

Fatal error: Allowed memory size of 8388608 bytes exhausted at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_opcode.c:48 (tried to allocate 98304 bytes) in /home/services/logiciels/compilateurs/php-5.2.4/lib/php/PEAR/PackageFile/v2/Validator.php on line 908
/home/services/logiciels/compilateurs/php-5.2.4/lib/php/PEAR/PackageFile/v2/Validator.php(908) : Fatal error - Allowed memory size of 8388608 bytes exhausted at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_opcode.c:48 (tried to allocate 98304 bytes)
louet>
 [2007-09-05 13:31 UTC] jani@php.net
I can not reproduce this on linux (32bit).
 [2007-09-05 13:46 UTC] jani@php.net
Then can you try getting some kind of backtrace without using --enable-debug ? That's better than nothing.
 [2007-09-06 10:49 UTC] jani@php.net
The same way you get it with it:

# wget http://pear.php.net/install-pear-nozlib.phar -nd -P pear/
# gdb --arg sapi/cli/php \
-n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= \
-derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 \
pear/install-pear-nozlib.phar
(gdb) run
<crash>
(gdb) bt

 [2007-09-07 10:40 UTC] bernard dot prevosto at ifremer dot fr
with gdb 6.6:

gdb --arg sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar
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 "sparc-sun-solaris2.8"...
(gdb) run
Starting program: /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php -n -dshort_open_tag=0 -dsafe_mode=0 -dopen_basedir= -derror_reporting=E_ALL -dmemory_limit=-1 -ddetect_unicode=0 pear/install-pear-nozlib.phar
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]

Program received signal SIGSEGV, Segmentation fault.
0x002723a0 in _zval_ptr_dtor (zval_ptr=0xffbedb4c)
    at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute_API.c:412
412             (*zval_ptr)->refcount--;
(gdb) bt
#0  0x002723a0 in _zval_ptr_dtor (zval_ptr=0xffbedb4c)
    at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute_API.c:412
#1  0x0029eb5c in zend_do_fcall_common_helper_SPEC (execute_data=0xffbee8a0)
    at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_execute.h:155
#2  0x0029cc60 in execute (op_array=0x5d2c80) at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend_vm_execute.h:92
#3  0x00281010 in zend_execute_scripts (type=8, retval=<value optimized out>, file_count=3)
    at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/Zend/zend.c:1134
#4  0x002411ec in php_execute_script (primary_file=0xffbeefcc)
    at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/main/main.c:1982
#5  0x003152cc in main (argc=9, argv=0xffbef07c) at /home1/balanec/perso/bpre/anonymous/apache/php-5.2.4/sapi/cli/php_cli.c:1140
(gdb)
 [2007-09-10 09:50 UTC] jani@php.net
Possibly related to bug #42597
 [2007-09-10 10:11 UTC] tony2001@php.net
Which GCC did you use?
GCC 4.1 are known to be unable to generate working PHP binaries on SPARC.
 [2007-09-10 10:33 UTC] bernard dot prevosto at ifremer dot fr
I use gcc-4.0.1
 [2007-09-10 13:40 UTC] bernard dot prevosto at ifremer dot fr
I've trying whith the native cc compiler of Solaris, and it's fine..

then, it's good for me!!

thanks
 [2007-09-11 11:51 UTC] jani@php.net
Compiler bug -> not PHP bug.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC