Page MenuHomePhabricator

Include dbname in fatal logs
Closed, ResolvedPublic

Description

From bug 59805

[07-Jan-2014 23:31:08] Fatal error: Class 'SolrUpdateWork' not found at
/usr/local/apache/common-local/php-1.23wmf9/extensions/GeoData/solrupdate.php
on line 30
Server: terbium
URL: http://[unknown-host]
Backtrace:
#0
/usr/local/apache/common-local/php-1.23wmf9/extensions/GeoData/solrupdate.php(30):
SolrUpdate::execute()
#1
/usr/local/apache/common-local/php-1.23wmf9/maintenance/doMaintenance.php(113):
SolrUpdate->execute()
#2
/usr/local/apache/common-local/php-1.23wmf9/extensions/GeoData/solrupdate.php(243):
require_once('/usr/local/apac...')
#3 /usr/local/apache/common-local/multiversion/MWScript.php(97):
require_once('/usr/local/apac...')
#4 {main}

It's being run as a maintenance script in cron, but we've no idea what wiki it's being run on. The problem here is that the script is being run on a wiki that doesn't have GeoData installed on it

Database name: XXwiki

or similar...


Version: wmf-deployment
Severity: enhancement

Details

Reference
bz60324

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:54 AM
bzimport set Reference to bz60324.
bzimport added a subscriber: Unknown Object (MLST).

Seems accessing MediaWikis php globals is going to be somewhat of a pain to do...

https://stackoverflow.com/questions/1906565/php-extension-library-accessing-php-superglobals

Any bright ideas Tim?

I think this has been fixed for the WMF cluster by the migration to Monolog logging and HHVM's method of notifying the user space handler for fatal exceptions. For example:

fluorine:/a/mw-log
bd808$ head -30 fatal.log
2016-02-08 09:51:43 mw1159 commonswiki fatal ERROR: [12087c4f] PHP Fatal Error: request has exceeded memory limit {"exception_id":"12087c4f"}
[Exception ErrorException] (:0) PHP Fatal Error: request has exceeded memory limit
  #0 [internal function]: htmlspecialchars()
  #1 /srv/mediawiki/php-1.27.0-wmf.12/includes/media/MediaTransformOutput.php(448): array_map(string, array)
  #2 /srv/mediawiki/php-1.27.0-wmf.12/includes/media/SVG.php(283): MediaTransformError->__construct(string, integer, double, string)
  #3 /srv/mediawiki/php-1.27.0-wmf.12/includes/media/SVG.php(225): SvgHandler->rasterize(string, string, integer, double, string)
  #4 /srv/mediawiki/php-1.27.0-wmf.12/includes/filerepo/file/File.php(1141): SvgHandler->doTransform(OldLocalFile, string, string, array)
  #5 /srv/mediawiki/php-1.27.0-wmf.12/includes/filerepo/file/File.php(1104): File->generateAndSaveThumb(TempFSFile, array, integer)
  #6 /srv/mediawiki/php-1.27.0-wmf.12/thumb.php(426): File->transform(array, integer)
  #7 /srv/mediawiki/php-1.27.0-wmf.12/includes/poolcounter/PoolCounterWorkViaCallback.php(69): Closure$wfGenerateThumbnail#2()
  #8 /srv/mediawiki/php-1.27.0-wmf.12/includes/poolcounter/PoolCounterWork.php(123): PoolCounterWorkViaCallback->doWork()
  #9 /srv/mediawiki/php-1.27.0-wmf.12/thumb.php(440): PoolCounterWork->execute()
  #10 /srv/mediawiki/php-1.27.0-wmf.12/thumb.php(337): wfGenerateThumbnail(OldLocalFile, array, string, string)
  #11 /srv/mediawiki/php-1.27.0-wmf.12/thumb.php(75): wfStreamThumb(array)
  #12 /srv/mediawiki/php-1.27.0-wmf.12/thumb.php(34): wfThumbHandle404()
  #13 /srv/mediawiki/php-1.27.0-wmf.12/thumb_handler.php(29): include(string)
  #14 /srv/mediawiki/w/thumb_handler.php(3): include(string)
  #15 {main}

Monolog and HHVM take care of this for the WMF. Can be reopened if someone wants to work on adding support to rMWME php-wmerrors as per the original bug report.