php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42597 "make install" hangs in 64bit system when ZTS is enabled.
Submitted: 2007-09-08 07:45 UTC Modified: 2007-09-27 01:00 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:0 (0.0%)
From: hostmaster at taunusstein dot net Assigned:
Status: No Feedback Package: Compile Failure
PHP Version: 5.2.4 OS: Debian 4.0r0
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: hostmaster at taunusstein dot net
New email:
PHP Version: OS:

 

 [2007-09-08 07:45 UTC] hostmaster at taunusstein dot net
Description:
------------
make install hangs


Reproduce code:
---------------
Used configuration for Apache 2.2.6:

./configure \
  --prefix=/opt/apache-2.2.6/apache \
  --disable-maintainer-mode \
  --enable-mods-shared=all \
  --enable-access \
  --enable-auth \
  --enable-auth-anon \
  --disable-auth-dbm \
  --disable-auth-digest \
  --with-ldap \
  --enable-authnz-ldap \
  --enable-ldap \
  --enable-file-cache \
  --enable-echo \
  --enable-charset-lite \
  --enable-cache \
  --enable-disk-cache \
  --enable-mem-cache \
  --disable-example \
  --enable-ext-filter \
  --enable-case-filter \
  --enable-case-filter-in \
  --enable-deflate \
  --enable-include \
  --enable-log-config \
  --enable-env \
  --enable-mime-magic \
  --enable-cern-meta \
  --enable-expires \
  --enable-headers \
  --enable-usertrack \
  --enable-unique-id \
  --enable-setenvif \
  --disable-proxy \
  --disable-proxy-connect \
  --disable-proxy-ftp \
  --disable-proxy-http \
  --enable-ssl=shared \
  --disable-optional-hook-export \
  --disable-optional-hook-import \
  --disable-optional-fn-import \
  --disable-optional-fn-export \
  --enable-bucketeer \
  --disable-static-support \
  --disable-static-htpasswd \
  --disable-static-htdigest \
  --disable-static-rotatelogs \
  --disable-static-logresolve \
  --disable-static-htdbm \
  --disable-static-ab \
  --disable-static-checkgid \
  --enable-http \
  --enable-mime \
  --enable-dav \
  --enable-status \
  --enable-autoindex \
  --enable-asis \
  --enable-info \
  --enable-suexec \
  --enable-cgi \
  --enable-cgid \
  --enable-dav-fs \
  --enable-vhost-alias \
  --enable-negotiation \
  --enable-dir \
  --enable-imap \
  --enable-actions \
  --enable-speling \
  --enable-userdir \
  --enable-alias \
  --enable-rewrite \
  --enable-so \
  --with-mpm=worker \

Used Configuration for php 5.2.4:

./configure --prefix=/opt/apache-2.2.6 \
--with-apxs2=/opt/apache-2.2.6/apache/bin/apxs \
--enable-exif \
--enable-track-vars \
--with-calendar=shared \
--enable-safe-mode \
--enable-magic-quotes \
--enable-trans-sid \
--enable-wddx \
--enable-ftp \
--with-zlib \
--with-mysql=/opt/mysql \
--with-mysql-sock=/tmp/mysqld.sock \
--with-mysqli=/opt/mysql/bin/mysql_config \
--with-openssl=/usr \
--with-tsrm-pthreads \
--with-jpeglib \
--with-jpeg-dir=/usr/include \
--with-png-dir="/usr" \
--with-png-dir=/usr/include \
--with-xpm-dir="/usr" \
--enable-mbstring=all \
--without-yaz \
--with-ldap \
--with-ldap-sasl \
--with-gettext \
--with-gd \
--with-mhash \
--with-mcrypt \
--with-imap \
--with-mime-magic \
--enable-sysvshm \
--with-kerberos \
--with-imap-ssl \
--with-dom \
--with-iconv \
--enable-mbregex \
--with-soap \
--enable-soap \


Expected result:
----------------
'make install' should return after installation or failure. php 5.2.3 compiles w/o any problems on same platform.

Actual result:
--------------
Following happens:

