php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69838 OPCACHE Warning Internal error: wrong size calculation
Submitted: 2015-06-15 14:09 UTC Modified: 2015-06-16 12:31 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: tm8544 at hotmail dot com Assigned: ab (profile)
Status: Closed Package: opcache
PHP Version: 7.0.0alpha1 OS: Windows 7 x64
Private report: No CVE-ID: None
 [2015-06-15 14:09 UTC] tm8544 at hotmail dot com
Description:
------------
If Opcache is on, log is filled with error messages like "Warning Internal error: wrong size calculation"

Below is an example, index.php uses include to read other files in the log.
If Opcache is disabled, there are no error messages.
Despite the error messages when opcache is on, programs runs otherwise as expected
 
Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\index.php start=0x2006cf38, end=0x2006fa20, real=0x2006fa1c

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\linkrel.txt start=0x2007c590, end=0x2007c8d8, real=0x2007c8d4

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\nimipaivat.php start=0x2007c8d8, end=0x2007f5e8, real=0x2007f5e4

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\php-scripts\nimipaiva_luettelo.php start=0x2007f5e8, end=0x20088400, real=0x200883fc

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\jaljella_oleva_aika.php start=0x20088400, end=0x20089718, real=0x20089714

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\laskuri.php start=0x20089718, end=0x2008dc80, real=0x2008dc7c

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\db_settings\info_db_settings.php start=0x2009a930, end=0x2009ae18, real=0x2009ae14

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\weather.php start=0x2009c600, end=0x2009ccc8, real=0x2009ccc4

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\db_settings\linkit_db_settings.php start=0x200a06a0, end=0x200a0b98, real=0x200a0b94

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\includes\footer.php start=0x200a0b98, end=0x200a22d0, real=0x200a22cc

Mon Jun 15 17:02:54 2015 (2180): Warning Internal error: wrong size calculation: C:\HTTP-SERVER\laskurit\count-g.php start=0x200a22d0, end=0x200a5648, real=0x200a5644
 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-15 14:46 UTC] laruence@php.net
-Status: Open +Status: Feedback
 [2015-06-15 14:46 UTC] laruence@php.net
could you please paste one mentioned file here? (the smallest one)

maybe the footer.php?

thanks
 [2015-06-15 16:07 UTC] tm8544 at hotmail dot com
-Status: Feedback +Status: Open
 [2015-06-15 16:07 UTC] tm8544 at hotmail dot com
footer.php
-------------

<table style="margin:auto;"><tr><td><ul style="margin: 0px;"><li>Katso Juhon, Sohvin, Mirri-Pekan ja Feetun tekemõ <a class="linkki_decoration_none" href="/linkit/<?php
if ($CLIENT_TYPE == "mobi") {echo 'mirri-pekan_animaatiopaketti_1.mp4';} else {echo 'mirri-pekan_animaatiopaketti_1.asf';}
?>">animaatiopaketti</a> (sisõltõõ 3 lyhytelokuvaa).</li><li>Katso Mirri-Pekan, Sohvin ja Feetun <a class="linkki_decoration_none" href="/linkit/<?php
if ($CLIENT_TYPE == "mobi") {echo 'm-psf_tetris_musiikkivideo.wmv.3gp';} else {echo 'm-psf_tetris_musiikkivideo.asf';}
?>">musiikkivideo</a>.&nbsp;HUOM ! Katso lopputeksteihin saakka !</li></ul></td></tr><tr><td class="muutos"><?php
echo "Palvelimen " . getenv("COMPUTERNAME") . " põivõmõõrõ ja aika: ";
$date = getdate();
echo $date['mday'].".".$date['mon'] . "." . $date['year'] . ", " . $date['hours'] . ":" . substr('0'.$date['minutes'], -2) . ":".substr('0'.$date['seconds'], -2);
echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';
$REF1=gethostbyname($_SERVER['SERVER_NAME']);
echo 'Palvelimen IP: ' . $REF1;
echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';
// echo 'Oma IP: ' . ($REF == $REF1 ? "Kotiverkko" : $REF);
echo 'Oma IP: ' . ($REF == "192.168.0.254" ? "Kotiverkko" : $REF);

