ID: 36884 Comment by: kutovoy at gmail dot com Reported By: guenther dot unterrainer at gknsintermetals dot com Status: No Feedback Bug Type: Apache related Operating System: SLES9 SP3 x86-64 PHP Version: 4.4.2 New Comment:
I found out that this problem (in my case) was connected with unpacking (gz) corrupted(truncated) data from database after some headeik with debugging and testing. I stored compressed data in TEXT field, but data was 85Kb length and was truncated to 65535. I think gzuncompress cause that glibc errors. After altering field to LONGBLOB problem gone. Good luck! Previous Comments: ------------------------------------------------------------------------ [2006-10-11 14:01:11] kutovoy at gmail dot com The same errors on big arrays of objects. on PHP 4.4.2, I'm now trying to figure out working version of PHP. *** glibc detected *** free(): invalid pointer: 0x08925b00 *** [Wed Oct 11 09:26:06 2006] [notice] child pid 2610 exit signal Aborted (6) [Wed Oct 11 09:28:38 2006] [error] [client 194.247.xxx.yyy] File does not exist: /xxx/htdocs/yyy/favicon.ico [Wed Oct 11 10:58:43 2006] [notice] child pid 4059 exit signal Segmentation fault (11) and similar with *** glibc detected *** corrupted double-linked list: ------------------------------------------------------------------------ [2006-10-05 21:14:55] ndickerson at gmi-mr dot com I have also encountered this bug on php 4.3.10 using php xmlrpc libraries(phpxmlrpc.sourceforge.net) and processing an array of 20,000 records using the library, which happens to create a large number of objects. *** glibc detected *** double free or corruption (!prev): 0x0fbf24b8 *** is followed by some *** glibc detected *** corrupted double-linked list: 0x006f4858 *** There are also some other errors that I have lost that occur in the place of the double free or corruption error.. This works fine when it is not processing as many objects. ------------------------------------------------------------------------ [2006-10-05 16:53:12] egon at inf dot ufpr dot br The above code works fine in 5.1. It crashes on PHP 4.3.4, 4.4.2 and 4.4.4 on both linux/windows. ------------------------------------------------------------------------ [2006-10-04 22:35:04] egon at inf dot ufpr dot br By the way, I've got several types of erros, it appears to be random: [Wed Oct 04 17:51:18 2006] [notice] child pid 12451 exit signal Segmentation fault (11) *** glibc detected *** free(): invalid next size (fast): 0x08202798 *** [Wed Oct 04 17:58:35 2006] [notice] child pid 12693 exit signal Aborted (6) 77*** glibc detected *** corrupted double-linked list: 0xb7b7d358 *** [Wed Oct 04 19:21:51 2006] [notice] child pid 12731 exit signal Aborted (6) ------------------------------------------------------------------------ [2006-10-04 22:31:30] egon at inf dot ufpr dot br 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?"; ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/36884 -- Edit this bug report at http://bugs.php.net/?id=36884&edit=1