Ticket #63 (closed defect: fixed)

Opened 2 years ago

Last modified 3 months ago

data corruption when eaccelerator.shm_only=0

Reported by: gacek@intertele.pl Assigned to: hans
Priority: blocker Milestone: 0.9.5
Component: eAccelerator Version: 0.9.5
Keywords: Cc:

Description (Last modified by bart)

When using disk cache, eaccelerator (version >= 0.9.5r1, PHP 5.1.2) corrupts PHP assoc arrays. I suspect it has something to do with empty-string indexes. Tried 0.9.5*, svn head, all have the same bug.

It occurs on uniprocessor x86, and on dual AMD Opteron. Bug does not occur, when eaccelerator.shm_only=1. Tried with optimizer and/or compression disabled, with no effect.

Example: var_dump() of corrupted PHP array:

array(2) {

[""]=> array(0) { } [""]=> array(5) {

db_host?=> string(13) "mysql.test.pl" db_name?=> string(6) "dbname" db_passwd?=> string(6) "dbpass" db_type?=> string(5) "mysql" db_user?=> string(6) "dbuser"

}

}

Attachments

attach_rules.php (3.7 kB) - added by anonymous on 05/18/06 04:41:43.

Change History

04/21/06 15:26:13 changed by anonymous

Might be helpful, or not: this array was an object member, and dumped from within class method by: var_dump($this -> dbh_tbl);

04/24/06 11:02:56 changed by me@najk.com

Think its the same bug as ticket 47.

05/11/06 05:16:01 changed by aziem@revelex.com

  • priority changed from critical to blocker.

We're experiencing the same issue any time it encounters an empty string. Usually as array keys but sometimes simply in an IF statement, such as the following (which you can get from smarty.php.net):

38: if($string != ) { 39: return strftime($format, smarty_make_timestamp($string));

The errors: [2863] EACCELERATOR: PHP crashed on opline 23 of smarty_modifier_date_format() at /opt/htdocs/www.revelex.com/live/include/smarty/plugins/modifier.date_format.php:38 [Wed May 10 20:58:31 2006] [notice] child pid 2863 exit signal Segmentation fault (11)

Our internal tests don't produce the flaw, but when we put it in production we get see over 10,000 broken sockets per server per day, which is even more embarrassing because our Squid HTTP accelerator sends a ERR_ZERO_SIZE_OBJECT error when it happens. Making this a blocker since it halts the page and breaks the connection.

05/11/06 05:22:35 changed by aziem@revelex.com

I should note that we're also using PHP 5.1.2 and ea 0.9.5b2. We're using dual proc IBM blades. As the smarty php code was mangled by this but tracker, here's a link to the file:

http://cvs.php.net/viewcvs.cgi/smarty/libs/plugins/modifier.date_format.php?view=markup&rev=1.14

05/12/06 02:00:48 changed by aziem@revelex.com

  • priority changed from blocker to critical.

The work-around suggested by the bug reporter works; lowering status down to critical.

05/18/06 04:41:43 changed by anonymous

  • attachment attach_rules.php added.

06/08/06 14:18:04 changed by chernousov

Very annoying bug... I'm experiencing it already few months ;(

latest EA from svn, php 5.1.4 fcgi + lighttpd.

06/30/06 16:33:41 changed by bart

  • description changed.
  • milestone set to 0.9.5.

We really need some script that we can use to reproduce this. It's impossible to start digging in phpbb or smarty. I you want to see this fixed we need a standalone script to reproduce this, otherwise I don't even know where to start looking.

07/18/06 13:24:40 changed by anonymous

I can't (and probably nobody can) reproduce it on isolated script. The bug is hidden somewhere in the code dumping compiled script to the disk or restoring from the disk, that's almost sure.

me@najk.com suspects this is the same bug as #47.

Maybe such invalid bytecode in cache file might give you a clue? You could at least find if it's stored or REstored badly.

07/21/06 20:13:56 changed by hans

  • owner changed from somebody to hans.
  • status changed from new to assigned.

I have finally been able to reproduce this, and i'm working on a fix.

07/22/06 13:06:42 changed by bart

  • priority changed from critical to blocker.

07/24/06 14:52:51 changed by hans

A fix for this bug has been committed to the repository. See https://www.eaccelerator.net/changeset/236

A 0.9.5 release candidate will most likely be released later today which will include this fix, so please give that a try later on.

07/24/06 15:15:06 changed by hans

  • status changed from assigned to closed.
  • resolution set to fixed.

02/27/08 14:58:05 changed by redfred

fix this here italy property and crete property