# seems 5.3RC3 is too unstable

- Thread: https://externals.io/message/44330
- Original archive: https://news-web.php.net/php.internals/44330
- Started by jvlad on 2009-06-16T23:03:40+00:00
- Messages: 16
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #44330 — jvlad — 2009-06-16T23:03:40+00:00

URL: https://externals.io/message/44330#44330

Hi All,

Did anybody experiece troubles compiling php 5.3RC under FreeBSD 6.2/amd64, 
NetBSD 3.1/x86, and OpenBSD 4.1/x86?
Under these platforms gcc hangs in 
php-5.3.0RC3/ext/fileinfo/libmagic/apprentice.c. Disabling fileinfo produces 
further errors in spl and date.
Under Solaris 2.8/Sparc/Sparc64 php coredumps installing/generating 
phar.phar and if it is disabled coredumps installing PEAR
Under windows php crashes in fastcgi...
I've got no problems only under FreeBSD 6.2/x86, Solaris 2.10/amd64, and 
Linux 2.4, 2.6/x86/amd64.

---

## #44331 — Pierre Joye — 2009-06-16T23:07:24+00:00

URL: https://externals.io/message/44330#44331 · In reply to: #44330

> Under windows php crashes in fastcgi...

Pardon? where?

-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #44332 — Scott MacVicar — 2009-06-16T23:13:57+00:00

URL: https://externals.io/message/44330#44332 · In reply to: #44330

> Hi All,
>
> Did anybody experiece troubles compiling php 5.3RC under FreeBSD 6.2/ 
> amd64,
> NetBSD 3.1/x86, and OpenBSD 4.1/x86?
> Under these platforms gcc hangs in
> php-5.3.0RC3/ext/fileinfo/libmagic/apprentice.c. Disabling fileinfo  
> produces
> further errors in spl and date.
> Under Solaris 2.8/Sparc/Sparc64 php coredumps installing/generating
> phar.phar and if it is disabled coredumps installing PEAR
> Under windows php crashes in fastcgi...
> I've got no problems only under FreeBSD 6.2/x86, Solaris 2.10/amd64,  
> and
> Linux 2.4, 2.6/x86/amd64.
>

Plan to share any of these errors with us? We don't have all platforms  
available for testing.

Scott

---

## #44333 — jvlad — 2009-06-16T23:16:37+00:00

URL: https://externals.io/message/44330#44333 · In reply to: #44331

>
> > […]
>
> Pardon? where?

Pardon, threre:
http://bugs.php.net/bug.php?id=48563

---

## #44334 — jvlad — 2009-06-16T23:27:28+00:00

URL: https://externals.io/message/44330#44334 · In reply to: #44332

> > […]
>
> Plan to share any of these errors with us? We don't have all platforms 
> available for testing.
>

No problems, but I'm not sure what info to share.
gcc either hangs compiling php-5.3.0RC3/ext/fileinfo/libmagic/apprentice.c 
or coredumps with suggestion to submit to gcc maintainers.
It's gcc-3.3.3 and 3.3.5 came with those platfoms, not very good versions, 
but they had absolutely no problems with _ANY_ other php versions I compiled 
up to 5.2.9.
Looks like it's php5.3.0RC3 brought the code that gcc 3.3.x can't compile.

Regarding Solaris/Sparc, I have no gdb there to submit stacktraces. Will try 
to install and grab bt later when I get more time for this.
Regarding Windows, I've already pinpointed the problem and submitted a 
report.

---

## #44335 — jvlad — 2009-06-16T23:42:17+00:00

URL: https://externals.io/message/44330#44335 · In reply to: #44332

> Plan to share any of these errors with us? We don't have all platforms 
> available for testing.
>
> Scott


/bin/sh 
/home/jvlad/php/php-5.3.0RC3/libtool --silent --preserve-dup-deps --mode=compile 
gcc -I/home/jvlad/php/php-5.3.0RC3/ext/fileinfo/libmagic -Iext/fileinfo/ -I/home/jvlad/php/php-5.3.0RC3/ext/fileinfo/ 
 -DPHP_ATOM_INC -I/home/jvlad/php/php-5.3.0RC3/include -I/home/jvlad/php/php-5.3.0RC3/main 
 -I/home/jvlad/php/php-5.3.0RC3 -I/home/jvlad/php/php-5.3.0RC3/ext/date/lib  
