Bug #73183 [Com]: Segfaults / zend_mm_heap corrupted

From: Date: Thu, 28 Jun 2018 15:06:28 +0000
Subject: Bug #73183 [Com]: Segfaults / zend_mm_heap corrupted
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216015@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=73183&edit=1

 ID:                 73183
 Comment by:         t dot motylewski at gmail dot com
 Reported by:        schnederle at futureweb dot at
 Summary:            Segfaults / zend_mm_heap corrupted
 Status:             Open
 Type:               Bug
 Package:            Reproducible crash
 Operating System:   Centos 7.2.1511
 PHP Version:        7.0.11
 Block user comment: N
 Private report:     N

 New Comment:

similar issues:
https://bugs.php.net/bug.php?id=73598
https://bugs.php.net/bug.php?id=65590
https://bugs.php.net/bug.php?id=66569


Previous Comments:
------------------------------------------------------------------------
[2016-12-19 12:01:23] schnederle at futureweb dot at

I can confirm that raising opcache.interned_strings_buffer from 8 to 16 MB did solve that Segfault
issues! ~3 Weeks without a single Segfault ...

Actual OPCache Stats - interned_strings_usage - more than the initial 8MB are used ...

----------------------------------------------------
Array
(
    [opcache_enabled] => 1
    [file_cache] => /var/www/ortsinfo/opcache
    [cache_full] => 
    [restart_pending] => 
    [restart_in_progress] => 
    [memory_usage] => Array
        (
            [used_memory] => 86297760
            [free_memory] => 47915104
            [wasted_memory] => 4864
            [current_wasted_percentage] => 0.0036239624023438
        )

    [interned_strings_usage] => Array
        (
            [buffer_size] => 16777216
            [used_memory] => 8840536
            [free_memory] => 7936680
            [number_of_strings] => 74538
        )

    [opcache_statistics] => Array
        (
            [num_cached_scripts] => 4397
            [num_cached_keys] => 12811
            [max_cached_keys] => 16229
            [hits] => 15118014
            [start_time] => 1482122407
            [last_restart_time] => 0
            [oom_restarts] => 0
            [hash_restarts] => 0
            [manual_restarts] => 0
            [misses] => 7
            [blacklist_misses] => 0
            [blacklist_miss_ratio] => 0
            [opcache_hit_rate] => 99.999953697643
        )

)
----------------------------------------------------

Andreas Schnederle-Wagner

------------------------------------------------------------------------
[2016-12-12 14:28:08] schnederle at futureweb dot at

Since I increased opcache.interned_strings_buffer from 8 to 16 there was no single SEGFAULT anymore
... guess the Problem must lie somewhere within Interned Strings Buffer Logic then?

------------------------------------------------------------------------
[2016-12-01 16:23:13] schnederle at futureweb dot at

Some new Information - Today I set OPCache Log Level to Debug ... no Segfault so far - but some
other weird Errors - maybe somehow related to the Segfaults Problem?

At first some of those:
< Thu Dec 1 11:44:34 2016 (12618): Warning Interned string buffer overflow
< Thu Dec 1 11:44:34 2016 (12618): Warning Interned string buffer overflow
< ...
< ...
< ...
< Thu Dec 1 11:44:34 2016 (12618): Warning Interned string buffer overflow
< Thu Dec 1 11:44:34 2016 (12618): Warning Interned string buffer overflow

Right after those Errors - some OOM Errors occured:
< [Thu Dec 01 11:45:52.556057 2016] [:error] [pid 11958] [client 80.110.0.0:50912] PHP Fatal
error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 6935160699037703352
bytes) in /var/www/path/html/includes/path1/file.php on line 38, referer: http://www.domain.at/admin/menue/fil...111&id_usr=111

Line 38 of the File where OOM occured:
< if (!function_exists("get_galleries")) {

Did increase opcache.interned_strings_buffer from 8 to 16 now ... but there shouldn't be such
OOM Troubles when reaching Limit I guess ... (not to speak about 'maybe' Segfaults ...)

------------------------------------------------------------------------
[2016-11-23 08:58:52] schnederle at futureweb dot at

still no luck with 7.0.13!

Maybe this additional Information can help?

Followed by the Segfaults I often see those Kind of Errors within Logs:

----------------------------------
error_log-20161116:[Tue Nov 15 14:35:52.478805 2016] [:error] [pid 30926] [client 80.110.0.0:54073]
PHP Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate
140380662153216 bytes) in /var/www/path/html/templates/path/php/news_nuggets.php on line 218,
referer: http://domain

----------------------------------

216 Alle
217 </div>
218 <div class="referenzen_cst_filter_right_entry<?php
if(isset($_GET['filter']) && $_GET['filter'] == 2) { ?>
active<?php } ?>" id="referenzen_entry_2" rel="2">
219 Tourismus
220 </div>
----------------------------------

As one can see - there is nothing which could take 127TB of Memory on Line 218 ... could it be that
OpCache is trying to Output complete nonsense?

------------------------------------------------------------------------
[2016-10-28 08:30:03] schnederle at futureweb dot at

Unfortunately no News yet ... same Problems occur with 7.0.12
Still hoping for some News on this Topic from PHP Guys! ;-)

------------------------------------------------------------------------


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=73183


--
Edit this bug report at https://bugs.php.net/bug.php?id=73183&edit=1


Thread (23 messages)

« previous php.bugs (#216015) next »