Bug #71135 [Com]: Random memory corruption with strings
From: jjones at smugmug dot com Date: Wed, 13 Sep 2017 01:46:05 +0000 Subject: Bug #71135 [Com]: Random memory corruption with strings References: 1 Groups: php.bugs Request: Send a blank email to php-bugs+get-211110@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=71135&edit=1
ID: 71135
Comment by: jjones at smugmug dot com
Reported by: iquito at gmx dot net
Summary: Random memory corruption with strings
Status: Closed
Type: Bug
Package: opcache
Operating System: Debian Jessie
PHP Version: 7.0.0
Assigned To: laruence
Block user comment: N
Private report: N
New Comment:
Today we've been running tests with "opcache.file_cache=" disabled. We were using
that feature before.
I have not been able to crash "php-fpm" since making that change, even on a system with a
tightly constrained "interned string buffer" setting.
So IMO if you're using Opcache file backed caching, it's worth trying to run with it
disabled.
Previous Comments:
------------------------------------------------------------------------
[2017-09-13 01:22:28] nick at noodles dot net dot nz
I'm still seeing problems as well. So far I've disabled huge code pages and changed
opcache to not check timestamps (code deploys now fire an opcache_reset() on each webserver).
Is it possible to disable interned strings?
Also, should we be adding comments to this bug or creating a new one (being that this is closed)?
------------------------------------------------------------------------
[2017-09-12 17:21:51] mike@php.net
After many more tests, it seems it rather depends on the moon phase, because I cannot reproduce
anymore.
Looking into the write of uninitialized bytes next.
------------------------------------------------------------------------
[2017-09-12 13:13:55] mike@php.net
Some valgrind logs:
https://gist.github.com/m6w6/67f71247f5325497a59d4686ba4845ac
------------------------------------------------------------------------
[2017-09-12 12:19:15] mike@php.net
The following patch has been added/updated:
Patch Name: interned_strings_top
Revision: 1505218752
URL: https://bugs.php.net/patch-display.php?bug=71135&patch=interned_strings_top&revision=1505218752
------------------------------------------------------------------------
[2017-09-12 12:18:03] mike@php.net
Several ingredients are needed to reproduce:
* opcache.file_cache enabled
* opcache.interned_strings_buffer set low (eg. 1)
* a reasonable large codebase to fill up the interned strings buffer
* quite a bit of luck that the remaining free buffer size is low enough to trigger
I could reproducibly, but not quite reliably produce a crash or zend_mm_panic with that recipe with
eg. laravel or phan.
I've way too less knowledge of opcache to argue yet what's going on, but I'll upload
a patch which /seemed/ to fix the issue for me. Maybe someone with more insight can comment whether
I'm totally off.
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=71135
--
Edit this bug report at https://bugs.php.net/bug.php?id=71135&edit=1
Thread (52 messages)
- Bug #71135 [Opn]: Random memory corruption with strings
- Bug #71135 [Asn->Fbk]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Fbk->NoF]: Random memory corruption with strings
- Bug #71135 [NoF->Opn]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Asn]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Asn]: Random memory corruption with strings
- Bug #71135 [Asn]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Asn->Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [PATCH]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Csd]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
- Bug #71135 [Com]: Random memory corruption with strings
| « previous | php.bugs (#211110) | next » |
|---|