rebuildData.php freezes at certain page IDs

From semantic-mediawiki.org

I'm having an issue with a query which generates Unexpected non-MediaWiki exception encountered, of type "RuntimeException" error with a simple semantic search based on a category. I'm trying to refresh the semanic data, but when I run rebuildData.php -v the script first froze at ID 11. I restarted the script at ID 11 and it froze again. I edited the page to remove the semantic content (it was present for testing only) and the script continued and then froze at ID 24, which does not contain any semantic data. Again, the script froze when restarted at ID 24. I executed rebuildData.php -v -f which deleted and recreated the tables fine, but froze again at ID 24 during the data refresh. I cannot figure out what is causing the script to freeze.

Configuration:

  • MediaWiki 1.23.7 (8136f24)
  • PHP 5.4.20 (cgi-fcgi)
  • MySQL 5.6.14
  • Semantic MediaWiki 2.0
16:37, 5 January 2015

Sorry but above information are not sufficient to make any proposal on how to solve the issue. It would be best if you can provide a stack trace and/or the query that is involved on the mentioned page.

Furthermore, you should list all SMW related extensions being used that may or may not cause the described issue.

If you have a stack trace then it is recommended to post the information on the issue tracker.

18:12, 5 January 2015

Thanks - I was also having problems with the MediaWiki runjobs.php hanging on execution - Support thread. I thought the two issues may be related - and it turns out they were.

  • Disabling caching (CACHE_NONE) allowed both maintenance scripts to run to completion.
14:47, 21 January 2015

For the sake of completion, above run-time error was referring to the Jobclass (copied from the thread).

0.0312   1.5M  Start command line script runjobs.php
0.0468   1.8M  [caches] main: WinCacheBagOStuff, message: WinCacheBagOStuff, parser: WinCacheBagOStuff
0.0624   3.0M  [caches] LocalisationCache: using store LCStoreCDB
0.0780   4.0M  Fully initialised
0.1092   5.0M  Connected to database 0 at 127.0.0.1
0.1092   5.0M  Query mwdev (1) (slave): SELECT /* JobQueueDB::doGetSiblingQueuesWithJobs  */  DISTINCT job_cmd  FROM `job`   WHERE job_cmd IN ('refreshLinks','refreshLinks2','htmlCacheUpdate','sendMail','enotifNotify','fixDoubleRedirect','uploadFromUrl','AssembleUploadChunks','PublishStashedFile','null')   
0.1092   5.0M  LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
0.1092   5.0M  Query mwdev (2) (slave): SELECT /* JobQueueDB::claimRandom  */  job_id,job_cmd,job_namespace,job_title,job_timestamp,job_params,job_random,job_attempts,job_token,job_token_timestamp,job_sha1  FROM `job`   WHERE job_cmd = 'refreshLinks' AND job_token = ''  LIMIT 88,1  
0.1092   5.0M  Query mwdev (3) (slave): SELECT /* JobQueueDB::claimRandom  */  job_id,job_cmd,job_namespace,job_title,job_timestamp,job_params,job_random,job_attempts,job_token,job_token_timestamp,job_sha1  FROM `job`   WHERE job_cmd = 'refreshLinks' AND job_token = '' AND (job_random >= '18174153')  ORDER BY job_random ASC LIMIT 1  
0.1092   5.0M  DatabaseBase::query: Writes done: UPDATE `job` SET job_token = 'X'
0.1092   5.0M  Query mwdev (4) (slave): UPDATE /* JobQueueDB::claimRandom  */  `job` SET job_token = '2d61852a9a7731265203632d5f49e0f1',job_token_timestamp = '20150108174628',job_attempts = job_attempts+1 WHERE job_cmd = 'refreshLinks' AND job_id = '235' AND job_token = ''
0.1716   5.0M  LoadBalancer::reuseConnection: this connection was not opened as a foreign connection
14:57, 21 January 2015
 

I'm not sure what the CACHE_NONE has to do with rebuildData but maybe we try to add a --no-cache option [0].

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/749

15:06, 21 January 2015