Update to quarkus version 3.2.0.CR1 breaks native image trace agent #247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reproduce native image agent trace corrupt json
After running
mvn verify --activate-profiles native-image-agent-tracelocally or in the pipeline as configured in pom.xml, the generated JSON is corrupt (not closed correctly) and the very last lines look e.g. like this:{"caller_class":"java.lang.invoke.InnerClassLambdaMetafactory$1", "args":[], "function":"getDeclaredConstructors", "tracer":"reflect", "class":"io.smallrye.openapi.api.OpenApiConfig$$Lambda$1757/0x00000008014abf70"}, {"caller_class":"java.lang.invoke.InnerClassLambdaMetafactory", "result":"true", "args":[[]], "declaring_class":"io.smallrye.openapi.api.OpenApiConfig$$Lambda$1757/0x00000008014abf70", "function":"invokeConstructor", "tracer":"reflect", "class":"io.smallrye.openapi.api.OpenApiConfig$$Lambda$1757/0x00000008014abf70"}, {"caller_class":"java.lang.invoke.InnerClassLambdaMetafactory$1", "args":[], "function":"getDeclaredConstructors", "tracer":"reflect", "class":"io.smallrye.openapi.api.OpenApiConfig$$Lambda$1758/0x00000008014ac190"}, {"caller_class":"java.lang.invoke.InnerClassLambdaMetafactory", "result":"true", "args":[[]], "declaring_class":"io.smallrye.openapi.api.OpenApiConfig$$Lambda$1758/0x00000008014ac190", "function":"invokeConstructor", "tracer":"reflect", "class":"io.smallrye.openapi.api.OpenApiConfig$$LTrying to process the corrupt JSON file locally with
$GRAALVM_HOME/bin/native-image-configure generate --trace-input=target/native-image-agent-trace.jsonor in the pipeline leads to an error like this:I suspect that the JVM for testing is shutdown without waiting for files to be flushed or something like that. But that's just an idea. Don't know if this could be....
Everything is working fine with quarkus 3.1.3.Final. The change seems to had been introduced with 3.2.0.CR1:
quarkusio/quarkus@3.1.3.Final...3.2.0.CR1
References