/* 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://192.168.0.94/status.html");
curl_setopt($ch, CURLOPT_PORT, 80);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //not necessary unless the file redirects (like the PHP example we're using here)
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
// curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
// curl_setopt($ch, CURLOPT_USERPWD, "xxx:yyy");

$data = curl_exec($ch);
curl_close($ch);

echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';

if ($data === false) {
   echo ("Ei yhteyttõ IP-pistorasiaan!");
} else {
   $match = preg_match("~System temperature</td><td colspan=4  width=70% class=s1>(.*)</td>~i", $data, $matches);
   echo "IQ-socket: ";
   if ($match) echo "<a class='muutos' target='_blank' href='https://' . $_SERVER["SERVER_NAME"]. '/hallinta/iprasia.php'>".$matches[1]."</a>"; else echo "No Temp value";
   // System temperature</td><td colspan=4  width=70% class=s1> 47.4  ░C</td>
   
}
*/

echo '&nbsp;&nbsp;';
if ($CLIENT_TYPE == "mobi") {
   echo '<img style=\'border:0;\' src=\'images/valid_n_html_5.gif\' height=\'16\'>';
} else {
   echo '<img style=\'border:0;\' src=\'images/valid_n_html_5.gif\' height=\'20\' title=\'Tarkistettu HTML5-koodi\'>';
}
?></td></tr></table>
 [2015-06-15 16:45 UTC] tm8544 at hotmail dot com
footer.php (EDIT: corrected scandinavian characters, if it should matter)

<table style="margin:auto;"><tr><td><ul style="margin: 0px;"><li>Katso Juhon, Sohvin, Mirri-Pekan ja Feetun tekemä <a class="linkki_decoration_none" href="/linkit/<?php
if ($CLIENT_TYPE == "mobi") {echo 'mirri-pekan_animaatiopaketti_1.mp4';} else {echo 'mirri-pekan_animaatiopaketti_1.asf';}
?>">animaatiopaketti</a> (sisältää 3 lyhytelokuvaa).</li><li>Katso Mirri-Pekan, Sohvin ja Feetun <a class="linkki_decoration_none" href="/linkit/<?php
if ($CLIENT_TYPE == "mobi") {echo 'm-psf_tetris_musiikkivideo.wmv.3gp';} else {echo 'm-psf_tetris_musiikkivideo.asf';}
?>">musiikkivideo</a>.&nbsp;HUOM ! Katso lopputeksteihin saakka !</li></ul></td></tr><tr><td class="muutos"><?php
echo "Palvelimen " . getenv("COMPUTERNAME") . " päivämäärä ja aika: ";
$date = getdate();
echo $date['mday'].".".$date['mon'] . "." . $date['year'] . ", " . $date['hours'] . ":" . substr('0'.$date['minutes'], -2) . ":".substr('0'.$date['seconds'], -2);
echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';
$REF1=gethostbyname($_SERVER['SERVER_NAME']);
echo 'Palvelimen IP: ' . $REF1;
echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';
// echo 'Oma IP: ' . ($REF == $REF1 ? "Kotiverkko" : $REF);
echo 'Oma IP: ' . ($REF == "192.168.0.254" ? "Kotiverkko" : $REF);