-I/home/jvlad/php/php-5.3.0RC3/ext/ereg/regex -I/home/jvlad/php/install/include/libxml2 
 -I/usr/local/include -I/home/jvlad/php/php-5.3.0RC3/ext/sqlite3/libsqlite -I/home/jvlad/php/php-5.3.0RC3/TSRM 
 -I/home/jvlad/php/php-5.3.0RC3/Zend    -I/usr/local/include -g -O2  -c 
/home/jvlad/php/php-5.3.0RC3/ext/fileinfo/libmagic/apprentice.c -o 
ext/fileinfo/libmagic/apprentice.lo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ CPU goes 
high and compiler hangs here; I tried many times with the same results.
OpenBSD 4.1
32bit x86 (core2duo)
gcc (GCC) 3.3.5 (propolice)
configure:
./configure --prefix=/home/jvlad/php/install \
--enable-bcmath \
--enable-calendar \
--enable-wddx \
--with-zlib \
--with-libxml-dir=/home/jvlad/php/install

---

## #44336 — Pierre Joye — 2009-06-16T23:42:50+00:00

URL: https://externals.io/message/44330#44336 · In reply to: #44333

> > […]
>
> Pardon, threre:
> http://bugs.php.net/bug.php?id=48563

Thanks for the notice!

I missed it, however I can't reproduce here. Can you try using RC4 or
a snapshot please?

If it still crashed, can you add more info, where is the php.ini, the
docroot, the script (full path) so I can try to create a similar
context to reproduce the crash.

cheers,
-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #44337 — Pierre Joye — 2009-06-16T23:56:32+00:00

URL: https://externals.io/message/44330#44337 · In reply to: #44333

> > […]
>
> Pardon, threre:
> http://bugs.php.net/bug.php?id=48563

I missed it, however I can't reproduce here. Can you try using  a
snapshot please?

If it still crashed, can you add more info, where is the php.ini, the
docroot, the script (full path) so I can try to create a similar
context to reproduce the c


-- 
Pierre

http://blog.thepimp.net | http://www.libgd.org

---

## #44341 — johannes@php.net — 2009-06-17T09:04:29+00:00

URL: https://externals.io/message/44330#44341 · In reply to: #44330

Hi,


> Under Solaris 2.8/Sparc/Sparc64 php coredumps installing/generating 
> phar.phar and if it is disabled coredumps installing PEAR

Works for me, make test doesn't show anything there either.

$ uname -a
SunOS t2000-010131 5.11 snv_101 sun4v sparc SUNW,Sun-Fire-T200 Solaris

Can you give more details on your configuration? (compiler, configure
flags, ....)

johannes

---

## #44342 — jvlad — 2009-06-17T09:49:31+00:00

URL: https://externals.io/message/44330#44342 · In reply to: #44341

> > […]
>
> Works for me, make test doesn't show anything there either.
>
> $ uname -a
> SunOS t2000-010131 5.11 snv_101 sun4v sparc SUNW,Sun-Fire-T200 Solaris
>
> Can you give more details on your configuration? (compiler, configure
> flags, ....)
>
> johannes
>

