Page MenuHomePhabricator

Deadlocks purging conflicting expiring locks
Closed, ResolvedPublic

Description

A see this in the log more than I'd hope...probably due to the unique index using a prefix, which probably causes gap locks.

Query: DELETE FROM ipblocks WHERE ipb_address = '112.18.75.10' AND ipb_user = '0' AND (ipb_expiry < '20150417111317')
Function: Block::insert
Error: 1213 Deadlock found when trying to get lock; try restarting transaction (10.64.32.22)

#0 /srv/mediawiki/php-1.26wmf1/includes/db/Database.php(1205): DatabaseBase->reportQueryError()
#1 /srv/mediawiki/php-1.26wmf1/includes/db/Database.php(3102): DatabaseBase->query()
#2 /srv/mediawiki/php-1.26wmf1/includes/Block.php(466): DatabaseBase->delete()
#3 /srv/mediawiki/php-1.26wmf1/includes/specials/SpecialBlock.php(719): Block->insert()
#4 /srv/mediawiki/php-1.26wmf1/includes/api/ApiBlock.php(93): SpecialBlock::processForm()
#5 /srv/mediawiki/php-1.26wmf1/includes/api/ApiMain.php(1043): ApiBlock->execute()
#6 /srv/mediawiki/php-1.26wmf1/includes/api/ApiMain.php(394): ApiMain->executeAction()
#7 /srv/mediawiki/php-1.26wmf1/includes/api/ApiMain.php(367): ApiMain->executeActionWithErrorHandling()
#8 /srv/mediawiki/php-1.26wmf1/api.php(90): ApiMain->execute()
#9 /srv/mediawiki/w/api.php(3): include()
#10 {main}

Event Timeline

aaron raised the priority of this task from to Needs Triage.
aaron updated the task description. (Show Details)
aaron added a project: Sustainability.
aaron moved this task to Tag on the Sustainability board.
aaron subscribed.
aaron set Security to None.

Change 204867 had a related patch set uploaded (by Aaron Schulz):
Reduce change for deadlocks in Block::insert()

https://gerrit.wikimedia.org/r/204867

Change 204867 merged by jenkins-bot:
Reduce change for deadlocks in Block::insert()

https://gerrit.wikimedia.org/r/204867