Last modified: 2014-11-20 09:02:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53410, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51410 - MessageGroupStats::forItemInternal deadlocks
MessageGroupStats::forItemInternal deadlocks
Status: NEW
Product: MediaWiki extensions
Classification: Unclassified
Translate (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 56357 57374 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-15 23:12 UTC by Aaron Schulz
Modified: 2014-11-20 09:02 UTC (History)
13 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aaron Schulz 2013-07-15 23:12:22 UTC
Lots of these on wikidata:

mw1109  wikidatawiki    MessageGroupStats::forItemInternal      10.64.32.28     1213    Deadlock found when trying to get lock; try restarting transaction (10.64.32.28)        INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('page-Wikidata:Oversight','en','28','27','0','0')
Comment 1 Niklas Laxström 2013-07-16 06:28:06 UTC
Any suggestions how to fix? PoolCounter?
Comment 2 Erik Moeller 2013-09-09 18:57:40 UTC
There are also MessageGroupStats related locking issues on mediawiki.org, e.g.:

Mon Sep 9 18:24:16 UTC 2013     mw1194  mediawikiwiki   MessageGroupStats::clear        10.64.16.8      1205    Lock wait timeout exceeded; try restarting transaction (10.64.16.8)     DELETE FROM `translate_groupstats` WHERE tgs_group = 'page-Communication' AND tgs_lang = 'hu'

This may be a separate issue, but posting here for reference.
Comment 3 Sam Reed (reedy) 2013-11-21 22:09:53 UTC
*** Bug 57374 has been marked as a duplicate of this bug. ***
Comment 4 Niklas Laxström 2013-11-22 08:02:01 UTC
Why is this suddenly high priority?
Comment 5 Andre Klapper 2013-11-22 15:14:34 UTC
L10N Eng Dev team defines priorities themselves. Resetting.
Comment 6 Aaron Schulz 2014-02-26 06:47:29 UTC
Dozens of servers trying to insert the same row on metawiki today:

 INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('page-Terms of use/Paid contributions amendment','en','46','46','0','0')
Comment 7 Niklas Laxström 2014-02-26 07:57:03 UTC
(In reply to Niklas Laxström from comment #1)
> Any suggestions how to fix? PoolCounter?
Comment 8 Aaron Schulz 2014-06-06 22:10:26 UTC
Log snippet from today (truncated the middle since it was repetitive):

2014-06-06 20:22:22 mw1137 metawiki: Sub-optimal transaction on DB(s) 10.64.16.22 (metawiki) (000000003fecc80f00000000a293a52d):
0       30.377860       query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
1       30.378035       DatabaseBase::query-master
2       0.000352        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
3       0.000396        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
4       0.000485        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
5       0.000379        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
6       0.000360        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
7       0.000310        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
8       0.000388        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
9       0.000373        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
10      0.000331        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
11      0.000379        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
12      0.000384        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
13      0.000325        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
...<snip>...
392     0.000357        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
393     0.000383        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
394     0.000424        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
395     0.000362        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
396     0.000470        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
397     0.000418        query-m: INSERT IGNORE INTO `translate_groupstats` (tgs_group,tgs_lang,tgs_total,tgs_translated,tgs_fuzzy,tgs_proofread) VALUES ('X')
398     0.002223        query-m: COMMIT

Are there some mass-updates triggered by user actions that could possibly using a job queue or something?
Comment 9 Niklas Laxström 2014-06-11 14:52:44 UTC
Probably someone viewing Special:LanguageStats or Special:MessageGroupStats. There is during-request processing with couple of second timeout after which it will give "not available" for the rest for that request. The actual insertion to DB could be delayed if that helps.
Comment 10 Aaron Schulz 2014-06-11 17:19:41 UTC
It would probably help if the INSERT was:

a) As close to the COMMIT as possible (without much else interlaced)
b) Batched as one INSERT, or at least have the inserts in lexicographical order of (tgs_group, tgs_lang)
Comment 11 Tomasz W. Kozlowski 2014-06-14 18:27:47 UTC
Just got that on Meta while trying to view [[m:Tech/News/2014/25]].
Comment 12 Gerrit Notification Bot 2014-07-22 19:43:44 UTC
Change 148444 had a related patch set uploaded by Aaron Schulz:
Use GET_LOCK to try to reduce INSERT deadlocks

https://gerrit.wikimedia.org/r/148444
Comment 13 Gerrit Notification Bot 2014-07-22 20:01:46 UTC
Change 148444 had a related patch set uploaded by Nikerabbit:
Use GET_LOCK to try to reduce INSERT deadlocks

https://gerrit.wikimedia.org/r/148444
Comment 14 Gerrit Notification Bot 2014-07-23 18:15:53 UTC
Change 148444 merged by jenkins-bot:
Use GET_LOCK to try to reduce translate_groupstats deadlocks

https://gerrit.wikimedia.org/r/148444
Comment 15 Niklas Laxström 2014-09-02 08:29:52 UTC
*** Bug 56357 has been marked as a duplicate of this bug. ***
Comment 16 Andre Klapper 2014-11-12 15:18:19 UTC
All patches mentioned in this report were merged - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links