php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14780 Segmentation fault with "mm",PHP works fine with "files"
Submitted: 2001-12-31 01:55 UTC Modified: 2002-06-27 22:53 UTC
Votes:4
Avg. Score:4.5 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: jlim at natsoft dot com dot my Assigned:
Status: Not a bug Package: Session related
PHP Version: 4.1.1 OS: RH 7.2
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: jlim at natsoft dot com dot my
New email:
PHP Version: OS:

 

 [2001-12-31 01:55 UTC] jlim at natsoft dot com dot my
When stress testing my web server with

ab -n5000 -c10 <url>

after about 1000-1500 requests the child processes start to fail.

In my apache error_log I see many entries like the following:

[Fri Dec 28 19:50:06 2001] [notice] child pid 14215 exit signal Segmentation fault (11)

If I repeat the "ab" test several times, eventually Apache will hang and I have to restart the web server. Here are the results:

This is ApacheBench, Version 1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-1999 The Apache Group, http://www.apache.org/

Benchmarking semut (be patient)...
Server Software:        Apache/1.3.20
Server Hostname:        semut
Server Port:            80

Document Path:          /juris/case.php
fbba51299f
Document Length:        85383 bytes

Concurrency Level:      10
Time taken for tests:   1638.945 seconds
Complete requests:      5000
Failed requests:        3446
   (Connect: 0, Length: 3446, Exceptions: 0)
Total transferred:      429091301 bytes
HTML transferred:       427029653 bytes
Requests per second:    3.05
Transfer rate:          261.81 kb/s received

Connnection Times (ms)
              min   avg   max
Connect:        0     9   197
Processing:  1692  3263 11353
Total:       1692  3272 11550

When I switch from "mm" to "files" everything works fine. I have a suspicion that the bug is related to the fact that I am running on an SMP processor.




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-31 02:12 UTC] jlim at natsoft dot com dot my
A simple script that reproduces the problem with "mm". Works fine for a while until "mm" breaks under stress:

<?php
error_reporting(E_ALL);
$abc1 = '';
for ($i=0;$i<20;$i++)
	session_register('abc'.$i);
@$_SESSION['abc1'] += 2;
print "<pre>$abc1\n\n";
?>


 [2002-01-02 17:08 UTC] yohgaki@php.net
I noticed this problem before your report :) It's not a mm, but pgsql save handler though. Root of the problem is the same, I guess. 
I'm not 100% sure, yet, but multiple close calls may be the cause.


 [2002-01-06 06:19 UTC] jlim at natsoft dot com dot my
Hi,

Here is my configure statement. Notice there's no pgsql:

./configure --with-mm --enable-inline-optimization --with-zlib --with-oci8=/u01/app/or
acle/product/8.1.7 --disable-onstatement --enable-ftp --with-apxs  --enable-shmop --en
able-sysvsem --with-gd


John Lim
 [2002-01-06 22:01 UTC] yohgaki@php.net
Found the cause and work around. (Use of session_module_name() is causing race) I need to reconsider how to make a real fix for this segfault :)


 [2002-01-06 22:11 UTC] yohgaki@php.net
Changed Status to Critical.

There are many problems with external session save handlers.....
 [2002-01-07 01:17 UTC] yohgaki@php.net
I haven't changed any, but it stopped segfaulting after cvs udpate.
Fixed in 4.2.0-dev.
Please reopen this report if you still have problem with 4.2.0-dev.
 [2002-06-27 22:53 UTC] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2004-01-31 10:39 UTC] dave dot turcotte at ieee dot org
I know this bug has been closed for two years now but I'm experiencing the same issue with the following configuration:

-RH 7.3
-Apache 1.3.23
-PHP 4.3.4  

Configure command: './configure' '--with-apxs' '--with-interbase' '--enable-track-vars' '--with-mm' 

After a while, I get seg fault unless I remove the line: ini_set('session.save_handler', 'mm') from my code.

Is there something else I'm missing or should this bug be re-opened.

Thanks, 

Dave
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 12:01:32 2024 UTC