php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43199 Many segmentation faults
Submitted: 2007-11-05 14:17 UTC Modified: 2010-02-24 01:00 UTC
Votes:10
Avg. Score:4.8 ± 0.6
Reproduced:10 of 10 (100.0%)
Same Version:4 (40.0%)
Same OS:2 (20.0%)
From: eugene dot pikalov at gmail dot com Assigned:
Status: No Feedback Package: PDO related
PHP Version: 5.2.4 OS: Linux Fedora 2.6.22.5-76.fc7
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: eugene dot pikalov at gmail dot com
New email:
PHP Version: OS:

 

 [2007-11-05 14:17 UTC] eugene dot pikalov at gmail dot com
Description:
------------
On 5.2.3 everything allright, after update i have many segfaults in httpd logs. Apache/2.2.4

Reproduce code:
---------------
[Fri Nov 02 17:30:01 2007] [notice] child pid 30265 exit signal Segmentation fault (11)
[Fri Nov 02 17:32:21 2007] [notice] child pid 30840 exit signal Segmentation fault (11)
[Fri Nov 02 17:35:17 2007] [notice] child pid 31093 exit signal Segmentation fault (11)
[Fri Nov 02 17:39:06 2007] [notice] child pid 551 exit signal Segmentation fault (11)
[Fri Nov 02 17:39:58 2007] [notice] child pid 419 exit signal Segmentation fault (11)
[Fri Nov 02 17:43:56 2007] [notice] child pid 2439 exit signal Segmentation fault (11)
*** glibc detected *** /usr/sbin/httpd: munmap_chunk(): invalid pointer: 0x80e90b60 ***
======= Backtrace: =========
/lib/libc.so.6(cfree+0x1bb)[0x42255b]
/etc/httpd/modules/libphp5.so(zend_hash_destroy+0x4e)[0xcc607e]
/etc/httpd/modules/libphp5.so[0xb42227]
/etc/httpd/modules/libphp5.so(php_pdo_pdbh_dtor+0x15)[0xb422e5]
/etc/httpd/modules/libphp5.so(plist_entry_destructor+0x82)[0xcc8822]
/etc/httpd/modules/libphp5.so[0xcc5d68]
/etc/httpd/modules/libphp5.so(zend_hash_graceful_reverse_destroy+0x18)[0xcc5fa8]
/etc/httpd/modules/libphp5.so(zend_shutdown+0x12)[0xcbc892]
/etc/httpd/modules/libphp5.so(php_module_shutdown+0x2f)[0xc7ba6f]
/etc/httpd/modules/libphp5.so(php_module_shutdown_wrapper+0xb)[0xc7bb1b]
/etc/httpd/modules/libphp5.so[0xd344e3]
/usr/lib/libapr-1.so.0[0x385d1d]
/usr/lib/libapr-1.so.0(apr_pool_destroy+0x3d)[0x38648d]
/usr/sbin/httpd[0x800386c5]
/usr/sbin/httpd[0x80038c30]
/usr/sbin/httpd[0x80038e41]
/usr/sbin/httpd(ap_mpm_run+0x913)[0x80039843]
/usr/sbin/httpd(main+0x8b7)[0x80010217]
/lib/libc.so.6(__libc_start_main+0xe0)[0x3ccf70]
/usr/sbin/httpd[0x8000f2f1]
======= Memory map: ========
[Fri Nov 02 17:46:00 2007] [notice] child pid 2773 exit signal Aborted (6)
[Fri Nov 02 17:50:37 2007] [notice] child pid 4359 exit signal Segmentation fault (11)
[Fri Nov 02 17:53:55 2007] [notice] child pid 5519 exit signal Segmentation fault (11)
[Fri Nov 02 17:54:38 2007] [notice] child pid 5622 exit signal Segmentation fault (11)
[Fri Nov 02 17:55:51 2007] [notice] child pid 4738 exit signal Segmentation fault (11)
[Fri Nov 02 17:57:45 2007] [notice] child pid 6674 exit signal Segmentation fault (11)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-05 23:46 UTC] iliaa@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.


 [2007-11-09 08:38 UTC] serban dot ghita at verasys dot com
i can confirm this on slackware after upgrading.
Linux www 2.6.21.5-smp #1 SMP Sat Nov 3 15:51:44 Local time zone must be set--see zic m i686 Intel(R) Xeon(R) CPU E5335  @ 2.00GHz GenuineIntel GNU/Linux

i was running httpd-2.2.6 with PHP 5.2.4

i tried compiling both apache and php with less options, nothing worked.

