-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kv: apparent deadlock waiting for pushes #59377
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Hi @nick-jones, thanks for the report. Do you have any open transactions that have written to this table and are now just blocking in the client? What we see is that all waiting transactions are waiting on a writing transaction with the ID |
It may help to look in the |
@nvanbenschoten thanks for the reply. Unfortunately we've restarted the nodes in the cluster as of ~30 minutes ago, as the issue was getting in the way of some of our devs. Next time it occurrs, I'll share further details from the Sessions page. In case it's of similar or equal value, I do still have the output of The log entires looked like this for the first instance:
Queries: https://gist.github.com/nick-jones/2edbd67a95f30e7dc778eaf5dfbeec2b (note that I've onfuscated some column names, I'm happy to email the original output if requested) |
It's probably worth also grabbing the set of open transactions. You can grab that with |
@nvanbenschoten @ajwerner it started to happen again, so as requested: logs from
open transactions:
queries:
sessions view: https://user-images.githubusercontent.com/350792/105737300-b16fe700-5f2d-11eb-8982-7eeb8cfff62d.png (let me know if you want a screengrab of something more specific here) |
Thanks @nick-jones. We see the open transaction with ID A |
Thanks! So it looks like we might have an application that is holding a transaction open, having issued statements. We know which one it likely is, we're just looking to confirm (once we have, I'll close the issue). Is what we've observed here "expected behaviour" if this sort of thing happens? |
Yes, writing transactions put down exclusive locks on the values they write. Concurrent transactions will block on those locks. The tool that users have at their disposal is the idea of See https://www.cockroachlabs.com/docs/v20.2/transactions#transaction-priorities |
Thanks 👍 We haven't quite got to the bottom of what is happening our side, though we're fairly sure it is due to one of our applications holding a transaction open. So with that in mind, I'm going to close the issue. Apologies for the fact this was a non-issue in the end, and many thanks for the help! |
Describe the problem
We have a recurring issue where simple queries to a particular table start to hang, and never complete.
SELECT COUNT(*) FROM table
When this starts to occur, one of the crdb nodes starts to log the following:
This continues until we start nodes in the cluster.
To Reproduce
Unfortunately we haven't pinpointed what might be triggering this. Typically it takes a few hours to upwards of a couple of days for the issue to reoccur. It's possible that some external factor is triggering the issue (i.e. it's not just randomly happening after a period of time), we're looking into what that might be.
Expected behavior
Queries should complete.
Additional data / screenshots
Stack traces:
When the above traces were captured, the
pusher ‹*›: have been waiting 60.00s for pushee ‹*›
log entries were occurring on cockroachdb-1.The cluster is reporting healthy when the issue occurs, as far as we can tell: https://user-images.githubusercontent.com/350792/105723011-318e5080-5f1e-11eb-9a03-b7ea60a314c8.png
Environment:
cockroach sql
,pgx
golang driver3 node cluster with the following members by hostname:
Additional context
I described the issue on Slack, and was asked to open an issue here. There is a thread of discussion under https://cockroachdb.slack.com/archives/CP4D9LD5F/p1611572137084100
PRIORITY HIGH
is not used for any transactionsThe text was updated successfully, but these errors were encountered: