Page MenuHomePhabricator

ErrorException with "PHP Notice: JobQueueGroup::__destruct: 1 buffered job ... HTMLCacheUpdateJob never inserted"
Closed, DuplicatePublic

Description

MediaWiki 1.29.0-alpha (54381ead)
PHP	5.6.8 (apache2handler)
MySQL	5.6.24
ICU	54.1

Issue

[error] [11f4441e5372dd70d3d37066] [no req]   ErrorException from line 449 of ...\mw-master\includes\jobqueue\JobQueueGroup.php: PHP Notice: JobQueueGroup::__destruct: 1 buffered job(s) of type(s) HTMLCacheUpdateJob never inserted.
#0 [internal function]: MWExceptionHandler::handleError(integer, string, string, integer, array)
#1 ...\mw-master\includes\jobqueue\JobQueueGroup.php(449): trigger_error(string)
#2 [internal function]: JobQueueGroup->__destruct()
#3 {main}

Additional info from Thread in Project:Support desk:

I've been digging into this more. I don't know if it's actually Semantic causing it. I can get the error to happen fairly consistently if I edit a page. Sometimes it triggers immediately. Sometimes I need to go to a different page. Sometimes I need to go to a different page and then come back.

I threw a bunch of debugging messages into JobQueueGroup.php and got some interesting results. As far as I understand it, this is what's happening:

  • MediaWiki::restInPeace() calls JobQueueGroup::pushLazyJobs().
  • JobQueueGroup::pushLazyJobs() (a static function) is supposed to take all the lazy jobs in any JobQueueGroup instance's lazy job buffer and push them to the job queue. In this case, it finds that there are no existing instances of JobQueueGroup, and returns without doing anything.
  • MediaWiki::restInPeace(), now confident that any buffered lazy jobs are in the job queue, calls MediaWiki::triggerJobs() to handle any jobs in the queue.
  • Via a long chain of calls, MediaWiki:triggerJobs() ends up putting a HTMLCacheUpdateJob in the lazy job buffer. Since there's no existing JobQueueGroup singleton, one is created.
  • MediaWiki::restInPeace() has no idea that a new lazy job could have been buffered at this point. It cleans up and returns.
  • The singleton instance of JobQueueGroup is destroyed.
  • Because there's a job sitting in the JobQueueGroup's lazy buffer, the JobQueueGroup throws the error message and the job is lost.

SWM 2.5.1 and later disables HTMLCacheUpdate completely so this error shouldn't be popping up anymore but the issue should be investigated

Event Timeline

mwjames created this task.Jan 2 2017, 3:03 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 2 2017, 3:03 PM
Kghbln added a subscriber: Kghbln.Apr 15 2017, 8:05 PM
Kghbln added a comment.EditedApr 15 2017, 8:08 PM

Also reported here for MW 1.27.1 with PHP 5.6.30 and MySQL 5.6.35.

LIMAFOX76 added a subscriber: LIMAFOX76.EditedApr 16 2017, 6:43 PM

I had this issue with SMW 2.5.0 and MediaWiki 1.27.2 but when I came back to 1.27.1 (and SMW 2.5.0), this issue disappeared.

PHP version: 5.6.30-0+deb8u1 (apache2handler)
MySQL version: 5.5.54-0+deb8u1
ICU: 52.1

So we now have issues reported for MW 1.27.1, 1.27.2 and 1.29-alpha. Looks like a sequence that suggests further investigation. I'll keep my fingers crossed for a fix.