solaris2.8/sparc 32bit (it's 32bit, not 64bit as I mentioned before):

$ make install
Installing PHP SAPI module:       cgi
Installing PHP CGI binary: /export/home/jvlad/php/install/bin/
Installing PHP CLI binary:        /export/home/jvlad/php/install/bin/
Installing PHP CLI man page:      /export/home/jvlad/php/install/man/man1/
Installing build environment: 
/export/home/jvlad/php/install/lib/php/build/
Installing header files: 
/export/home/jvlad/php/install/include/php/
Installing helper programs:       /export/home/jvlad/php/install/bin/
  program: phpize
  program: php-config
Installing man pages:             /export/home/jvlad/php/install/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /export/home/jvlad/php/install/lib/php/
make[1]: *** [install-pear-installer] Bus Error (core dumped)
make: *** [install-pear] Error 2

$ uname -a
SunOS qu1 5.8 Generic_108528-11 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

configure:
./configure --prefix=/export/home/jvlad/php/install \
--disable-phar \
--without-mysql --enable-bcmath --enable-calendar --enable-wddx --with-zlib 
\
--without-iconv \
--with-libxml-dir=/export/home/jvlad/php/install


gcc version 3.4.2
$ pkginfo |grep gcc
application SMCgcc342      gcc

---

## #44343 — johannes@php.net — 2009-06-17T11:49:45+00:00

URL: https://externals.io/message/44330#44343 · In reply to: #44342

Hi,


> solaris2.8/sparc 32bit (it's 32bit, not 64bit as I mentioned before):

yes, I used 32bit on the niagara box, too.

> $ uname -a
> SunOS qu1 5.8 Generic_108528-11 sun4u sparc SUNW,UltraSPARC-IIi-cEngine

I used a similar machine from our lab now and did some tests and
couldn't reproduce.
The problems you're seeing are both times when the PHP interpreter is
run, so can you do a
    $ sapi/cli/php -m
or similar just to see if the binary itself works, my assumption would
be that the loader is loading the wrong libs or similar, maybe also
check whether
    $ ldd sapi/cli/php
makes sense.

johannes

---

## #44344 — jvlad — 2009-06-17T12:26:38+00:00

URL: https://externals.io/message/44330#44344 · In reply to: #44343

> > […]
>
> yes, I used 32bit on the niagara box, too.
>
> > […]
>
> I used a similar machine from our lab now and did some tests and
> couldn't reproduce.

did you try with my configure arguments?


> The problems you're seeing are both times when the PHP interpreter is
> run, so can you do a
>    $ sapi/cli/php -m

$ ./php -m
[PHP Modules]
bcmath
calendar
Core
ctype
date
dom
ereg
fileinfo
filter
hash
json
libxml
pcre
PDO
pdo_sqlite
posix
Reflection
session
SimpleXML
SPL
SQLite
sqlite3
standard
tokenizer
wddx
xml
xmlreader
xmlwriter
zlib

[Zend Modules]


> or similar just to see if the binary itself works

It works in some extents. In particular it returns phpinfo, runs trivial 
scripts, but fails to install :)

> my assumption would
> be that the loader is loading the wrong libs or similar, maybe also
> check whether
>    $ ldd sapi/cli/php

$ ldd php
        librt.so.1 =>    /usr/lib/librt.so.1
        libz.so.1 =>     /usr/lib/libz.so.1
        libresolv.so.2 =>        /usr/lib/libresolv.so.2
        libm.so.1 =>     /usr/lib/libm.so.1
        libsocket.so.1 =>        /usr/lib/libsocket.so.1
        libnsl.so.1 =>   /usr/lib/libnsl.so.1
        libdl.so.1 =>    /usr/lib/libdl.so.1
        libpthread.so.1 =>       /usr/lib/libpthread.so.1
        libc.so.1 =>     /usr/lib/libc.so.1
        libaio.so.1 =>   /usr/lib/libaio.so.1
        libmp.so.2 =>    /usr/lib/libmp.so.2
        libthread.so.1 =>        /usr/lib/libthread.so.1
        /usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libc_psr.so.1

---

## #44345 — jvlad — 2009-06-17T12:48:57+00:00

URL: https://externals.io/message/44330#44345 · In reply to: #44343

>
> 
> > […]
>
> yes, I used 32bit on the niagara box, too.
>
> > […]
>
> I used a similar machine from our lab now and did some tests and
> couldn't reproduce.
> The problems you're seeing are both times when the PHP interpreter is
> run, so can you do a
>    $ sapi/cli/php -m
> or similar just to see if the binary itself works, my assumption would
> be that the loader is loading the wrong libs or similar, maybe also
> check whether
>    $ ldd sapi/cli/php
> makes sense.
>
> johannes
>
>
$ gdb ./php/php-5.3.0RC3/sapi/cli/php --core=./core
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.8"...
Reading symbols from /usr/lib/librt.so.1...done.
Loaded symbols for /usr/lib/librt.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libresolv.so.2...done.
Loaded symbols for /usr/lib/libresolv.so.2
Reading symbols from /usr/lib/libm.so.1...done.
Loaded symbols for /usr/lib/libm.so.1
Reading symbols from /usr/lib/libsocket.so.1...done.
Loaded symbols for /usr/lib/libsocket.so.1
Reading symbols from /usr/lib/libnsl.so.1...done.
Loaded symbols for /usr/lib/libnsl.so.1
Reading symbols from /usr/lib/libdl.so.1...done.
Loaded symbols for /usr/lib/libdl.so.1
Reading symbols from /usr/lib/libpthread.so.1...done.
Loaded symbols for /usr/lib/libpthread.so.1
Reading symbols from /usr/lib/libc.so.1...done.
Loaded symbols for /usr/lib/libc.so.1
Reading symbols from /usr/lib/libaio.so.1...done.
Loaded symbols for /usr/lib/libaio.so.1
Reading symbols from /usr/lib/libmp.so.2...done.
Loaded symbols for /usr/lib/libmp.so.2
Reading symbols from /usr/platform/sun4u/lib/libc_psr.so.1...done.
Loaded symbols for 
/usr/platform/SUNW,UltraSPARC-IIi-cEngine/lib/libc_psr.so.1
Reading symbols from /usr/lib/libthread.so.1...done.
Loaded symbols for /usr/lib/libthread.so.1
Reading symbols from /usr/lib/locale/en_US/en_US.so.2...done.
Loaded symbols for /usr/lib/locale/en_US/en_US.so.2
Reading symbols from /usr/lib/ld.so.1...done.
Loaded symbols for /usr/lib/ld.so.1
Core was generated by 
`/export/home/jvlad/php/php-5.3.0RC3/sapi/cli/php -n -dshort_open_tag=0 -dsaf'.
Program terminated with signal 10, Bus error.
[New process 67262    ]
[New process 132798    ]
[New process 198334    ]
#0  0x0030c3f8 in ZEND_ASSIGN_SPEC_CV_TMP_HANDLER (execute_data=0x8221e0)
    at /export/home/jvlad/php/php-5.3.0RC3/Zend/zend_execute.c:725
725                                     **variable_ptr_ptr = *value;
(gdb) bt
#0  0x0030c3f8 in ZEND_ASSIGN_SPEC_CV_TMP_HANDLER (execute_data=0x8221e0)
    at /export/home/jvlad/php/php-5.3.0RC3/Zend/zend_execute.c:725
#1  0x002b2e14 in execute (op_array=0x6d9fd0)
    at /export/home/jvlad/php/php-5.3.0RC3/Zend/zend_vm_execute.h:104
#2  0x00292854 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /export/home/jvlad/php/php-5.3.0RC3/Zend/zend.c:1188
#3  0x0023ff6c in php_execute_script (primary_file=0xffbefa88)
    at /export/home/jvlad/php/php-5.3.0RC3/main/main.c:2196
#4  0x0031e348 in main (argc=13, argv=0xffbefb44)
    at /export/home/jvlad/php/php-5.3.0RC3/sapi/cli/php_cli.c:1188
(gdb)


Let me know if you need any further info.

---

## #44347 — johannes@php.net — 2009-06-17T16:10:16+00:00

URL: https://externals.io/message/44330#44347 · In reply to: #44345

Hi,



> Core was generated by 
> `/export/home/jvlad/php/php-5.3.0RC3/sapi/cli/php -n -dshort_open_tag=0 -dsaf'.

What's the full command line and the script being executed? Best would
be to reduce the script to the mimimum that's needed. And yes, I used a
very similar configure line (using the libxml paths etc.)

Thanks,
johannes

---

## #44348 — Keisial — 2009-06-17T17:42:28+00:00

URL: https://externals.io/message/44330#44348 · In reply to: #44343

I tried compiling 5.3RC3 on SunOS (i386 32bit) and it seem to compile
fine but
_something_ is segfaulting.

$ rm -rf php-5.3.0RC3 && tar xf php-5.3.0RC3.tar && cd php-5.3.0RC3 &&
./configure --with-libxml-dir=/opt/csw/ && make; ls -l core

A core file is generated.

However, it isn't when doing a make clean
$ rm core && make clean && make && ls -l core


On both cases the phar.phar process produce the same output.
Generating phar.php
Generating phar.phar
sh: pear: not found
Pear package PHP_Archive or Archive.php class file not found.
directorytreeiterator.inc
directorygraphiterator.inc
...

The core claims to have been produced by expr !?:

Core was generated by `expr
XABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDABCDA'.
Program terminated with signal 11, Segmentation fault.
#0  0xfef17f41 in _rt_boot () from /usr/lib/ld.so.1


$ uname -srvmpi
SunOS 5.10 Generic_118855-14 i86pc i386 i86pc

---

## #44349 — jvlad — 2009-06-17T20:27:44+00:00

URL: https://externals.io/message/44330#44349 · In reply to: #44347

> > […]
>
> What's the full command line and the script being executed?

I'm not sure how to check it.

> Best would be to reduce the script to the mimimum that's needed.

I don't know what script was executed.
Bt shows where the crash is happening and BusError suggests that crash 
happened because of attempt to read or write to misaligned pointer.
For example if you try to assign a pointer pointing to int32 and containing 
an address not aligned to 32bit boundary, it will coredump with BusError.