temporary workaround: installed httpd-2.0.58 + PHP 5.2.4 and everithing worked. i cannot generate a backtrace at the moment because i'm on a production server
 [2007-11-13 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".
 [2008-08-15 21:17 UTC] jfrisby at adknowledge dot com
We're seeing an almost identical stack trace from a php commandline 
program.  Basically, if we connect to a DB using PDO_mysql, we get an 
exit code of 1 after all our code has successfully executed without 
error -- but only if we use persistent connections.

This is on PHP 5.2.4 under Ubuntu Hardy.

Per suggestions on #php.pecl, will try SQLite driver, and if possible, 
5.3.

---snip---

<?php
error_reporting(E_ALL|E_STRICT);
 
 
try {
$obj = new PDO("mysql:host=localhost;dbname=ls_dev_jfrisby","root",""
   ,array(PDO::ATTR_PERSISTENT => true));
$stmt = $obj->prepare("select count(1) cnt from channel_map_bids");
$stmt->execute();
var_dump($stmt->fetchAll());
 
$obj = null;
} catch (Exception $e) {
   print "exception: " . (string)$e . "\n";
}
 
exit(0);
 
?>
 [2008-08-15 22:21 UTC] jfrisby at adknowledge dot com
Follow-up: Changing the DSN in the sample code to "sqlite::memory:" per 
Johannes' suggestion -- and removing the actual query since the table 
doesn't exist -- produces the same behavior.

We will attempt to test 5.2.6, and if it occurs there, 5.3.0.
 [2008-09-03 23:31 UTC] tikitiki at mybboard dot com
Hello,

I help run a site (http://ncaabbs.com/) which has recently been experiencing the same thing - It's reproducible in PHP 5.2.6 (that's what we're running right now)

# cat /var/log/apache2/error_log | grep Segmentation
[Wed Sep 03 17:32:50 2008] [notice] child pid 25431 exit signal Segmentation fault (11)
[Wed Sep 03 17:32:53 2008] [notice] child pid 26658 exit signal Segmentation fault (11)
[Wed Sep 03 17:32:53 2008] [notice] child pid 26777 exit signal Segmentation fault (11)

It's causing apache to crash every few minutes
 [2008-09-03 23:32 UTC] tikitiki at mybboard dot com
We btw, aren't using PDO so I don't think that is the direct cause.
 [2010-02-16 14:29 UTC] geniusweb dot llc at gmail dot com
This bug affects me in exactly the same way.  A lightly loaded server running this for about 12 hours ends up with hundreds of apache2 almost-zombies that need kill -9 treatment, and frequent page mis-loads.

Thanks to the person who suggested that it's persistence related, I've disabled that and 

Here's my backtrace:



[New process 29052]
#0  0xb7586bf1 in ?? () from /usr/lib/apache2/modules/libphp5.so
(gdb) bt
#0  0xb7586bf1 in ?? () from /usr/lib/apache2/modules/libphp5.so
#1  0xb74c0c2f in sapi_getenv () from /usr/lib/apache2/modules/libphp5.so
#2  0xb74cc760 in ?? () from /usr/lib/apache2/modules/libphp5.so
#3  0xb74e51f8 in ?? () from /usr/lib/apache2/modules/libphp5.so
#4  0xb64e41d7 in ?? () from /usr/lib/php5/20060613+lfs/pdo.so
#5  0xb64e4285 in php_pdo_pdbh_dtor () from /usr/lib/php5/20060613+lfs/pdo.so
#6  0xb750fc23 in plist_entry_destructor ()
   from /usr/lib/apache2/modules/libphp5.so
#7  0xb750ca15 in ?? () from /usr/lib/apache2/modules/libphp5.so
#8  0xb750cca7 in zend_hash_graceful_reverse_destroy ()
   from /usr/lib/apache2/modules/libphp5.so
#9  0xb750fb0d in zend_destroy_rsrc_list ()
   from /usr/lib/apache2/modules/libphp5.so
#10 0xb750212e in zend_shutdown () from /usr/lib/apache2/modules/libphp5.so
#11 0xb74b7b65 in php_module_shutdown ()
   from /usr/lib/apache2/modules/libphp5.so
#12 0xb74b7c37 in php_module_shutdown_wrapper ()
   from /usr/lib/apache2/modules/libphp5.so
#13 0xb7586831 in ?? () from /usr/lib/apache2/modules/libphp5.so
#14 0xb7f10f7d in ?? () from /usr/lib/libapr-1.so.0
#15 0xb7f1172d in apr_pool_destroy () from /usr/lib/libapr-1.so.0
#16 0x0808dfb4 in ?? ()
#17 0x0808e502 in ?? ()
#18 0x0808e707 in ?? ()
#19 0x0808f0f7 in ap_mpm_run ()
#20 0x08066dd5 in main ()
 [2010-02-16 14:47 UTC] pajoye@php.net
Please try using this snapshot:

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

  http://windows.php.net/snapshots/

Or at least with 5.2.13RC
 [2010-02-24 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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 21:01:32 2024 UTC