php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66837 APC opcode cache under heavy load: Random memory contents in PHP code
Submitted: 2014-03-06 19:53 UTC Modified: 2014-03-07 19:29 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: reto at cargomedia dot ch Assigned:
Status: Closed Package: APC (PECL)
PHP Version: 5.4.25 OS: Debian 7
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.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: reto at cargomedia dot ch
New email:
PHP Version: OS:

 

 [2014-03-06 19:53 UTC] reto at cargomedia dot ch
Description:
------------
We're running php-fpm on two servers with ~100 concurrent processes each.
After upgrading from Debian 6 + PHP 5.3 to Debian 7 + PHP 5.4 we're seeing very strange errors popping up, which don't make sense from a PHP-userland view.

Approximately every third time we start php-fpm all processes suffer from a problem where memory content seems to be inserted in strange places. All processes  suffer from the same problem.
Some of the problems we've seen:

1. Cannot execute statement: SQLSTATE[HY000]: General error: 1300 Invalid utf8 character string: 'entityType\xA76'2'\xA2L' (query: `SELECT COUNT(*) FROM `sk_pinboard_entity` WHERE `entityType
=> Random characters part of a SQL query. The field name is hardcoded in php code.

2. Cannot find `:snowtree.tpl` in library/CM/Render.php on line 216
=> The file name should be "tree.tpl", randomly ":snow" was added

3. E_COMPILE_ERROR: Cannot redeclare class cm_paging_actionlimit_action in ...
=> Class re-declaration, maybe the include leads to a wrong file?

4. Base lambda function for closure not found
=> Seems similar to https://bugs.php.net/bug.php?id=52144

..and so on..

We're experiencing this with debian stock php 5.4.4 but also current 5.4.25.
APC is current version 3.1.13.
We tried changing almost all configuration values to no avail (write_lock, canonicalize, stat, shm_segments, ...).

The only thing which helps is disabling the opcode cache (cache_by_default=0).

We pass the following flags to configure:
--enable-apc-mmap --enable-apc-pthreadmutex --disable-apc-debug --disable-apc-filehits --disable-apc-spinlocks


Any ideas on what could cause this, or how we could debug this?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-03-06 23:30 UTC] gopalv@php.net
I don't think the 5.4 lambda bugs are going to be fixed in APC.

The smart move is to switch to opcache+APCu and that will track the newer php releases much better.
 [2014-03-07 19:29 UTC] reto at cargomedia dot ch
-Status: Open +Status: Closed
 [2014-03-07 19:29 UTC] reto at cargomedia dot ch
@gopalv thanks for the suggestions, switched to apcu+opcache and it works great so far!

Didn't know you could use these on 5.4 as well. Thanks!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC