Crossed references lead to a io.vertx.core.VertxException: Thread blocked
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
Hướng nghiên cứu
Bắt đầu với JsonRef.parse, JsonRef.resolve và JsonRef.resolveUri, sau đó kiểm tra Utils$Pointers.escape và SchemaRepositoryImpl.resolve trong stack trace. Tái hiện các tham chiếu chéo đến A.yaml được mô tả trong issue và xác minh rằng việc tải contract hoàn tất mà không để quá trình phân giải đệ quy chặn worker thread.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- ...
- ...
- ...
- ...
Extra
- Anything that can be relevant such as OS version, JVM version
- Ngôn ngữ chính
- Java
- Star
- 15
- Fork
- 19
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của eclipse-vertx/vertx-openapi
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
eclipse-vertx/vertx-openapi#137 · 5 bình luận ·
-
Add OpenAPI 3.2 supportĐang mởenhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
eclipse-vertx/vertx-openapi#136 · 1 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
eclipse-vertx/vertx-openapi#122 · 4 bình luận ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 48/100
eclipse-vertx/vertx-openapi#117 · 6 bình luận ·
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
eclipse-vertx/vertx-openapi#93 · 1 bình luận ·
Tất cả issue của eclipse-vertx/vertx-openapi
Issue tương tự
-
agent:working follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Sanne/incus-spawn#1683 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
checkstyle/checkstyle#22210 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
521xueweihan/HelloGitHub#4105 ·
-
devops good first issue security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
asciidoctor/asciidoctorj#1339 ·