Page MenuHomePhabricator

deadlock error on edit save
Closed, DeclinedPublic

Description

Author: dkesh

Description:
I was editing List of US Supreme Court Cases on en when I got this error:

A database query syntax error has occurred. This may indicate a bug in the
software. The last attempted database query was:

SELECT cur_id,cur_namespace,cur_title FROM `cur`,`links` WHERE cur_id=l_to

AND l_from=102337 FOR UPDATE

from within function "LinkCache::preFill". MySQL returned error "1213: Deadlock
found when trying to get lock; Try restarting transaction (10.0.0.1)".


Version: unspecified
Severity: major

Details

Reference
bz1274
TitleReferenceAuthorSource BranchDest Branch
gitlab: Rely on gitlab-runner concurrency for scalingrepos/releng/gitlab-cloud-runner!197dduvallreview/simplify-gitlab-runner-scalingmain
gitlab-runner: Fix poll_timeout configurationrepos/releng/gitlab-cloud-runner!149dduvallreview/fix-poll-timeoutmain
Specify --wait-for-ready global buildctl flagrepos/releng/kokkuri!58dduvallreview/wait-for-ready-part-deuxmain
Update image with a buildctl version that supports --wait-for-readyrepos/releng/kokkuri!57dduvallreview/update-imagemain
buildkitd: Enable CNI for network namespace isolationrepos/releng/gitlab-cloud-runner!128dduvallreview/use-cni-for-network-isolationmain
Specify --wait-for-ready global buildctl flagrepos/releng/kokkuri!55dduvallreview/wait-for-readymain
buildkitd: Adjust resource requests/limits and scaling behaviorrepos/releng/gitlab-cloud-runner!122dduvallreview/adjust-buildkitd-hpa-and-resourcesmain
buildkitd: Fix HPA label selectors by splitting envoy cluster_namerepos/releng/gitlab-cloud-runner!121dduvallreview/fix-buildkit-hpamain
Revert "helm: Change port name to grpc for compat with Istio"repos/releng/buildkit!18dduvallreview/app-protocolwmf/v0.10
buildkitd: Scale based on active incoming TCP connectionsrepos/releng/gitlab-cloud-runner!120dduvallreview/buildkitd-connection-saturation-metricmain
buildkitd: Disable autoscaling until we have a reliable metricrepos/releng/gitlab-cloud-runner!119dduvallreview/disable-buildkitd-autoscalingmain
istio: Install stats monitor and DestinationRule for buildkitdrepos/releng/gitlab-cloud-runner!117dduvallreview/foo-27630main
helm: Change port name to grpc for compat with Istiorepos/releng/buildkit!16dduvallreview/use-grpc-port-namewmf/v0.10
buildkitd: Enable metrics for Istio/Envoy circuit breakersrepos/releng/gitlab-cloud-runner!115dduvallreview/fix-create-load-jobmain
istio: Enable sidecar injection in the gitlab-runner namespacerepos/releng/gitlab-cloud-runner!114dduvallreview/use-istio-sidecar-injectionmain
istio: Install istio service meshrepos/releng/gitlab-cloud-runner!111dduvallreview/istio-service-meshmain
Show related patches Customize query in GitLab

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 8:09 PM
bzimport set Reference to bz1274.
bzimport added a subscriber: Unknown Object (MLST).
  • Bug 1296 has been marked as a duplicate of this bug. ***

This can be fixed at any time by setting $wgDumbLinkUpdates = true. This
elimates any chance of a deadlock on the heavily-updated link table.
Unfortunately (according to JamesDay) that causes the slaves to choke and die. A
strategy of reducing lock time may be a better approach, and a few such tweaks
have been made. Deadlocks should be much less frequent than they once were.

As far as I'm concerned, a friendlier error message allowing the user to
resubmit their edit easily would close this bug.

Couldn't we restart the transaction automatically in this case, by at some level re-callling a function?

  • Bug 5824 has been marked as a duplicate of this bug. ***
  • Bug 5166 has been marked as a duplicate of this bug. ***
  • Bug 5876 has been marked as a duplicate of this bug. ***

a.steffan wrote:

The same error appeared on your mediawiki today.
Mediawiki 1.11.0
Mysql 5.0.22
PHP 5.1.2 (cgi-fcgi)

The error message:

In the function "MediaWikiBagOStuff::_doinsert"
MySQL returned the error "1213: Deadlock found when trying to get lock; try restarting transaction (localhost)"

I got this error today on 1.13.0 on Windows 2003 Server when trying to view a page, not edit it. --~~~~

(In reply to comment #9)

I got this error today on 1.13.0 on Windows 2003 Server when trying to view a
page, not edit it. --~~~~

These tables don't exist anymore, like the query

Closing as WORKSFORME. As Aaron said, 'cur' doesn't exist anymore. Nor does this query, or even the method LinkCache::preFill. Any deadlock errors on save would be unrelated to this.

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:14 AM
epriestley changed the task status from Declined to Resolved by committing Unknown Object (Diffusion Commit).Mar 4 2015, 8:24 AM
epriestley added a commit: Unknown Object (Diffusion Commit).
demon changed the task status from Resolved to Declined.Mar 4 2015, 8:39 AM
demon claimed this task.