Page MenuHomePhabricator

"Lock wait timeout exceeded" / "Deadlock found when trying to get lock" in "INSERT INTO `discussiontools_items` / `discussiontools_item_ids`"
Open, Needs TriagePublic

Description

(The latest deployment of DiscussionTools permalinks backend to group1 wikis T315353#8392662 has resulted in some new errors, although a lot less numerous this time. It really is a gift that keeps on giving.)

There are a few occurrences of: [optimistically assuming that they share a root cause]

  • "Lock wait timeout exceeded; try restarting transaction"
  • "Deadlock found when trying to get lock; try restarting transaction"

…usually followed by:

  • "Cannot execute query from MediaWiki\Extension\DiscussionTools\Hooks\DataUpdatesHooks::onRevisionDataUpdates while transaction status is ERROR"

All of them are for queries like "INSERT INTO discussiontools_items / discussiontools_item_ids" from MediaWiki\Extension\DiscussionTools\ThreadItemStore::insertThreadItems.

Logstash links:

The error rate is relatively unalarming, but I'd like to learn why this is happening and what we can do about it.

Event Timeline

Details of the deadlock, fresh from the master {P39615}

This one looks like a classic gap locking issue. I will check it out later.

ppelberg added a project: Editing-team.
ppelberg moved this task from Untriaged to Upcoming on the Editing-team board.

Still occurring at low rate. I updated the Logstash links since the previous search got polluted by similar errors occurring in other extensions.