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

All thread was blocked #634

Closed
RockyLOMO opened this issue Dec 18, 2021 · 3 comments
Closed

All thread was blocked #634

RockyLOMO opened this issue Dec 18, 2021 · 3 comments

Comments

@RockyLOMO
Copy link

RockyLOMO commented Dec 18, 2021

os: ubuntu-18.04.6-live-server-amd64 2core 4G
jdk: 11.0.11+9-Ubuntu-0ubuntu2.18.04
caffeine version: 2.9.3
return Caffeine.newBuilder() .scheduler(Scheduler.forScheduledExecutorService(Tasks.scheduler()));
server qps: 5500+

5 client threads access cache that everything is ok, but when 10 client threads access cache that everything seems frozen.

block

Plz help, thx.

@RockyLOMO RockyLOMO changed the title All thread is blocking All calling thread was blocked Dec 18, 2021
@RockyLOMO RockyLOMO changed the title All calling thread was blocked All thread was blocked Dec 18, 2021
@ben-manes
Copy link
Owner

If you captured a thread dump (jstack) then we might be able to find the cause. We would need to know which thread holds the lock and why. You can email that privately.

The usual suspects are,

  • A custom eviction listener / cache writer performs some work on eviction and is stuck
  • A load / compute is stuck, causing the eviction to block on the same hash table lock
  • A Linux futex bug where the signal to unlock was lost, leaving the Java lock in a bad state

I am not aware of any library bug at this time, so my initial guess leans towards application or Linux issues as we've encountered them as the causes in the past. But we need more details to determine the root cause regardless.

@ben-manes
Copy link
Owner

Another case is recursion causing a stack overflow that failed to release the lock. See #203 (comment). JEP-270 tried to handle this but it may not be full proof.

@ben-manes
Copy link
Owner

Closing due to lack of response. Please reopen if I can be of help.

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

2 participants