/* 
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://192.168.0.94/status.html");
curl_setopt($ch, CURLOPT_PORT, 80);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); //not necessary unless the file redirects (like the PHP example we're using here)
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
// curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
// curl_setopt($ch, CURLOPT_USERPWD, "xxx:yyy");

$data = curl_exec($ch);
curl_close($ch);

echo ($CLIENT_TYPE == "mobi") ? '<br>' : ' | ';

if ($data === false) {
   echo ("Ei yhteyttä IP-pistorasiaan!");
} else {
   $match = preg_match("~System temperature</td><td colspan=4  width=70% class=s1>(.*)</td>~i", $data, $matches);
   echo "IQ-socket: ";
   if ($match) echo "<a class='muutos' target='_blank' href='https://' . $_SERVER["SERVER_NAME"]. '/hallinta/iprasia.php'>".$matches[1]."</a>"; else echo "No Temp value";
   // System temperature</td><td colspan=4  width=70% class=s1> 47.4  °C</td>
   
}
*/

echo '&nbsp;&nbsp;';
if ($CLIENT_TYPE == "mobi") {
   echo '<img style=\'border:0;\' src=\'images/valid_n_html_5.gif\' height=\'16\'>';
} else {
   echo '<img style=\'border:0;\' src=\'images/valid_n_html_5.gif\' height=\'20\' title=\'Tarkistettu HTML5-koodi\'>';
}
?></td></tr></table>
 [2015-06-16 03:16 UTC] laruence@php.net
-Assigned To: +Assigned To: ab
 [2015-06-16 03:16 UTC] laruence@php.net
I can not reproduce this on linux, welting, could you please try to reproduce on windows?

probably relates to some aligned...
 [2015-06-16 07:31 UTC] ab@php.net
@laruence, ack, i've put it on my tasks.

Thanks.
 [2015-06-16 10:28 UTC] ab@php.net
-Status: Assigned +Status: Feedback
 [2015-06-16 10:28 UTC] ab@php.net
@tm8544, nope, don't reproduce on Windows as well. Is it possible you post your ext/opcache related php.ini. What is the server you use?

Thanks.
 [2015-06-16 12:31 UTC] tm8544 at hotmail dot com
-Status: Feedback +Status: Assigned
 [2015-06-16 12:31 UTC] tm8544 at hotmail dot com
Server: Apache/2.4.12 (module using apache2handler)
Installed from Apachelounge httpd-2.4.12-win64-VC14.zip

Cache-related part of PHP.ini:
------------------------------
zend_extension=php_opcache.dll

[opcache]
opcache.enable=1
opcache.enable_cli=0
opcache.blacklist_filename=c:\PHP\php.ini.opcache_blacklist.txt
opcache.consistency_checks=0
;opcache.dups_fix=0
opcache.enable_file_override=0
opcache.error_log=
opcache.fast_shutdown=0
opcache.file_update_protection=900
opcache.force_restart_timeout=15
;opcache.inherited_hack=1
opcache.interned_strings_buffer=8
opcache.load_comments=1
opcache.log_verbosity_level=2
opcache.max_accelerated_files=4000
;opcache.max_file_size=0
opcache.max_wasted_percentage=5
opcache.memory_consumption=64
opcache.optimization_level=0xffffffff
;opcache.preferred_memory_model=
;opcache.protect_memory=0
opcache.revalidate_freq=600
opcache.revalidate_path=1
opcache.save_comments=1
opcache.validate_timestamps=0
opcache.use_cwd=1
opcache.mmap_base=0x20000000
 [2015-06-16 23:53 UTC] danack@php.net
I'm seeing this also, but in the CLI in Centos 6, but only when running `make test`, not when running PHP directly to try to investigate...
 [2015-06-20 07:35 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f88aad418e4e6fcc91d048446f0892a3ee5b065f
Log: Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
 [2015-06-20 07:35 UTC] ab@php.net
-Status: Assigned +Status: Closed
 [2015-06-23 18:04 UTC] ab@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f88aad418e4e6fcc91d048446f0892a3ee5b065f
Log: Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
 [2016-07-20 11:38 UTC] davey@php.net
Automatic comment on behalf of ab
Revision: http://git.php.net/?p=php-src.git;a=commit;h=f88aad418e4e6fcc91d048446f0892a3ee5b065f
Log: Fix bug #69838 OPCACHE Warning Internal error: wrong size calculation
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 07:01:29 2024 UTC