php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40751 Apache segmentation fault
Submitted: 2007-03-07 21:39 UTC Modified: 2007-03-11 10:20 UTC
From: sti-pe2 at online dot no Assigned:
Status: Closed Package: Session related
PHP Version: 4.4.6 OS: FreeBSD 5.3-RELEASE
Private report: No CVE-ID: None
 [2007-03-07 21:39 UTC] sti-pe2 at online dot no
Description:
------------
When running some of my php-pages, I get segmentation faults in Apache. 
I think I have narrowed it down to session-handling in php, see reproduce code. Pages not including sessions works fine.
I have upgraded both Apache, PHP and MySQL lately, but don't know if this is related to the errors I experience.

Systeminfo:
FreeBSD 5.3-RELEASE
Apache 1.3.37
PHP 4.4.6
ZendOptimizer 3.2.2 (disabled for now)
MySQL 4.1.22 

register_globals=on
Tests with register_globals=off does not make any difference.

PHP compile options:
./configure --enable-versioning --enable-memory-limit --with-layout=GNU --with-config-file-scan-dir=/usr/local/etc/php --disable-all --with-regex=php --with-apxs=/usr/local/sbin/apxs --disable-ipv6 --prefix=/usr/local

Reproduce code:
---------------
<?
  session_register("test_sessie");

  echo "does this work?";
?> 

Expected result:
----------------
Output to screen/browser: 
does this work?

Actual result:
--------------
The browser returns a blank page, command line returns "Segmentation fault (core dumped)".

/var/log/messages:
kernel: pid 459 (httpd), uid 80: exited on signal 11 

Apache's error.log:
child pid 458 exit signal Segmentation fault (11) 

# gdb php
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "i386-marcel-freebsd"...
(gdb) run test.php
Starting program: /usr/local/bin/php test.php

Program received signal SIGSEGV, Segmentation fault.
0x080cae9a in _zval_ptr_dtor (zval_ptr=0x282e7928) at /root/dl/php-4.4.6/Zend/zend_execute_API.c:287
287             (*zval_ptr)->refcount--;
(gdb)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-03-07 21:57 UTC] tony2001@php.net
After 10 thousands requests with ab I still can't see anything except "does this work?".
--enable-versioning - could you please remove this option?

 [2007-03-08 07:37 UTC] sti-pe2 at online dot no
Recompiled without --enable-versioning, but I still get the same error.
 [2007-03-09 09:02 UTC] sti-pe2 at online dot no
I installed older versions of PHP, and 4.3.10(!) actually works... All newer versions result in the same error.

Are there any known issues regarding sessions when upgrading from 4.3.10 to 4.3.11? Any config in Apache that may be a problem?
 [2007-03-09 10:42 UTC] tony2001@php.net
Do you have open_basedir set?
 [2007-03-09 11:21 UTC] sti-pe2 at online dot no
No, my php.ini says
;open_basedir =
 [2007-03-09 11:56 UTC] sti-pe2 at online dot no
Installed latest snapshot, but I still get the same error.
 [2007-03-09 12:22 UTC] tony2001@php.net
I'm still unable to reproduce it.
 [2007-03-09 14:43 UTC] scottmacvicar at ntlworld dot com
What other extensions do you load in php.ini an what order are they loaded?

If you disable all apart from session do you still get the crash?
 [2007-03-09 21:06 UTC] sti-pe2 at online dot no
These are loaded, in this order:
mysql.so
pcre.so
bz2.so
session.so
xml.so

And guess what? Yes, it crashes even if just session is loaded...
 [2007-03-09 23:56 UTC] tony2001@php.net
Any other information?
A working reproduce code? Full backtrace? Valgrind report? Anything?
 [2007-03-11 10:20 UTC] sti-pe2 at online dot no
Ok, case closed. I was using an old version of session.so. I thought this was automaticly updated during installation of new version of PHP, but no.

Thanks for your help!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC