php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #74055 Warning Internal error: wrong size calculation
Submitted: 2017-02-07 12:23 UTC Modified: 2017-12-17 21:42 UTC
Votes:4
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:1 (25.0%)
From: tom60 at op dot pl Assigned:
Status: Duplicate Package: opcache
PHP Version: 7.1.1 OS: Debian Jessie 64 bit
Private report: No CVE-ID: None
 [2017-02-07 12:23 UTC] tom60 at op dot pl
Description:
------------
After upgrading to PHP 7.1.1 from 7.0.13 we started seeing "wrong size calculation" warnings in the logs for the following files:

https://gist.github.com/pako-pl/37f436353e397b9a8bc2dd92470080d2



Test script:
---------------
Opcache configuration:

zend_extension=opcache.so

opcache.enable=1
opcache.enable_cli=0
opcache.memory_consumption=120
opcache.interned_strings_buffer=20
opcache.max_accelerated_files=6000
opcache.max_wasted_percentage=5
opcache.use_cwd=1
opcache.validate_timestamps=0
opcache.revalidate_freq=0
opcache.revalidate_path=1
opcache.save_comments=1
opcache.load_comments=1
opcache.fast_shutdown=0
opcache.enable_file_override=0
opcache.max_file_size=0
opcache.consistency_checks=0
opcache.log_verbosity_level=2

Actual result:
--------------
apache-error: Tue Feb 7 13:08:59 2017 (32223): Warning Internal error: wrong size calculation: /home/www/vendor/pclzip/pclzip/pclzip.lib.php start=0x00007fb492588e00, end=0x00007fb4925eae90, real=0x00007fb4925eae50

apache-error: Tue Feb 7 12:59:21 2017 (6597): Warning Internal error: wrong size calculation: /home/www/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/Auth/CramMd5Authenticator.php start=0x00007fb492117480, end=0x00007fb492119900, real=0x00007fb4921198a0

apache-error: Tue Feb 7 12:23:04 2017 (7560): Warning Internal error: wrong size calculation: /home/www/vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5.php start=0x00007fb49290b840, end=0x00007fb492925e30, real=0x00007fb492925e10

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-03-11 11:47 UTC] paul at totallytechy dot com
Same as below, since upgrading from 7.0.x

opcache:  Sat Mar 11 11:46:45 2017 (3200): Warning Internal error: wrong size calculation: /var/www/redacted/includes/common.inc start=0x00007f7d55c9d440, end=0x00007f7d55d419c0, real=0x00007f7d55d419a0

64bit Amazon Linux 2016.09 v2.5.1
PHP 7.1.2-4+deb.sury.org~trusty+1 (cli) (built: Mar  2 2017 13:23:06) ( NTS )

[opcache]
opcache.enable=1
opcache.dups_fix=1
opcache.enable_cli=1
opcache.memory_consumption=128
opcache.use_cwd=1
opcache.blacklist_filename=/etc/php/7.1/opcache-blacklist.txt
opcache.error_log=/var/log/php/opcache.err.log
opcache.log_verbosity_level=2
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=0
;opcache.revalidate_freq=5
opcache.fast_shutdown=1
opcache.validate_timestamps=1
opcache.revalidate_path=1
 [2017-03-11 12:40 UTC] nikic@php.net
Is this error reproducible reliably or does it happen sporadically? I was not able to reproduce the issue when running the provided files standalone.
 [2017-03-30 14:24 UTC] tom60 at op dot pl
The issue happens sporadically 3-10 times a day on our server, even after upgrading to PHP 7.1.3.
 [2017-09-04 09:25 UTC] spam2 at rhsoft dot net
this happens here too and what i can tell you is that it somehow is related to update cached files, last night i made a small change to "global_mysql_ext.inc" and voila that error happended again while never seen that with 7.0.x or 5.x

Mon Sep  4 00:39:07 2017 (13087): Warning Internal error: wrong size calculation: /phpincludes/global_mysql_ext.inc.php start=0x00007f0df18a40c0, end=0x00007f0df18c83e0, real=0x00007f0df18c83c0
 [2017-09-04 09:30 UTC] spam2 at rhsoft dot net
and it don't happen with every file, otherwise we would have a serious problem on the first production server running with 7.1 where one developer needs to live-debug his application with the customer

changes to my "global_mysql_ext.inc" seems to trigger it always and until now i am not sure if after the mesagew the problem is gone or not because i prefer i service restart to find out the impact if not doing so
 [2017-11-29 08:50 UTC] tom60 at op dot pl
It seems this issue was resolved for PHP 7.1.12 and 7.2.0RC4 - see: https://bugs.php.net/bug.php?id=75373
 [2017-12-17 21:42 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2017-12-17 21:42 UTC] nikic@php.net
Closing this as a duplicate of bug #75373, which is now fixed.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 15:01:23 2020 UTC