Skip to content
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

TaskQueueAsync lock loss #10

Open
bkuhhirte opened this issue Mar 31, 2023 · 0 comments
Open

TaskQueueAsync lock loss #10

bkuhhirte opened this issue Mar 31, 2023 · 0 comments

Comments

@bkuhhirte
Copy link

Recently we had a problem with a 3 node Cassandra cluster running 3.11.4 where multiple threads were attempting to lock the ReentrantReadWriteLock in TaskQueueAsync (via the submitAsynchronous() method). In looking at the output from jstack, there were 63 threads attempting to acquire the lock, but no thread held it. Similarly, the lucene-indexer-1 threads (which serve as the executors behind the lock) in the same stack were all idle.

Looking at the code in question (which seems unchanged since 2016), it shouldn't be possible for it to fail to unlock unless the thread holding the lock was interrupted. I also suspect that the original author was a bit overzealous as nothing on the inside of the submitAsynchronous method isn't thread safe (except the passed variable "id"). Is there some reason that I am not seeing where we need to be so protective of the contents? Maybe just not try and lock at all in that function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant