Comments (14)
Hm, I thought that java.util.concurrent.locks.ReentrantLock
is the recommended way to replace the synchronized
blocks in order to avoid pinning 🤔.
CC @mariofusco @cescoffier @xstefank
from quarkus.
I investigated a little bit more this problem and, as correctly reported by @franz1981, I believe it is caused by this synchronization https://github.com/smallrye/smallrye-fault-tolerance/blame/63dce3532edbaa7c2b666671a5e7a1e0700d6521/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/LazyFaultTolerance.java#L41
In general I don't like that double check lazy initialization pattern, but I understand that sometimes it is necessary. I will try to replace it with an
AtomicReference
, but if you have any better suggestion please let me know. /cc @Ladicek @FroMage
Thanks for your investigation Mario!
from quarkus.
See smallrye/smallrye-fault-tolerance#1035
from quarkus.
/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc)
from quarkus.
I believe so as well. I do not know if there is synchronized
or a wait
hidden in the stack. would we see it in this stacktrace?
I suppose so according to PinnedThreadPrinter.printStackTrace()
:
private static void printStackTrace(List<LiveStackFrame> stack,
PrintStream out,
boolean printAll) {
out.println(Thread.currentThread());
for (LiveStackFrame frame : stack) {
var ste = frame.toStackTraceElement();
int monitorCount = frame.getMonitors().length;
if (monitorCount > 0) {
out.format(" %s <== monitors:%d%n", ste, monitorCount);
} else if (frame.isNativeMethod() || printAll) {
out.format(" %s%n", ste);
}
}
}
from quarkus.
Most likely there is. ReentrantLock is working.
from quarkus.
Most likely there is.
do you know how to chase it?
from quarkus.
@vsevel I don't think there is a general way how to chase it. Can you provide me with a reproducer? Just to be sure there are no monitors in your business code? I can't reproduce it.
from quarkus.
@vsevel I could also give a look at this, but I agree with @xstefank on the fact that we need a reproducer.
from quarkus.
it is unlikely that I will be able to give a reproducer. I am totally fine if at some point we close it with "cannot reproduce". I still wanted to create the issue so that we have a place to provide as much context as possible, and that is something that can be searched by others that experience the same issue.
from quarkus.
a bit more information. I looked at the app that was experiencing that particular issue, with that exact stacktrace.
it all happened on the same day. and in 2 occasions I looked at the error occurred just after startup.
and what is particularly disturbing is that in these 2 cases, the application experienced multiple exceptions and timeouts, and eventually killed shortly after because of the SmallRye Reactive Messaging - liveness check
being down. one time it was because of org.jboss.resteasy.reactive.ClientWebApplicationException: Received: ', status code 401' when invoking ...
, and the other time it was {"name":"SmallRye Reactive Messaging - liveness check","status":"DOWN","data":{"x":"[OK]","x":"[KO] - Multiple exceptions caught:\n\t[Exception 0] org.jboss.resteasy.reactive.ClientWebApplicationException: Received: 'Bad Gateway, status code 502' when invoking:
.
I do not know what is causing the other.
from quarkus.
I see io.smallrye.faulttolerance.core.apiimpl.LazyFaultTolerance.call(LazyFaultTolerance.java:28) <== monitors:1
Which have a monitor there?
from quarkus.
I investigated a little bit more this problem and, as correctly reported by @franz1981, I believe it is caused by this synchronization https://github.com/smallrye/smallrye-fault-tolerance/blame/63dce3532edbaa7c2b666671a5e7a1e0700d6521/implementation/core/src/main/java/io/smallrye/faulttolerance/core/apiimpl/LazyFaultTolerance.java#L41
In general I don't like that double check lazy initialization pattern, but I understand that sometimes it is necessary. I will try to replace it with an AtomicReference
, but if you have any better suggestion please let me know. /cc @Ladicek @FroMage
from quarkus.
This issue should have been fixed with the merging of this pull request smallrye/smallrye-fault-tolerance#1035
from quarkus.
Related Issues (20)
- state which category to enable debugging for
- Keycloak admin client - error response body is unreachable HOT 3
- OTEL + `quarkus.http.test-timeout` -> NullPointerException: Cannot invoke "io.vertx.core.spi.observability.HttpResponse.headers()" because "httpResponse" is null HOT 2
- `application-test.properties` leaks into downstream module tests even though only `application.properties` is included in the test-jar HOT 1
- Error connecting Cloud Run to Cloud SQL. HOT 1
- [Feature Request] Infinispan as Hibernate second-level cache provider HOT 1
- SRMSG18245: There are still 140 unprocessed messages after the closing timeout HOT 1
- Custom Smallrye ConfigSourceInterceptor not loading class using Gradle
- Quarkus Update - missing recipe for keycloak config changes HOT 3
- StringIndexOutOfBoundsException on OAuth2AuthMechanism HOT 3
- Swagger UI Config for Implicit Auth Broken in Native Build HOT 1
- Migrating from 3.2 to 3.8 fails if using Jackson ObjectMapper customization for Map serialization HOT 13
- Add configuration to opt-out generation of Openshift's Buliding and RBAC objects on the openshift.yaml HOT 1
- `SecurityIdentityAugmentor` are called multiple times with multiple identityProviders HOT 9
- Convinient way to access build metadata at runtime HOT 10
- @TestSecurity with @PermissionsAllowed annotated endpoint
- MQTT reactive stream transformer fails to process events due to lack of requests HOT 1
- NPE in QuarkusTestExtension.runExtensionMethod following CL issue
- Quarkus REST: AsyncInvoker doesn't fire callbacks
- MQTT dev services always start if another reactive messaging connector is present HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.