Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-26 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Please see #62886, fat published an patch, and it fixes my problem.

Can anybody confirm that?


Previous Comments:

[2012-09-17 20:00:50] jonas at brachium-system dot net

Seems that #62886 is the same as my patch. removing some code from that commit 
fixes the issue.


[2012-09-17 19:59:47] jonas at brachium-system dot net

root@testm64:~# gdb attach 1571
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
attach: No such file or directory.
Attaching to process 1571
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libexslt.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libexslt.so.0
Reading symbols from /usr/lib/libaspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libaspell.so.15
Reading symbols from /usr/lib/libpspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libpspell.so.15
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libmcrypt.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /usr/lib/libltdl.so.7...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libltdl.so.7
Reading symbols from /usr/lib/libt1.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libt1.so.5
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/libxslt.so.1...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxslt.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-17 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Seems that #62886 is the same as my patch. removing some code from that commit 
fixes the issue.


Previous Comments:

[2012-09-17 19:59:47] jonas at brachium-system dot net

root@testm64:~# gdb attach 1571
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
attach: No such file or directory.
Attaching to process 1571
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libexslt.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libexslt.so.0
Reading symbols from /usr/lib/libaspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libaspell.so.15
Reading symbols from /usr/lib/libpspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libpspell.so.15
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libmcrypt.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /usr/lib/libltdl.so.7...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libltdl.so.7
Reading symbols from /usr/lib/libt1.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libt1.so.5
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/libxslt.so.1...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxslt.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/libidn.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libssh2.s

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-17 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

root@testm64:~# gdb attach 1571
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
attach: No such file or directory.
Attaching to process 1571
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libexslt.so.0...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libexslt.so.0
Reading symbols from /usr/lib/libaspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libaspell.so.15
Reading symbols from /usr/lib/libpspell.so.15...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libpspell.so.15
Reading symbols from /lib/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /usr/lib/libmcrypt.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libmcrypt.so.4
Reading symbols from /usr/lib/libltdl.so.7...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libltdl.so.7
Reading symbols from /usr/lib/libt1.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libt1.so.5
Reading symbols from /usr/lib/libfreetype.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libpng12.so.0
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/libbz2.so.1.0...(no debugging symbols found)...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /usr/lib/libssl.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssl.so.0.9.8
Reading symbols from /usr/lib/libcrypto.so.0.9.8...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libcurl.so.4...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/libxslt.so.1...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxslt.so.1
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
Reading symbols from /usr/lib/libidn.so.11...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libssh2.so.1...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/libssh2.so.1
Reading symbols from /usr/lib/liblber-2.4.so.2...(no debugging symbols 
found)...done.
Loaded symbols for /usr/lib/liblber-2.4.so.2
Reading symbols from /usr/lib/

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-17 Thread per at techspot dot com
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: per at techspot dot com
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Sorry Tony, the dumps are always deleted by all systems I have this problem on, 
see the last line of my paste before: "Corrupted or bad directory, deleting"

Btw these bugs are probably the same as this one: #62886 #62937
Seems in #62886 a solution has been identified: "Anyway, we have a backtrace 
and the commit that introduced this issue."


Previous Comments:

[2012-09-17 14:39:46] tony2...@php.net

jonas@
>Then I start it without debugger it hangs. :(

then attach to the freezed process after that.
just `gdb attach `, then `bt full` and post the result here.

per@
Great, so you have a core file.
Now type: 
gdb /usr/sbin/php-fpm /var/spool/abrt/ccpp-2012-09-13-09:45:51-10923
bt full
and post the result here.


[2012-09-13 14:50:24] per at techspot dot com

Upgraded to PHP v5.4.7 but the issue remains:

[root@dev01 ~]# service php-fpm stop
Stopping php-fpm:  [  OK  ]

[root@dev01 ~]# ps aux | grep php
root 10912  0.0  0.0 103244   840 pts/0S+   09:45   0:00 grep php

[root@dev01 ~]# service php-fpm start
Starting php-fpm: /bin/bash: line 1: 10923 Segmentation fault  (core 
dumped) php-fpm
   [FAILED]

[root@dev01 ~]# ps aux | grep php
root 10924  0.0  0.1 516912  5096 ?Ss   09:45   0:00 php-fpm: 
master process (/etc/php-fpm.conf)
nginx10926  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10927  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10928  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10929  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10930  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www



/var/log/messages:
Sep 13 09:45:51 dev01 kernel: php-fpm[10923]: segfault at 3b25051598 ip 
003b1ca0eb83 sp 7fffe9cace00 error 4 in ld-2.12.so[3b1ca0+2]
Sep 13 09:45:51 dev01 abrt[10925]: Saved core dump of pid 10923 
(/usr/sbin/php-fpm) to /var/spool/abrt/ccpp-2012-09-13-09:45:51-10923 (5709824 
bytes)
Sep 13 09:45:51 dev01 abrtd: Directory 'ccpp-2012-09-13-09:45:51-10923' 
creation detected
Sep 13 09:45:51 dev01 abrtd: Package 'php-fpm' isn't signed with proper key
Sep 13 09:45:51 dev01 abrtd: 'post-create' on 
'/var/spool/abrt/ccpp-2012-09-13-09:45:51-10923' exited with 1
Sep 13 09:45:51 dev01 abrtd: Corrupted or bad directory 
/var/spool/abrt/ccpp-2012-09-13-09:45:51-10923, deleting


[2012-09-13 10:54:57] jonas at brachium-system dot net

>This only shows us that FPM has successfully forked to detach from the console.
 >It didn't hang, crash or exit, it's still running and you can see it 
 >yourself: > `ps afx | grep php`

yep. every time I start php-fpm with gdb it forks and detach the process 
correctly. 

Then I start it without debugger it hangs. :(


[2012-09-12 09:17:54] tony2...@php.net

>Program received signal SIGUSR1, User defined signal 1

This only shows us that FPM has successfully forked to detach from the console.
It didn't hang, crash or exit, it's still running and you can see it yourself: 
`ps afx | grep php`


[2012-09-10 19:32:56] jonas at brachium-system dot net

I have pulled the current PHP-5.3 branch and compile it with:

 ./configure --prefix=/usr --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd 
--enable-debug

I have started PHP with gdb:
-
root@testm64:/home/jonas/php-src# gdb sapi/fpm/php-fpm
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-13 Thread per at techspot dot com
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: per at techspot dot com
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Upgraded to PHP v5.4.7 but the issue remains:

[root@dev01 ~]# service php-fpm stop
Stopping php-fpm:  [  OK  ]

[root@dev01 ~]# ps aux | grep php
root 10912  0.0  0.0 103244   840 pts/0S+   09:45   0:00 grep php

[root@dev01 ~]# service php-fpm start
Starting php-fpm: /bin/bash: line 1: 10923 Segmentation fault  (core 
dumped) php-fpm
   [FAILED]

[root@dev01 ~]# ps aux | grep php
root 10924  0.0  0.1 516912  5096 ?Ss   09:45   0:00 php-fpm: 
master process (/etc/php-fpm.conf)
nginx10926  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10927  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10928  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10929  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www
nginx10930  0.0  0.1 516912  4256 ?S09:45   0:00 php-fpm: pool 
www



/var/log/messages:
Sep 13 09:45:51 dev01 kernel: php-fpm[10923]: segfault at 3b25051598 ip 
003b1ca0eb83 sp 7fffe9cace00 error 4 in ld-2.12.so[3b1ca0+2]
Sep 13 09:45:51 dev01 abrt[10925]: Saved core dump of pid 10923 
(/usr/sbin/php-fpm) to /var/spool/abrt/ccpp-2012-09-13-09:45:51-10923 (5709824 
bytes)
Sep 13 09:45:51 dev01 abrtd: Directory 'ccpp-2012-09-13-09:45:51-10923' 
creation detected
Sep 13 09:45:51 dev01 abrtd: Package 'php-fpm' isn't signed with proper key
Sep 13 09:45:51 dev01 abrtd: 'post-create' on 
'/var/spool/abrt/ccpp-2012-09-13-09:45:51-10923' exited with 1
Sep 13 09:45:51 dev01 abrtd: Corrupted or bad directory 
/var/spool/abrt/ccpp-2012-09-13-09:45:51-10923, deleting


Previous Comments:

[2012-09-13 10:54:57] jonas at brachium-system dot net

>This only shows us that FPM has successfully forked to detach from the console.
 >It didn't hang, crash or exit, it's still running and you can see it 
 >yourself: > `ps afx | grep php`

yep. every time I start php-fpm with gdb it forks and detach the process 
correctly. 

Then I start it without debugger it hangs. :(


[2012-09-12 09:17:54] tony2...@php.net

>Program received signal SIGUSR1, User defined signal 1

This only shows us that FPM has successfully forked to detach from the console.
It didn't hang, crash or exit, it's still running and you can see it yourself: 
`ps afx | grep php`


[2012-09-10 19:32:56] jonas at brachium-system dot net

I have pulled the current PHP-5.3 branch and compile it with:

 ./configure --prefix=/usr --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd 
--enable-debug

I have started PHP with gdb:
-
root@testm64:/home/jonas/php-src# gdb sapi/fpm/php-fpm
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
warning: not using untrusted file "/home/jonas/php-src/.gdbinit"
(gdb) run
Starting program: /home/jonas/php-src/sapi/fpm/php-fpm 
[Thread debugging using libthread_db enabled]

Program received signal SIGUSR1, User defined signal 1.
0x749c8380 in ?? () from /lib/libc.so.6
(gdb) bt
#0  0x749c8380 in ?? () from /lib/libc.so.6
#1  0x749cb94c in free () from /lib/libc.so.6
#2  0x009d416e in zend_hash_destroy (ht=0x132c170) at 
/home/jonas/php-src/Zend/zend_hash.c:532
#3  0x009c2

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-13 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

>This only shows us that FPM has successfully forked to detach from the console.
 >It didn't hang, crash or exit, it's still running and you can see it 
 >yourself: > `ps afx | grep php`

yep. every time I start php-fpm with gdb it forks and detach the process 
correctly. 

Then I start it without debugger it hangs. :(


Previous Comments:

[2012-09-12 09:17:54] tony2...@php.net

>Program received signal SIGUSR1, User defined signal 1

This only shows us that FPM has successfully forked to detach from the console.
It didn't hang, crash or exit, it's still running and you can see it yourself: 
`ps afx | grep php`


[2012-09-10 19:32:56] jonas at brachium-system dot net

I have pulled the current PHP-5.3 branch and compile it with:

 ./configure --prefix=/usr --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd 
--enable-debug

I have started PHP with gdb:
-
root@testm64:/home/jonas/php-src# gdb sapi/fpm/php-fpm
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
warning: not using untrusted file "/home/jonas/php-src/.gdbinit"
(gdb) run
Starting program: /home/jonas/php-src/sapi/fpm/php-fpm 
[Thread debugging using libthread_db enabled]

Program received signal SIGUSR1, User defined signal 1.
0x749c8380 in ?? () from /lib/libc.so.6
(gdb) bt
#0  0x749c8380 in ?? () from /lib/libc.so.6
#1  0x749cb94c in free () from /lib/libc.so.6
#2  0x009d416e in zend_hash_destroy (ht=0x132c170) at 
/home/jonas/php-src/Zend/zend_hash.c:532
#3  0x009c2cd3 in zend_shutdown () at 
/home/jonas/php-src/Zend/zend.c:773
#4  0x0094b6a3 in php_module_shutdown () at 
/home/jonas/php-src/main/main.c:2186
#5  0x00abb116 in fpm_php_cleanup (which=2, arg=0x0) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_php.c:199
#6  0x00ab009d in fpm_cleanups_run (type=2) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_cleanup.c:45
#7  0x00ac2109 in fpm_unix_init_main () at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_unix.c:312
#8  0x00aaed7b in fpm_init (argc=1, argv=0x7fffe788, config=0x0, 
prefix=0x0, pid=0x0, test_conf=0, run_as_root=0) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm.c:59
#9  0x00aba69c in main (argc=1, argv=0x7fffe788) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_main.c:1805


[2012-09-10 13:18:31] tony2...@php.net

#4  0xb42fcd66 in pcrecpp::RE::Cleanup() () from /usr/lib/libpcrecpp.so.0
#5  0xb42fce02 in pcrecpp::RE::~RE() () from /usr/lib/libpcrecpp.so.0

This looks like a problem of your system's PCRE library.
No idea why would you use it instead of the bundled, but can you just try a 
plain PHP version provided from php.net and see if you still can reproduce the 
problem? Preferably a recent snapshot, preferable without any external libs and 
opcode caches.
This'll help us to understand if this is a genuine FPM problem or something 
different.


[2012-09-05 17:06:39] rainer-phpbugs at 7val dot com

I can reproduce this problem with php 5.3.16 on SLES 11.2 x86_64 (after about 
20 attempts on average), but not on Ubuntu 12.04.1 x86_64 or Centos (RHEL) 6.3 
(no problem after more than 2000 restarts each).

remove_usr1_usr2_fpm_unix.patch reliably fixes this problem for me.

gdb backtraces of the hanging process

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-10 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

I have pulled the current PHP-5.3 branch and compile it with:

 ./configure --prefix=/usr --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd 
--enable-debug

I have started PHP with gdb:
-
root@testm64:/home/jonas/php-src# gdb sapi/fpm/php-fpm
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
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 "x86_64-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /home/jonas/php-src/sapi/fpm/php-fpm...done.
warning: not using untrusted file "/home/jonas/php-src/.gdbinit"
(gdb) run
Starting program: /home/jonas/php-src/sapi/fpm/php-fpm 
[Thread debugging using libthread_db enabled]

Program received signal SIGUSR1, User defined signal 1.
0x749c8380 in ?? () from /lib/libc.so.6
(gdb) bt
#0  0x749c8380 in ?? () from /lib/libc.so.6
#1  0x749cb94c in free () from /lib/libc.so.6
#2  0x009d416e in zend_hash_destroy (ht=0x132c170) at 
/home/jonas/php-src/Zend/zend_hash.c:532
#3  0x009c2cd3 in zend_shutdown () at 
/home/jonas/php-src/Zend/zend.c:773
#4  0x0094b6a3 in php_module_shutdown () at 
/home/jonas/php-src/main/main.c:2186
#5  0x00abb116 in fpm_php_cleanup (which=2, arg=0x0) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_php.c:199
#6  0x00ab009d in fpm_cleanups_run (type=2) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_cleanup.c:45
#7  0x00ac2109 in fpm_unix_init_main () at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_unix.c:312
#8  0x00aaed7b in fpm_init (argc=1, argv=0x7fffe788, config=0x0, 
prefix=0x0, pid=0x0, test_conf=0, run_as_root=0) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm.c:59
#9  0x00aba69c in main (argc=1, argv=0x7fffe788) at 
/home/jonas/php-src/sapi/fpm/fpm/fpm_main.c:1805


Previous Comments:

[2012-09-10 13:18:31] tony2...@php.net

#4  0xb42fcd66 in pcrecpp::RE::Cleanup() () from /usr/lib/libpcrecpp.so.0
#5  0xb42fce02 in pcrecpp::RE::~RE() () from /usr/lib/libpcrecpp.so.0

This looks like a problem of your system's PCRE library.
No idea why would you use it instead of the bundled, but can you just try a 
plain PHP version provided from php.net and see if you still can reproduce the 
problem? Preferably a recent snapshot, preferable without any external libs and 
opcode caches.
This'll help us to understand if this is a genuine FPM problem or something 
different.


[2012-09-05 17:06:39] rainer-phpbugs at 7val dot com

I can reproduce this problem with php 5.3.16 on SLES 11.2 x86_64 (after about 
20 attempts on average), but not on Ubuntu 12.04.1 x86_64 or Centos (RHEL) 6.3 
(no problem after more than 2000 restarts each).

remove_usr1_usr2_fpm_unix.patch reliably fixes this problem for me.

gdb backtraces of the hanging process always look like this (taken on opensuse 
11 i386):

#0  0xe424 in __kernel_vsyscall ()
#1  0xb4fe3e53 in __lll_lock_wait_private () from /lib/libc.so.6
#2  0xb4f762fb in _L_lock_10372 () from /lib/libc.so.6
#3  0xb4f74a66 in free () from /lib/libc.so.6
#4  0xb42fcd66 in pcrecpp::RE::Cleanup() () from /usr/lib/libpcrecpp.so.0
#5  0xb42fce02 in pcrecpp::RE::~RE() () from /usr/lib/libpcrecpp.so.0
#6  0xb4f3089f in __run_exit_handlers () from /lib/libc.so.6
#7  0xb4f308fd in exit () from /lib/libc.so.6
#8  0x084c382f in fpm_signals_sighandler_exit_ok (pid=10) at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_signals.c:254
#9  
#10 0xb4f70701 in _int_free () from /lib/libc.so.6
#11 0xb4f74a6d in free () from /lib/libc.so.6
#12 0x08426de0 in zend_hash_destroy (ht=0x891088c) at 
build/src/ex

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-05 Thread rainer-phpbugs at 7val dot com
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: rainer-phpbugs at 7val dot com
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

I can reproduce this problem with php 5.3.16 on SLES 11.2 x86_64 (after about 
20 attempts on average), but not on Ubuntu 12.04.1 x86_64 or Centos (RHEL) 6.3 
(no problem after more than 2000 restarts each).

remove_usr1_usr2_fpm_unix.patch reliably fixes this problem for me.

gdb backtraces of the hanging process always look like this (taken on opensuse 
11 i386):

#0  0xe424 in __kernel_vsyscall ()
#1  0xb4fe3e53 in __lll_lock_wait_private () from /lib/libc.so.6
#2  0xb4f762fb in _L_lock_10372 () from /lib/libc.so.6
#3  0xb4f74a66 in free () from /lib/libc.so.6
#4  0xb42fcd66 in pcrecpp::RE::Cleanup() () from /usr/lib/libpcrecpp.so.0
#5  0xb42fce02 in pcrecpp::RE::~RE() () from /usr/lib/libpcrecpp.so.0
#6  0xb4f3089f in __run_exit_handlers () from /lib/libc.so.6
#7  0xb4f308fd in exit () from /lib/libc.so.6
#8  0x084c382f in fpm_signals_sighandler_exit_ok (pid=10) at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_signals.c:254
#9  
#10 0xb4f70701 in _int_free () from /lib/libc.so.6
#11 0xb4f74a6d in free () from /lib/libc.so.6
#12 0x08426de0 in zend_hash_destroy (ht=0x891088c) at 
build/src/external/php-5.3.16/Zend/zend_hash.c:532
#13 0x08404762 in destroy_zend_class (pce=0x8911cb4) at 
build/src/external/php-5.3.16/Zend/zend_opcode.c:206
#14 0x08426dc8 in zend_hash_destroy (ht=0x87aa490) at 
build/src/external/php-5.3.16/Zend/zend_hash.c:529
#15 0x08414ed7 in zend_shutdown () at 
build/src/external/php-5.3.16/Zend/zend.c:762
#16 0x083a84da in php_module_shutdown () at 
build/src/external/php-5.3.16/main/main.c:2210
#17 0x084bf608 in fpm_php_cleanup (which=2, arg=0x0) at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_php.c:199
#18 0x084b5f0c in fpm_cleanups_run (type=2) at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_cleanup.c:45
#19 0x084c6c73 in fpm_unix_init_main () at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_unix.c:340
#20 0x084b4fe8 in fpm_init (argc=3, argv=0xbffb2fe4, config=0xbffb50a5 
"conf/php-fpm.conf", prefix=0x0, pid=0x0, test_conf=0, 
run_as_root=0) at build/src/external/php-5.3.16/sapi/fpm/fpm/fpm.c:59
#21 0x084be0f5 in main (argc=3, argv=0xbffb2fe4) at 
build/src/external/php-5.3.16/sapi/fpm/fpm/fpm_main.c:1805


Previous Comments:

[2012-09-05 07:25:26] jonas at brachium-system dot net

@David: Can you please explain, why an NGINX configuration option will solve 
that startup problem?


[2012-09-02 19:47:46] david at appliedautonomics dot com

Fixed on Debian Squeez via adding to fastcgi params:

fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;


[2012-09-02 16:43:24] per at techspot dot com

This bug occurs more frequently on heavily loaded websites.
On my testserver it is difficult to reproduce with a low load.
But on my live server doing a "service php-fpm restart" makes it fail most 
times.

For some reason the problem occurs less frequently in php-fpm 5.4.6 vs 5.3.16
opcode cachers also makes it occur more frequently, but it's possible to 
reproduce with no opcode cacher loaded aswell, same rules as above for 
frequency still apply (5.3 vs 5.4)
Output from testserver below running CentOS v6.3 with all patches applied and 
php v5.4 via the remi repository: 
http://rpms.famillecollet.com/enterprise/6/test/x86_64/

# php -v
PHP 5.4.6 (cli) (built: Aug 16 2012 14:26:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.1, Copyright (c) 2005-2012, by mOo

# DAEMON_COREFILE_LIMIT=unlimited strace -s1024 -f /etc/init.d/php-fpm restart 
2>&1 | grep -i SEGV

[pid  3017] rt_sigaction(SIGSEGV, {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, {SIG_DFL, [], 0}, 8) = 0
[pid  3017] rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 
0x7fdddb55a920},  
[pid  3017] <... rt_sigaction resumed> {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, 8) = 0


[2012-09-02 09:07:29] jonas at brachium-system dot net

PHP 5.3.16-dev (fpm-fcgi) (built: Sep  2 2012 04:56:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

I have tried it with the current branch PHP-5.3.

It started two times correctly (Starts and detaches) after the second start 

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-05 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

@David: Can you please explain, why an NGINX configuration option will solve 
that startup problem?


Previous Comments:

[2012-09-02 19:47:46] david at appliedautonomics dot com

Fixed on Debian Squeez via adding to fastcgi params:

fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;


[2012-09-02 16:43:24] per at techspot dot com

This bug occurs more frequently on heavily loaded websites.
On my testserver it is difficult to reproduce with a low load.
But on my live server doing a "service php-fpm restart" makes it fail most 
times.

For some reason the problem occurs less frequently in php-fpm 5.4.6 vs 5.3.16
opcode cachers also makes it occur more frequently, but it's possible to 
reproduce with no opcode cacher loaded aswell, same rules as above for 
frequency still apply (5.3 vs 5.4)
Output from testserver below running CentOS v6.3 with all patches applied and 
php v5.4 via the remi repository: 
http://rpms.famillecollet.com/enterprise/6/test/x86_64/

# php -v
PHP 5.4.6 (cli) (built: Aug 16 2012 14:26:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.1, Copyright (c) 2005-2012, by mOo

# DAEMON_COREFILE_LIMIT=unlimited strace -s1024 -f /etc/init.d/php-fpm restart 
2>&1 | grep -i SEGV

[pid  3017] rt_sigaction(SIGSEGV, {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, {SIG_DFL, [], 0}, 8) = 0
[pid  3017] rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 
0x7fdddb55a920},  
[pid  3017] <... rt_sigaction resumed> {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, 8) = 0


[2012-09-02 09:07:29] jonas at brachium-system dot net

PHP 5.3.16-dev (fpm-fcgi) (built: Sep  2 2012 04:56:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

I have tried it with the current branch PHP-5.3.

It started two times correctly (Starts and detaches) after the second start the 
problem occurs again.

So problem is not fixed - I have not tried 5.4 since fpm sapi is the same.


[2012-09-01 19:41:16] tony2...@php.net

I can't reproduce it here:
# /tmp/fpm/sbin/php-fpm -v
PHP 5.4.8-dev (fpm-fcgi) (built: Sep  1 2012 23:36:17) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

It starts, spawns its children and detaches from terminal with no problem at 
all.
Can you try the latest snapshot and check if you still can reproduce the issue?


[2012-08-27 22:54:12] al-php at none dot at

same problem here.

./configure --prefix=// --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug  8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid  2589] wait4(-1,  
[pid  2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###




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

https://bugs.php.net/bug.php?id=62954


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62954&edit=1


Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-02 Thread david at appliedautonomics dot com
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: david at appliedautonomics dot com
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

Fixed on Debian Squeez via adding to fastcgi params:

fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;


Previous Comments:

[2012-09-02 16:43:24] per at techspot dot com

This bug occurs more frequently on heavily loaded websites.
On my testserver it is difficult to reproduce with a low load.
But on my live server doing a "service php-fpm restart" makes it fail most 
times.

For some reason the problem occurs less frequently in php-fpm 5.4.6 vs 5.3.16
opcode cachers also makes it occur more frequently, but it's possible to 
reproduce with no opcode cacher loaded aswell, same rules as above for 
frequency still apply (5.3 vs 5.4)
Output from testserver below running CentOS v6.3 with all patches applied and 
php v5.4 via the remi repository: 
http://rpms.famillecollet.com/enterprise/6/test/x86_64/

# php -v
PHP 5.4.6 (cli) (built: Aug 16 2012 14:26:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.1, Copyright (c) 2005-2012, by mOo

# DAEMON_COREFILE_LIMIT=unlimited strace -s1024 -f /etc/init.d/php-fpm restart 
2>&1 | grep -i SEGV

[pid  3017] rt_sigaction(SIGSEGV, {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, {SIG_DFL, [], 0}, 8) = 0
[pid  3017] rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 
0x7fdddb55a920},  
[pid  3017] <... rt_sigaction resumed> {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, 8) = 0


[2012-09-02 09:07:29] jonas at brachium-system dot net

PHP 5.3.16-dev (fpm-fcgi) (built: Sep  2 2012 04:56:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

I have tried it with the current branch PHP-5.3.

It started two times correctly (Starts and detaches) after the second start the 
problem occurs again.

So problem is not fixed - I have not tried 5.4 since fpm sapi is the same.


[2012-09-01 19:41:16] tony2...@php.net

I can't reproduce it here:
# /tmp/fpm/sbin/php-fpm -v
PHP 5.4.8-dev (fpm-fcgi) (built: Sep  1 2012 23:36:17) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

It starts, spawns its children and detaches from terminal with no problem at 
all.
Can you try the latest snapshot and check if you still can reproduce the issue?


[2012-08-27 22:54:12] al-php at none dot at

same problem here.

./configure --prefix=// --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug  8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid  2589] wait4(-1,  
[pid  2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###


[2012-08-27 19:50:31] jonas at brachium-system dot net

Description:

PHP 5.3.14 with FPM on Debian Squeze works without any problems. 

The PHP Version 5.3.15 / 5.3.16 and current Git branch PHP 5.3 is affected.

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

All pools are started and working, but the php5-fpm does not detach:

 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

and here it hangs. ctrl +c does not work.

strace tells me:
Process 15949 attached - interrupt to quit
futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL

If I switch the configuration option "daemonize" to "no" php-fpm starts up 
normal and can be aborted with ctrl+c.

If I copy sapi/fpm from 5.3.14 to the current php-src from 

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-02 Thread per at techspot dot com
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: per at techspot dot com
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

This bug occurs more frequently on heavily loaded websites.
On my testserver it is difficult to reproduce with a low load.
But on my live server doing a "service php-fpm restart" makes it fail most 
times.

For some reason the problem occurs less frequently in php-fpm 5.4.6 vs 5.3.16
opcode cachers also makes it occur more frequently, but it's possible to 
reproduce with no opcode cacher loaded aswell, same rules as above for 
frequency still apply (5.3 vs 5.4)
Output from testserver below running CentOS v6.3 with all patches applied and 
php v5.4 via the remi repository: 
http://rpms.famillecollet.com/enterprise/6/test/x86_64/

# php -v
PHP 5.4.6 (cli) (built: Aug 16 2012 14:26:39)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with XCache v2.0.1, Copyright (c) 2005-2012, by mOo

# DAEMON_COREFILE_LIMIT=unlimited strace -s1024 -f /etc/init.d/php-fpm restart 
2>&1 | grep -i SEGV

[pid  3017] rt_sigaction(SIGSEGV, {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, {SIG_DFL, [], 0}, 8) = 0
[pid  3017] rt_sigaction(SIGSEGV, {SIG_DFL, [SEGV], SA_RESTORER|SA_RESTART, 
0x7fdddb55a920},  
[pid  3017] <... rt_sigaction resumed> {0x7fddd5050730, [SEGV], 
SA_RESTORER|SA_RESTART, 0x7fdddb55a920}, 8) = 0


Previous Comments:

[2012-09-02 09:07:29] jonas at brachium-system dot net

PHP 5.3.16-dev (fpm-fcgi) (built: Sep  2 2012 04:56:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

I have tried it with the current branch PHP-5.3.

It started two times correctly (Starts and detaches) after the second start the 
problem occurs again.

So problem is not fixed - I have not tried 5.4 since fpm sapi is the same.


[2012-09-01 19:41:16] tony2...@php.net

I can't reproduce it here:
# /tmp/fpm/sbin/php-fpm -v
PHP 5.4.8-dev (fpm-fcgi) (built: Sep  1 2012 23:36:17) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

It starts, spawns its children and detaches from terminal with no problem at 
all.
Can you try the latest snapshot and check if you still can reproduce the issue?


[2012-08-27 22:54:12] al-php at none dot at

same problem here.

./configure --prefix=// --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug  8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid  2589] wait4(-1,  
[pid  2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###


[2012-08-27 19:50:31] jonas at brachium-system dot net

Description:

PHP 5.3.14 with FPM on Debian Squeze works without any problems. 

The PHP Version 5.3.15 / 5.3.16 and current Git branch PHP 5.3 is affected.

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

All pools are started and working, but the php5-fpm does not detach:

 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

and here it hangs. ctrl +c does not work.

strace tells me:
Process 15949 attached - interrupt to quit
futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL

If I switch the configuration option "daemonize" to "no" php-fpm starts up 
normal and can be aborted with ctrl+c.

If I copy sapi/fpm from 5.3.14 to the current php-src from git and compile it 
again my configuration and php-fpm works and starts normal.

If I remove the USR1/USR2 handling from sapi/fpm/fpm/fpm_unix.c ( see patch ) 
php-fpm starts normal and detach correctly.

I think (See: 
http://groups.google.com/group

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-09-02 Thread jonas at brachium-system dot net
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: jonas at brachium-system dot net
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Feedback
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

PHP 5.3.16-dev (fpm-fcgi) (built: Sep  2 2012 04:56:07)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies

I have tried it with the current branch PHP-5.3.

It started two times correctly (Starts and detaches) after the second start the 
problem occurs again.

So problem is not fixed - I have not tried 5.4 since fpm sapi is the same.


Previous Comments:

[2012-09-01 19:41:16] tony2...@php.net

I can't reproduce it here:
# /tmp/fpm/sbin/php-fpm -v
PHP 5.4.8-dev (fpm-fcgi) (built: Sep  1 2012 23:36:17) (DEBUG)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

It starts, spawns its children and detaches from terminal with no problem at 
all.
Can you try the latest snapshot and check if you still can reproduce the issue?


[2012-08-27 22:54:12] al-php at none dot at

same problem here.

./configure --prefix=// --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug  8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid  2589] wait4(-1,  
[pid  2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###


[2012-08-27 19:50:31] jonas at brachium-system dot net

Description:

PHP 5.3.14 with FPM on Debian Squeze works without any problems. 

The PHP Version 5.3.15 / 5.3.16 and current Git branch PHP 5.3 is affected.

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

All pools are started and working, but the php5-fpm does not detach:

 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

and here it hangs. ctrl +c does not work.

strace tells me:
Process 15949 attached - interrupt to quit
futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL

If I switch the configuration option "daemonize" to "no" php-fpm starts up 
normal and can be aborted with ctrl+c.

If I copy sapi/fpm from 5.3.14 to the current php-src from git and compile it 
again my configuration and php-fpm works and starts normal.

If I remove the USR1/USR2 handling from sapi/fpm/fpm/fpm_unix.c ( see patch ) 
php-fpm starts normal and detach correctly.

I think (See: 
http://groups.google.com/group/highload-php-en/browse_thread/thread/fa6b16d533411f42)
 PHP 5.4 branch is also affected.

PHP-FPM Configration:
-

[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php5-fpm.log
daemonize = yes

[cust-websrv]
listen = /tmp/cust-webserv.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod

[is-tracking]

listen = /tmp/is-tracking.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 5000
chdir = /
env[APPLICATION_ENV] = prod

[limesurvey]

listen = /tmp/limesurvey.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 40
pm.start_servers = 5
pm.min_spare_servers = 4
pm.max_spare_servers = 5
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod


Actual result:
--
strace, with the problem:

open("/var/log/php5-fpm.log", O_WRONLY|O_CREAT|O_APPEND, 0600) = 3
fcntl(3, F_GETFD)   = 0
fcntl(3, F_SETFD, FD_CLOEXEC)   = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
geteuid()   
rt_sigaction(SIGUSR1, {0x858300, ~[RTMI

Bug #62954 [Com]: startup problems fpm / php-fpm

2012-08-27 Thread al-php at none dot at
Edit report at https://bugs.php.net/bug.php?id=62954&edit=1

 ID: 62954
 Comment by: al-php at none dot at
 Reported by:jonas at brachium-system dot net
 Summary:startup problems fpm / php-fpm
 Status: Assigned
 Type:   Bug
 Package:FPM related
 Operating System:   Linux
 PHP Version:5.3Git-2012-08-27 (Git)
 Assigned To:fat
 Block user comment: N
 Private report: N

 New Comment:

same problem here.

./configure --prefix=// --enable-fpm --enable-bcmath --with-bz2 
--enable-calendar --with-curl --enable-dba --enable-exif --enable-ftp 
--enable-gd-native-ttf --with-jpeg-dir --with-png-dir --with-t1lib 
--with-freetype-dir --with-gettext --enable-mbstring --with-mcrypt --with-mhash 
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd 
--enable-mysqlnd --with-openssl --with-pcre-regex --with-pspell --enable-shmop 
--enable-soap --enable-sockets --enable-sysvmsg --enable-wddx  --with-xsl 
--enable-zip --with-zlib --with-tcadb --with-openssl-dir --with-gd

###
bin/php -v
PHP 5.4.5 (cli) (built: Aug  8 2012 01:03:00)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
###

root@Ubuntu-1204-precise-64-minimal ~ # strace -fveall -p 2590 -p 2589
Process 2590 attached - interrupt to quit
Process 2589 attached - interrupt to quit
[pid  2589] wait4(-1,  
[pid  2590] futex(0x7fc2a4d73720, FUTEX_WAIT_PRIVATE, 2, NULL
###


Previous Comments:

[2012-08-27 19:50:31] jonas at brachium-system dot net

Description:

PHP 5.3.14 with FPM on Debian Squeze works without any problems. 

The PHP Version 5.3.15 / 5.3.16 and current Git branch PHP 5.3 is affected.

/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

All pools are started and working, but the php5-fpm does not detach:

 /usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

and here it hangs. ctrl +c does not work.

strace tells me:
Process 15949 attached - interrupt to quit
futex(0x7fb923e8ce40, FUTEX_WAIT_PRIVATE, 2, NULL

If I switch the configuration option "daemonize" to "no" php-fpm starts up 
normal and can be aborted with ctrl+c.

If I copy sapi/fpm from 5.3.14 to the current php-src from git and compile it 
again my configuration and php-fpm works and starts normal.

If I remove the USR1/USR2 handling from sapi/fpm/fpm/fpm_unix.c ( see patch ) 
php-fpm starts normal and detach correctly.

I think (See: 
http://groups.google.com/group/highload-php-en/browse_thread/thread/fa6b16d533411f42)
 PHP 5.4 branch is also affected.

PHP-FPM Configration:
-

[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php5-fpm.log
daemonize = yes

[cust-websrv]
listen = /tmp/cust-webserv.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod

[is-tracking]

listen = /tmp/is-tracking.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 130
pm.start_servers = 15
pm.min_spare_servers = 5
pm.max_spare_servers = 15
pm.max_requests = 5000
chdir = /
env[APPLICATION_ENV] = prod

[limesurvey]

listen = /tmp/limesurvey.socket
user = www-data
group = www-data
pm = dynamic
pm.max_children = 40
pm.start_servers = 5
pm.min_spare_servers = 4
pm.max_spare_servers = 5
pm.max_requests = 500
chdir = /
env[APPLICATION_ENV] = prod


Actual result:
--
strace, with the problem:

open("/var/log/php5-fpm.log", O_WRONLY|O_CREAT|O_APPEND, 0600) = 3
fcntl(3, F_GETFD)   = 0
fcntl(3, F_SETFD, FD_CLOEXEC)   = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
geteuid()   
rt_sigaction(SIGUSR1, {0x858300, ~[RTMIN RT_1], SA_RESTORER, 0x7fb98d4b5230}, 
{0x84ad50, [], SA_RESTORER, 0x7fb98d4b5230}, 8) = 0
rt_sigaction(SIGUSR2, {0x8582f0, ~[RTMIN RT_1], SA_RESTORER, 0x7fb98d4b5230}, 
{SIG_DFL, [], 0}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0x7fb990b0da10) = 4037
--- SIGUSR1 (User defined signal 1) @ 0 (0) ---
futex(0x7fb98d7e0e40, FUTEX_WAIT_PRIVATE, 2, NULL







-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62954&edit=1