php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39902 php segfaults with fastcgi
Submitted: 2006-12-20 13:34 UTC Modified: 2006-12-30 01:00 UTC
Votes:4
Avg. Score:3.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: felici at iddqd dot hu Assigned:
Status: No Feedback Package: Reproducible crash
PHP Version: 5.2.0 OS: FreeBSD 6.2-PRERELEASE
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: felici at iddqd dot hu
New email:
PHP Version: OS:

 

 [2006-12-20 13:34 UTC] felici at iddqd dot hu
Description:
------------
I'm using Apache 2.2.3 with fastcgi and php. With php 5.2.0 php processes exit on signal 11. 5.1.6 was OK.

Reproduce code:
---------------
Doesn't matter what you run, it will crash.

Expected result:
----------------
---

Actual result:
--------------
Dec 20 14:32:08 starbase kernel: pid 9951 (php-cgi), uid 2001: exited on signal 11 (core dumped)
Dec 20 14:32:08 starbase kernel: pid 9952 (php-cgi), uid 2001: exited on signal 11 (core dumped)
Dec 20 14:32:08 starbase kernel: pid 9954 (php-cgi), uid 2001: exited on signal 11 (core dumped)
Dec 20 14:32:08 starbase kernel: pid 9953 (php-cgi), uid 2001: exited on signal 11 (core dumped)


#0  0x00000000 in ?? ()
#1  0x28e87ea4 in __do_global_dtors_aux () from /usr/local/lib/php/20060613/session.so
#2  0x28e8efd4 in _fini () from /usr/local/lib/php/20060613/session.so
#3  0x2827c160 in ?? () from /libexec/ld-elf.so.1
#4  0x2827c018 in ?? () from /libexec/ld-elf.so.1
#5  0xbfbfcae8 in ?? ()
#6  0x2825c929 in elf_hash () from /libexec/ld-elf.so.1
#7  0x2825f3ae in dlclose () from /libexec/ld-elf.so.1
#8  0x0815db72 in zend_hash_apply_deleter ()
#9  0x0815dc01 in zend_hash_graceful_reverse_destroy ()
#10 0x081536ff in zend_shutdown ()
#11 0x0811620f in php_module_shutdown ()
#12 0x081d7bf2 in main ()



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-20 13:43 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2006-12-20 15:42 UTC] felici at iddqd dot hu
Hello,

I tried the cvs snapshot, still the same, even the backtrace. PHPInfo:

https://mail.dns123.eu/phpi___.php
 [2006-12-20 15:53 UTC] tony2001@php.net
Please provide more information on how to reproduce it.
 [2006-12-20 16:42 UTC] felici at iddqd dot hu
Hello, 

I'm using FreeBSD latest stable (6.2-PRERELEASE) i386, Apache 2.2.3 with suexec and mod_fastcgi-2.4.2 and php as cgi compiled with fastcgi support (see phpinfo for more details about php)

httpd.conf:

<IfModule fastcgi_module>
        AddHandler fastcgi-script .fcgi
        FastCgiWrapper /usr/local/sbin/suexec
        FastCgiConfig -singleThreshold 100 -killInterval 300 -autoUpdate -idle-timeout 240 -pass-header HTTP_AUTHORIZATION
        FastCgiIpcDir /tmp
</IfModule>

[...]

SuexecUserGroup feldeci feldeci
ScriptAlias /cgi-bin/ /var/virtual/users/feldeci/www/cgi-bin/

<Directory "/var/virtual/users/feldeci/www/cgi-bin">
        AllowOverride None
        Options +ExecCGI -Includes
        Order allow,deny
        Allow from all
</Directory>

<Location /cgi-bin/>
        Options ExecCGI
        SetHandler fastcgi-script
</Location>

Action application/x-httpd-php /cgi-bin/php

cgi-bin/php (owned by user feldeci)

#!/bin/sh
PHPRC="/var/virtual/users/feldeci/conf"
export PHPRC
PHP_FCGI_CHILDREN=4
export PHP_FCGI_CHILDREN
PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_MAX_REQUESTS
exec /usr/local/bin/php-cgi

php.ini:

[PHP]

open_basedir = "/var/virtual/users/feldeci"
upload_tmp_dir = "/var/virtual/users/feldeci/temp"
session.save_path = "/var/virtual/users/feldeci/temp"

the rest is in /usr/local/etc/php/master.ini and extensions.ini 

set up this environment, run php applications (like phpMyAdmin, RoundCube, whatever) and wait for the segfaults.

let me know if you need the core file or the php.inis or I can help you somehow
 [2006-12-20 18:02 UTC] tony2001@php.net
Did you rebuild extensions using the snapshot or do you still use the ones from ports?
Does it work with PHP CLI?
 [2006-12-20 18:30 UTC] felici at iddqd dot hu
Of course I rebuilt all of the extensions using the CVS snapshot. 

If I'm trying to use the CLI version I get the same:

[root@starbase /var/virtual/users/feldeci/www/mail.dns123.eu]# php phpi___.php 

[...]

If you did not receive a copy of the PHP license, or have any
questions about PHP licensing, please contact license@php.net.
Segmentation fault: 11 (core dumped)

PHP finishes with the script, then crashes. The backtrace is the same in this case, too. There is only a simple phpinfo() in the file.

<?php
        phpinfo();
?>
 [2006-12-20 18:42 UTC] tony2001@php.net
Could you please provide a shell account on this machine?
 [2006-12-20 22:04 UTC] felici at iddqd dot hu
I sent you the login credentials.
 [2006-12-22 15:37 UTC] tony2001@php.net
Please check the mail I sent you.
 [2006-12-30 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".
 [2007-02-25 22:33 UTC] danger at rulez dot sk
We are using php 4.4.5 fcgi + lighttpd and after upgrade from 4.4.4 we are seeing these messages prette often in the logs. It didn't hapeen with php 4.4.4. This happens on two different boxes which are running the same web application (dns round-robin). Any way how can we try to debug this?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 12:01:32 2024 UTC