Bug #67889 [NEW]: funny Fatal error during apache shutdown

From: Date: Fri, 22 Aug 2014 15:54:28 +0000
Subject: Bug #67889 [NEW]: funny Fatal error during apache shutdown
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187242@lists.php.net to get a copy of this message
From: php at bof dot de Operating system: openSUSE 11.4 PHP version: 5.5.16 Package: opcache Bug Type: Bug Bug description:funny Fatal error during apache shutdown Description: ------------ Recently upgraded production webserver to PHP 5.5.16 with opcache (previously 5.4.26 with APC), I notice that when I shut down apache (while there are still some connections in flight / in processing) the following messages in php error log. The call to microtime() that is mentioned there happens at request shutdown from within a class instance __destruct() method of an object that is the sole singleton instance of its class (static protected $instance). How can microtime() be gone at that point in time??? In normal operation everything is fine with this mechanism, it is only when shutting down apache that this happens - which makes me suspect opcache (but not sure) Unfortunately I could not reproduce this on a nonloaded development system so far... Here's the fatal error log entry: [23-Aug-2014 01:19:39 Australia/Queensland] PHP Fatal error: Call to undefined function microtime() in /.../classes/counter/loadtime.inc on line 184 [23-Aug-2014 01:19:39 Australia/Queensland] PHP Fatal error: Cannot call overloaded function for non-object in Unknown on line 0 Destructor code: public function __destruct() { static::stop(); } That method's code starts like this, up to the line 184 microtime call of the log: static public function stop() { $that = static::$instance; if (!isset($that) || !isset($that->page)) { return; } $now = microtime(TRUE); and the second message about call overloaded function on non-object, probably comes some lines later as "$that->get_cpu_usage();" (there are no other objects involved up to that point) PHP 5.5.16 is running as mod_php under the openSUSE 11.4 (evergreen) apache 2.2.17 server (up to date). PHP 5.5.16 has been compiled using the following configure line ./configure \ --prefix=$DIR \ --bindir=$DIR/bin \ --libdir=$DIR \ --includedir=$DIR/include \ --mandir=$DIR/man \ --with-apxs2=/usr/sbin/apxs2 \ --with-config-file-path=$DIR \ --with-config-file-scan-dir=$DIR/ini.d \ --with-zend-vm=GOTO \ --enable-re2c-cgoto \ --disable-cgi \ --enable-bcmath \ --enable-calendar \ --enable-exif \ --enable-ftp \ --enable-intl \ --enable-mbstring \ --enable-pcntl \ --enable-soap \ --enable-sockets \ --enable-zip \ --enable-opcache \ --with-openssl \ --with-zlib \ --with-bz2 \ --with-curl \ --with-gd \ --enable-gd-native-ttf \ --with-jpeg-dir=/usr/include \ --with-gettext \ --with-gmp \ --enable-mysqlnd \ --with-mysqli \ --with-readline \ --with-recode \ --with-xmlrpc \ --with-xsl \ --with-pear \ --with-freetype-dir=/usr/include \ --with-mhash \ --with-mcrypt \ opcache, should it matter, is configured like this: zend_extension=/opt/php/extensions/opcache.so opcache.memory_consumption=512 opcache.interned_strings_buffer=64 opcache.max_wasted_percentage=50 opcache.max_accelerated_files=8000 opcache.fast_shutdown=1 opcache.revalidate_freq=0 opcache.save_comments=0 opcache.blacklist_filename=/opt/php/ini.d/opcache.blacklist opcache.log_verbosity_level=1 -- Edit bug report at https://bugs.php.net/bug.php?id=67889&edit=1 --

« previous php.bugs (#187242) next »