php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55740 Built-in web server throws malloc error
Submitted: 2011-09-20 13:40 UTC Modified: 2011-09-21 05:34 UTC
From: scott at aubrey dot org dot uk Assigned:
Status: Not a bug Package: Built-in web server
PHP Version: 5.4.0beta1 OS: Mac OS X 10.7.1 (Lion)
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: scott at aubrey dot org dot uk
New email:
PHP Version: OS:

 

 [2011-09-20 13:40 UTC] scott at aubrey dot org dot uk
Description:
------------
running the built-in web server and making 0 or 1 request, Then ctrl-c to 
shutdown throws out extra malloc error. This does not happen with more than one 
request. The request can be empty PHP files, or even static resources.


Test script:
---------------
<?php

Expected result:
----------------
clean shutdown without malloc errors

Actual result:
--------------
> php -S 0.0.0.0:8000
PHP 5.4.0beta1 Development Server started at Tue Sep 20 14:33:11 2011
Listening on 0.0.0.0:8000
Document root is /Users/scottaubrey
Press Ctrl-C to quit.
[Tue Sep 20 14:33:14 2011] 127.0.0.1:49618 [200]: /testphp.php
^Cphp(469) malloc: *** error for object 0x101f19700: pointer being freed was not 
allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6
> php -S 0.0.0.0:8000
PHP 5.4.0beta1 Development Server started at Tue Sep 20 14:33:17 2011
Listening on 0.0.0.0:8000
Document root is /Users/scottaubrey
Press Ctrl-C to quit.
[Tue Sep 20 14:33:18 2011] 127.0.0.1:49619 [200]: /testphp.php
[Tue Sep 20 14:33:18 2011] 127.0.0.1:49620 [200]: /testphp.php
^C

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-09-20 13:59 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2011-09-20 13:59 UTC] laruence@php.net
Please try using this snapshot:

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

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

I can not reproduce this, could you test again with the svn-trunk? thanks
 [2011-09-20 15:04 UTC] scott at aubrey dot org dot uk
-Status: Feedback +Status: Open
 [2011-09-20 15:04 UTC] scott at aubrey dot org dot uk
a basic ./configure did not recreate, but when I build with my default configure 
it is still failing in the latest snapshot.

my configure flags:

'./configure'  '--prefix=/Users/scottaubrey/.usr/' '--with-config-file-
path=/Users/scottaubrey/conf/php.ini' '--with-config-file-scan-
dir=/Users/scottaubrey/conf/php.ini.d/' '--with-mysqli=mysqlnd' '--with-pdo-
mysql=mysqlnd'
 [2011-09-21 03:54 UTC] laruence@php.net
I still can not reproduce with your configure flags, can you paste the whole 
warning message out? of course after ereasing your private info.
 [2011-09-21 05:18 UTC] scott at aubrey dot org dot uk
Hi Laruence,

The whole message is already there:
php(469) malloc: *** error for object 0x101f19700: pointer being freed was not 
allocated
*** set a breakpoint in malloc_error_break to debug
Abort trap: 6

but after a little bit more experimenting, it seems it's APC causing the issue, 
which of course becomes active with the configure flags picking up my php.ini. 
disabling the extension then does not reproduce.
 [2011-09-21 05:34 UTC] laruence@php.net
-Status: Open +Status: Bogus
 [2011-09-21 05:34 UTC] laruence@php.net
hmm, in this case, could you file a bug at http://pecl.php.net/package/apc ? 
and I am going to mark this bug as a bogus.

thanks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 12 20:01:27 2024 UTC