|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-03-28 09:40 UTC] guenther dot unterrainer at gknsintermetals dot com
Description: ------------ When I walk trough my php-program I accidentally get the following errors in apache error.log: [Mon Mar 27 14:50:24 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) *** glibc detected *** double free or corruption (!prev): 0x0000000000b4acc0 *** [Mon Mar 27 14:52:16 2006] [notice] child pid 15561 exit signal Segmentation fault (11) [Mon Mar 27 14:53:59 2006] [notice] child pid 15558 exit signal Segmentation fault (11) *** glibc detected *** double free or corruption (out): 0x0000000000f16c90 *** *** glibc detected *** free(): invalid next size (fast): 0x0000000000f16c60 *** *** glibc detected *** corrupted double-linked list: 0x0000000000f16c50 *** *** glibc detected *** free(): invalid pointer: 0x0000000000f16c88 *** Then the site crashes and the error.log-file reaches aprox. 300 MB (always with the last errormessage: *** glibc detected *** free(): invalid pointer: 0x0000000000f16c88 ***) Same Problem with PHP 4.4.1 Apache Version is 1.3.34 with PHP as static module. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 12:00:01 2025 UTC |
Now I compiled PHP with --enable-debug and get the following in apache error.log. Result is the same: the site crashes. [Tue Mar 28 10:54:37 2006] [notice] Apache/1.3.34 (Unix) mod_gzip/1.3.26.1a PHP/4.4.2 configured -- resuming normal operations [Tue Mar 28 10:54:37 2006] [notice] Accept mutex: sysvsem (Default: sysvsem) [Tue Mar 28 10:56:47 2006] Script: '/www/servers/obd/htdocs/obd/modules/salesControlNew/index.php' --------------------------------------- /install/web/php-4.4.2/Zend/zend_execute_API.c(289) : Block 0x00FA4910 status: /install/web/php-4.4.2/Zend/zend_variables.c(44) : Actual location (location was relayed) Beginning: OK (allocated on /install/web/php-4.4.2/ext/standard/var_unserializer.c:696, 5 bytes) End: Overflown (magic=0xFA49588FCC84 instead of 0x2A8FCC84) 3 byte(s) overflown --------------------------------------- [Tue Mar 28 10:57:40 2006] [notice] child pid 7962 exit signal Segmentation fault (11) [Tue Mar 28 10:59:01 2006] [notice] child pid 7964 exit signal Segmentation fault (11) [Tue Mar 28 10:59:16 2006] [notice] child pid 7966 exit signal Segmentation fault (11) [Tue Mar 28 11:00:10 2006] Script: '/www/servers/obd/htdocs/obd/modules/budget/index.php' --------------------------------------- /install/web/php-4.4.2/Zend/zend_hash.c(561) : Block 0x00E0B3F0 status: Beginning: OK (allocated on /install/web/php-4.4.2/Zend/zend_hash.c:419, 71 bytes) End: Overflown (magic=0xE0B47884 instead of 0x2A8FCC84) 3 byte(s) overflown --------------------------------------- *** glibc detected *** double free or corruption (!prev): 0x00000000010738c0 *** [Tue Mar 28 11:00:16 2006] [notice] child pid 7987 exit signal Segmentation fault (11) [Tue Mar 28 11:00:16 2006] [notice] child pid 7988 exit signal Segmentation fault (11) [Tue Mar 28 11:00:21 2006] [notice] child pid 7972 exit signal Segmentation fault (11) [Tue Mar 28 11:00:24 2006] Script: '/www/servers/obd/htdocs/obd/modules/salesFunnel/salesFunnel.php' --------------------------------------- /install/web/php-4.4.2/Zend/zend_execute.h(44) : Block 0x00F630F0 status: Beginning: OK (allocated on /install/web/php-4.4.2/ext/standard/var_unserializer.c:230, 24 bytes) End: Overflown (magic=0x00F63148 instead of 0x2A8FCC84) 4 byte(s) overflown --------------------------------------- [Tue Mar 28 11:00:25 2006] [notice] child pid 7998 exit signal Segmentation fault (11)<?php require("obd/scripts/obdStartPage.script.php"); require_once("./TSlsBdgInitForm.class.inc"); $cAppForm = new TSlsBdgInitForm("index.php"); require("obd/scripts/obdStartDoc.script.php"); $cAppForm->printHtmlForm(); require("obd/scripts/obdFinishDoc.script.php"); ?>I got the same error: *** glibc detected *** free(): invalid pointer: 0x09586360 *** *** glibc detected *** free(): invalid pointer: 0x099f2360 *** *** glibc detected *** free(): invalid pointer: 0x0a0f1360 *** root@srv101 [/usr/local/apache/conf]# php -v PHP 4.4.4 (cli) (built: Sep 14 2006 14:21:20) Copyright (c) 1997-2006 The PHP Group Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies with Zend Optimizer v3.0.0, Copyright (c) 1998-2006, by Zend Technologies *** glibc detected *** corrupted double-linked list: 0x09328b90 *** Aborted (core dumped) root@srv101 [/usr/local/apache/conf]# I solve disabling the Zend Optimizer module.Man, this was very difficult to track down. I spent some hours locating to problem and trying to isolate it. To me it has nothing to do with databases or acceletators. Apparently it has to do with a lot of classes in an array. I'm using PHP 4.4.2-1build1 on Ubuntu 6.06. You need to have some high limit on php.ini's memory_limit (to me 512M was enough). The 'magical' number 16000 on the code above can be lowered to 3000 to crash my 1GRam machine but I had to increase it to 16000 to crash my 2GRam server. I have a production server down now because of this, any suggestions? Downgrading perhaps? We will be glad to cooperate with more info. Thanks, <?php class Field { var $name,$type,$value, $length, $allownull, $description, $long_description, $validation, $accepted_values, $default_value; function Field($name, $type, $length, $allownull, $description, $default=NULL,$long_description=NULL) { $this->name=$name; $this->type=$type; $this->length=$length; $this->allownull=$allownull; $this->description=$description; $this->long_description=$long_description; $this->default_value=$default; $this->validation=NULL; $this->accepted_values=NULL; } } class DBObject { function DBObject($conn=NULL) { $this->setupFields(); $this->conn=$conn; $this->orderby=array(); } function addField($name, $type, $length, $allownull, $description, $default=NULL,$long_description=NULL) { $this->field[$name]["obj"]=new Field($name, $type, $length, $allownull, $description, $default,$long_description); } } class SomeTable extends DBObject { function setupFields() { for ($i=0;$i<26;$i++) $this->addField("field$i", "string", 11, false, "Some field"); } } function crashMe() { $x=new SomeTable(NULL); $arr=array(); for($i=0;$i<16000;$i++) { $m=new SomeTable(NULL); $arr[]=$m; } return $arr; } crashMe(); echo "I've not crashed?"; ?>