# make install
Installing PHP SAPI module:       apache2handler
/opt/apache-2.2.6/apache/build/instdso.sh SH_LIBTOOL='/opt/apache-2.2.6/apache/build/libtool' libphp5.la /opt/apache-2.2.6/apache/modules
/opt/apache-2.2.6/apache/build/libtool --mode=install cp libphp5.la /opt/apache-2.2.6/apache/modules/
cp .libs/libphp5.so /opt/apache-2.2.6/apache/modules/libphp5.so
cp .libs/libphp5.lai /opt/apache-2.2.6/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/src/php-5.2.4/libs'
chmod 755 /opt/apache-2.2.6/apache/modules/libphp5.so
[activating module `php5' in /opt/apache-2.2.6/apache/conf/httpd.conf]
Installing PHP CLI binary:        /opt/apache-2.2.6/bin/
Installing PHP CLI man page:      /opt/apache-2.2.6/man/man1/
Installing build environment:     /opt/apache-2.2.6/lib/php/build/
Installing header files:          /opt/apache-2.2.6/include/php/
Installing helper programs:       /opt/apache-2.2.6/bin/
  program: phpize
  program: php-config
Installing man pages:             /opt/apache-2.2.6/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /opt/apache-2.2.6/lib/php/
[PEAR] Console_Getopt - already installed: 1.2.3
[PEAR] Archive_Tar    - already installed: 1.3.2
[PEAR] Structures_Graph- already installed: 1.0.2
[PEAR] PEAR           - already installed: 1.6.1
Wrote PEAR system config file at: /opt/apache-2.2.6/etc/pear.conf
You may want to add: /opt/apache-2.2.6/lib/php to your php.ini include_path
---script hangs---

these processes are running while installation hangs:

24209 pts/2    S+     0:00 /bin/sh -c if test -f pear/install-pear-nozlib.phar && /usr/src/php-5.2.4/build/shtool mkdir -p /opt/apache-2.2.6/lib/php; then \??make -s install-pear-installer; \?else \??cat /usr/src/php-5.2.4/pear/install-pear.txt; \?fi
24272 pts/2    S+     0:00 make -s install-pear-installer
24273 pts/2    S+     0:00 /usr/src/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 -d /opt/apache-2.2.6/lib/php -b /opt/apache-2.2.6/bin



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-09-09 10:12 UTC] jani@php.net
What if you didn't compile Apache with worker (bad) MPM but used the working prefork MPM instead? Does it work then? 

And if you insist on getting into trouble, try attach GDB to the hanged PHP process to see where it hangs.
 [2007-09-10 05:59 UTC] hostmaster at taunusstein dot net
make install does not hang in prefork mode. On 32 bit it does compile and install in prefork and worker mode.
Further tests on 64 bit environment (worker) yielded into following msgs:

# make install
Installing PHP SAPI module:       apache2handler
/opt/apache-2.2.6-test/apache/build/instdso.sh SH_LIBTOOL='/opt/apache-2.2.6-test/apache/build/libtool' libphp5.la /opt/apache-2.2.6-test/apache/modules
/opt/apache-2.2.6-test/apache/build/libtool --mode=install cp libphp5.la /opt/apache-2.2.6-test/apache/modules/
cp .libs/libphp5.so /opt/apache-2.2.6-test/apache/modules/libphp5.so
cp .libs/libphp5.lai /opt/apache-2.2.6-test/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/src/php-5.2.4/libs'
chmod 755 /opt/apache-2.2.6-test/apache/modules/libphp5.so
[activating module `php5' in /opt/apache-2.2.6-test/apache/conf/httpd.conf]
Installing PHP CLI binary:        /opt/apache-2.2.6-test/bin/
Installing PHP CLI man page:      /opt/apache-2.2.6-test/man/man1/
Installing build environment:     /opt/apache-2.2.6-test/lib/php/build/
Installing header files:          /opt/apache-2.2.6-test/include/php/
Installing helper programs:       /opt/apache-2.2.6-test/bin/
  program: phpize
  program: php-config
Installing man pages:             /opt/apache-2.2.6-test/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /opt/apache-2.2.6-test/lib/php/

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 720

Warning: Invalid argument supplied for foreach() in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1207

Notice: Undefined variable: ret in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1269

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 720

Warning: Invalid argument supplied for foreach() in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1207

Notice: Undefined variable: ret in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1269

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 720

Warning: Invalid argument supplied for foreach() in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1207

Notice: Undefined variable: ret in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 1269

Warning: Cannot use a scalar value as an array in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 740

Warning: array_merge(): Argument #2 is not an array in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 766

Notice: Undefined index:  pearinstaller in phar://install-pear-nozlib.phar/PEAR/PackageFile/Generator/v1.php on line 777
[PEAR] Console_Getopt: upgrade to a newer version (1.2.3 is not newer than 1.2.3)
[PEAR] Archive_Tar: upgrade to a newer version (1.3.2 is not newer than 1.3.2)
[PEAR] Structures_Graph: upgrade to a newer version (1.0.2 is not newer than 1.0.2)
[PEAR] PEAR: upgrade to a newer version (1.6.1 is not newer than 1.6.1)
---hangs here---
 [2007-09-10 09:49 UTC] jani@php.net
Possibly related to bug #42491
 [2007-09-10 10:18 UTC] tony2001@php.net
I can't reproduce it on 64bit Linux.
Try to get the place where it hangs:
# gdb ./sapi/cli/php
gdb> r -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 -d /opt/apache-2.2.6/lib/php -b /opt/apache-2.2.6/bin

Press Ctrl-C when it hangs and 'bt' to get the backtrace.

Are ALL these configure options required to replicate it? Would be good to squeeze this list to the minimum.
 [2007-09-11 12:27 UTC] jani@php.net
[EDIT: removed unrelated information]

# gdb ./sapi/cli/php
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"...Using host libthread_db
library "/lib/libthread_db.so.1".

warning: not using untrusted file "/usr/src/php-5.2.4/.gdbinit"
(gdb) r -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 -d /opt/apache-2.2.6-test/lib/php -b
/opt/apache-2.2.6-test/bin
Starting program: /usr/src/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 -d
/opt/apache-2.2.6-test/lib/php -b /opt/apache-2.2.6-test/bin
[Thread debugging using libthread_db enabled]
[New Thread 47016115236496 (LWP 8206)]
[PEAR] Console_Getopt: upgrade to a newer version (1.2.3 is not newer
than 1.2.3)
[PEAR] Archive_Tar: upgrade to a newer version (1.3.2 is not newer than
1.3.2)
[PEAR] Structures_Graph: upgrade to a newer version (1.0.2 is not newer
than 1.0.2)
[PEAR] PEAR: upgrade to a newer version (1.6.1 is not newer than 1.6.1)

Program received signal SIGINT, Interrupt.
[Switching to Thread 47016115236496 (LWP 8206)]
0x00002ac2c9effeeb in __lll_mutex_lock_wait () from
/lib/libpthread.so.0
(gdb) bt
#0  0x00002ac2c9effeeb in __lll_mutex_lock_wait () from
/lib/libpthread.so.0
#1  0x0000000000000016 in ?? ()
#2  0x0000000000000011 in ?? ()
#3  0x00002ac2c9efd98c in pthread_cond_destroy@@GLIBC_2.3.2 () from
/lib/libpthread.so.0
#4  0x0000000000000000 in ?? ()
(gdb)

Problem does not occur, when I used a minimum PHP configuration like

./configure --prefix=/opt/apache-2.2.6-test \
--with-apxs2=/opt/apache-2.2.6-test/apache/bin/apxs \
 [2007-09-11 12:29 UTC] jani@php.net
Try cut down your configure line to bare minimum which is needed to reproduce this. And this is totally unnecessary:

--with-tsrm-pthreads 

Also, after you run configure, with that configure line you should see several warnings about unknown configure options.

 [2007-09-14 05:14 UTC] hostmaster at taunusstein dot net
Hello,

this is minimum configuration that causes that bug:

#!/bin/sh

./configure --prefix=/opt/apache-2.2.6 \
--with-apxs2=/opt/apache-2.2.6/apache/bin/apxs \
--enable-mbstring=all \
--with-zlib \
--with-mysql=/opt/mysql \
--with-mysql-sock=/tmp/mysqld.sock \
--with-mysqli=/opt/mysql/bin/mysql_config \

Without
--with-mysqli=/opt/mysql/bin/mysql_config
make install does not hang. Obviously there is a problem with mysqli.
 [2007-09-19 13:25 UTC] jani@php.net
Please provide the backtrace of the hang you get now (with the minimum configure line).
 [2007-09-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Nov 30 11:03:35 2021 UTC