-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Virtual thread pinning on MainEventProcessor.ensureHostnameCache #3312
Comments
Hey @pavelbelonosov thanks for opening this issue. Sounds like a straight forward replacement. Maybe we can fit this into the next major which we're starting to work on - no promises though. We're currently changing a lot of things on the SDK internally, so we can't do it right away or we'd have lots of merge conflicts. ReentrantLock seems to be available for old versions of Android as well. This class in pgjdbc seems like an interesting approach. |
Hello, for any future devs looking at hotfix, we run into similar problem (Spring Boot 3.2.2 / Java 21 / Sentry 7.14.0) While having virtual threads on, the application would just randomly "stuck", not respond to API calls and also not responding to k8s This behavior was happening completely random, under 0 load on multiple test environents. Only I tracked this to mentioned function The temporary solution for us is to set in I would thus like to ask very kindly, if it would be possible to merge solution, that would not pin virtual threads. |
Thanks @tkrason we'll bump prio on this and try to inclue it in the 8.0 release. |
Hey @pavelbelonosov and @tkrason we've just released |
Problem Statement
We use Java 21 and Spring Boot 3.2.4 with enabled virtual threads in plain web application. First request after app init leads to thread pinning:
io.sentry.MainEventProcessor.ensureHostnameCache(MainEventProcessor.java:192) <== monitors:1
. Subsequent requests are fine.This behavior is observed in Sentry 7.6.0 and 6.26.0
Solution Brainstorm
Would be nice if Sentry became Loom-friendly and replace synchronized methods to ReentrantLock for virtual thread support.
From this
To this:
The text was updated successfully, but these errors were encountered: