add debugLocks around database operations

to track down a blocked indefinitely on MVar that seems to occur after
sqlite throws ErrorBusy but that I have not been able to reproduce when
I made commits synthetically throw ErrorBusy.

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-06-03 14:10:24 -04:00
parent d6dfaa8d0f
commit 09edb07ac5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 32 additions and 15 deletions

View file

@ -0,0 +1,14 @@
[[!comment format=mdwn
username="joey"
subject="""comment 13"""
date="2022-06-03T17:52:12Z"
content="""
To hopefully find out what MVar operation is blocking, I have added lock
debugging instrumentation to all database calls. This will need a special
build of git-annex with the DebugLocks build flag enabled.
I have made a standalone tarball built that way available here:
<https://downloads.kitenet.net/git-annex/linux/debuglocks/>
It should display a backtrace on stderr when the MVar deadlock happens.
"""]]