Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Crossed references lead to a io.vertx.core.VertxException: Thread blocked

Aperta
#75 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
java

Direzione di ricerca

Inizia con JsonRef.parse, JsonRef.resolve e JsonRef.resolveUri, quindi esamina Utils$Pointers.escape e SchemaRepositoryImpl.resolve nello stack trace. Riproduci i riferimenti incrociati ad A.yaml descritti nell’issue e verifica che il caricamento del contratto venga completato senza che la risoluzione ricorsiva blocchi il thread di lavoro.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Questions

Do not use this issue tracker to ask questions, instead use one of these channels. Questions will likely be closed without notice.

Version

4.5.8

Context

As described in #74 we work with more than one hundred of OpenAPI files. Most of them use relative references to components in other OpenAPI files. They are provided by a third party.

With the aim of going further, we have updated the relative references by fake absolute references in a given OpenAPI file (A).
It lead us to update some other OpenAPI files and one of them contained a reference to the first one OpenAPI file A.

The OpenAPIContract.from call looks like that (A is in the same time as unresolvedContractPath and in additionalContractFiles):

OpenAPIContract.from(
                vertx
                , "A.yaml"
                , Map.of(
                        "https://www.example.com/B.yaml", "B.yaml"
                        , "https://www.example.com/C.yaml", "C.yaml"
                        , "https://www.example.com/D.yaml", "D.yaml"
                        , "https://www.example.com/A.yaml", "A.yaml"
                    )
            ).onSuccess(contract -> {
                contract.operations().forEach(op -> LOGGER.info("operationId=", op.getOperationId()));
                LOGGER.info("end of onSuccess");
            }).onFailure(t -> LOGGER.error("onFailure t=", t));

When running the app, the following option is thrown:

2024-06-10 16:26:42,116 WARN [vertx-blocked-thread-checker] ?: Thread Thread[vert.x-worker-thread-3,5,io.vertx.core.Launcher] has been blocked for 60885 ms, time limit is 60000 ms
io.vertx.core.VertxException: Thread blocked
at [email protected]/java.util.regex.Pattern$Start.match(Pattern.java:3608)
at [email protected]/java.util.regex.Matcher.search(Matcher.java:1728)
at [email protected]/java.util.regex.Matcher.find(Matcher.java:745)
at [email protected]/java.util.regex.Matcher.replaceAll(Matcher.java:1177)
at [email protected]/java.lang.String.replaceAll(String.java:2942)
at io.vertx.json.schema.impl.Utils$Pointers.escape(Utils.java:303)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.parse(JsonRef.java:275)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:133)
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
...
...
...
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.JsonRef.resolveUri(JsonRef.java:341)
at io.vertx.json.schema.impl.JsonRef.resolve(JsonRef.java:211)
at io.vertx.json.schema.impl.SchemaRepositoryImpl.resolve(SchemaRepositoryImpl.java:243)
at io.vertx.openapi.contract.OpenAPIVersion.lambda$resolve$3(OpenAPIVersion.java:86)
at io.vertx.openapi.contract.OpenAPIVersion$$Lambda$499/0x00000008010f9708.handle(Unknown Source)
at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:191)
at io.vertx.core.impl.ContextImpl$$Lambda$471/0x000000080109fd08.handle(Unknown Source)
at io.vertx.core.impl.ContextInternal.dispatch(ContextInternal.java:279)
at io.vertx.core.impl.ContextImpl.lambda$internalExecuteBlocking$2(ContextImpl.java:210)
at io.vertx.core.impl.ContextImpl$$Lambda$472/0x00000008010a41f8.run(Unknown Source)
at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
at io.vertx.core.impl.TaskQueue$$Lambda$455/0x0000000801092a80.run(Unknown Source)
at [email protected]/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at [email protected]/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at [email protected]/java.lang.Thread.run(Thread.java:833)

Do you have a reproducer?

A reproducer is a simple project hosted on GitHub (or another forge supporting git clone operation) that has a build file that can be executed to reproduce the issue.

Reproducers are very helpful for contributors and will likely help them fixing your bug faster.

  • Link to github project/gist
Steps to reproduce
  1. ...
  2. ...
  3. ...
  4. ...
Extra
  • Anything that can be relevant such as OS version, JVM version
Lingua principale
Java
Stelle
15
Fork
19
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-vertx/vertx-openapi

Tutte le issue di eclipse-vertx/vertx-openapi

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.