Skip to content
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

2.13.x: Upgrade RESTEasy to 4.7.9.Final #30984

Merged
merged 2 commits into from
May 15, 2023

Conversation

jmartisk
Copy link
Contributor

@jmartisk jmartisk commented Feb 8, 2023

Upgrade to include the latest fixes in RESTEasy

@quarkus-bot quarkus-bot bot added the area/dependencies Pull requests that update a dependency file label Feb 8, 2023
@gsmet gsmet requested a review from rsvoboda February 8, 2023 08:47
@rsvoboda
Copy link
Member

rsvoboda commented Feb 8, 2023

@jmartisk pls add description with some context for the upgrade

@rsvoboda
Copy link
Member

rsvoboda commented Feb 8, 2023

@rsvoboda
Copy link
Member

rsvoboda commented Feb 8, 2023

I have checked the commits from the above linked comparison and nothing catches my eye.

Checked JIRAs for the release too - https://issues.redhat.com/issues/?jql=project%20%3D%20RESTEASY%20AND%20fixVersion%20%3D%204.7.8.Final%20ORDER%20BY%20issuetype%20DESC
Spring bump doesn't imply anything on Quarkus side as we do not use that integration.

@sberyozkin
Copy link
Member

sberyozkin commented Feb 8, 2023

resteasy/resteasy@6f9a198 is of interest (unless Jan has other changes in mind) but mime4j is now managed also at the bom level.
Guillaume if you prefer I can remove mime4j from the bom after this PR goes in, though it seems better to keep it managed

@rsvoboda
Copy link
Member

rsvoboda commented Feb 8, 2023

2023-02-08T13:07:54.2110588Z [INFO] Quarkus - Integration Tests - AWT .................. FAILURE [ 45.890 s] @Karm could you pls check (this is 2.13 branch PR)?

@quarkus-bot

This comment has been minimized.

@jmartisk
Copy link
Contributor Author

jmartisk commented Feb 9, 2023

We seem to have similar failures like we did in #27809
@jamezp do you remember what needs to be done to fix it? Maybe we also need RESTEasy to backport the ability to default exception mapper (resteasy/resteasy#3278)?
Quarkus 2.13 uses the dev.resteasy.exception.mapper property:

systemProperties.produce(new SystemPropertyBuildItem("dev.resteasy.exception.mapper", "false"));
) but perhaps without the said PR, it doesn't have any effect?

@jamezp
Copy link
Contributor

jamezp commented Feb 9, 2023

@jmartisk Hmm... ...4.7.8.Final doesn't have a default exception mapper so that property won't really do anything. The default exception mapper was required for Jakarta REST 3.1 so it's only in the 6.2 branch.

I'm not too sure what would be causing it. If I get some time, I'll test it locally.

@jamezp
Copy link
Contributor

jamezp commented Feb 9, 2023

It looks like the javax.imageio.ImageIO used to read the content is returning null. The ImageIO.createImageInputStream() that is returning null because it can't find any implementations.

@gsmet
Copy link
Member

gsmet commented Feb 27, 2023

@Karm could you have a look at this branch and why the AWT tests are failing? Thanks!

@sberyozkin
Copy link
Member

@Karm Hi Karm, can you please check, when you get a chance, as @gsmet also asked, why the AWT tests are failing ? Having an option of backport available would help to resolve a (public) CVE issue

@Karm
Copy link
Member

Karm commented Apr 24, 2023

/me looking...

@Karm
Copy link
Member

Karm commented Apr 24, 2023

@gsmet @sberyozkin

So, this is unrelated to AWT/graphics per se, it's about how I wrote the test suite to work with passing image files back and forth between Quarkus server and the test suite client. It is also unrelated to native, at least I didn't get to that yet. The undermentioned example is in Java mode:

With a started Quarkus server:

$ java -jar integration-tests/awt/target/quarkus-app/quarkus-run.jar

The same curl call:

$ curl -X POST -F image=@/home/karm/workspaceRH/quarkus/integration-tests/awt/src/test/resources/complex/test_a98.jpg http://localhost:8080/topng/test_a98.jpg --output result.png

executed with Quarkus 2.13.7.Final produces an expected png image. When I run the server built of this branch i.e. jmartisk:2.13-resteasy-4.7.8, I get this instead of a png image as a response:

java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because "this.directory" is null

accompanied by HTTP 400 Bad Request.

This is the endpoint code:
https://github.com/quarkusio/quarkus/blob/2.13.7.Final/integration-tests/awt/src/main/java/io/quarkus/awt/it/ImageResource.java#L74

The whole trace is available with FINE log level:

🔴 jmartisk:2.13-resteasy-4.7.8

2023-04-24 16:34:28,323 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.maxCapacityPerThread: 4096
2023-04-24 16:34:28,324 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.ratio: 8
2023-04-24 16:34:28,324 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.chunkSize: 32
2023-04-24 16:34:28,324 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.blocking: false
2023-04-24 16:34:28,329 DEBUG [io.net.buf.AbstractByteBuf] (vert.x-eventloop-thread-6) -Dio.netty.buffer.checkAccessible: true
2023-04-24 16:34:28,329 DEBUG [io.net.buf.AbstractByteBuf] (vert.x-eventloop-thread-6) -Dio.netty.buffer.checkBounds: true
2023-04-24 16:34:28,330 DEBUG [io.net.uti.ResourceLeakDetectorFactory] (vert.x-eventloop-thread-6) Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@4e22c768
2023-04-24 16:34:28,363 DEBUG [io.net.han.cod.com.ZlibCodecFactory] (vert.x-eventloop-thread-6) -Dio.netty.noJdkZlibDecoder: false
2023-04-24 16:34:28,363 DEBUG [io.net.han.cod.com.ZlibCodecFactory] (vert.x-eventloop-thread-6) -Dio.netty.noJdkZlibEncoder: false
2023-04-24 16:34:28,387 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) RESTEASY002315: PathInfo: /topng/test_a98.jpg
2023-04-24 16:34:28,391 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ServerReaderInterceptorContext,  Method : proceed
2023-04-24 16:34:28,391 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:34:28,391 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataReader
2023-04-24 16:34:28,431 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) RESTEASY002305: Failed executing POST /topng/test_a98.jpg: org.jboss.resteasy.spi.ReaderException: java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because "this.directory" is null
	at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:250)
	at org.jboss.resteasy.core.MethodInjectorImpl.injectArguments(MethodInjectorImpl.java:95)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:128)
	at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:660)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:524)
	at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$2(ResourceMethodInvoker.java:474)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:476)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:434)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:408)
	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:69)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:492)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:261)
	at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:161)
	at org.jboss.resteasy.core.interception.jaxrs.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:364)
	at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:164)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:247)
	at io.quarkus.resteasy.runtime.standalone.RequestDispatcher.service(RequestDispatcher.java:73)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler.dispatch(VertxRequestHandler.java:151)
	at io.quarkus.resteasy.runtime.standalone.VertxRequestHandler$1.run(VertxRequestHandler.java:91)
	at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:576)
	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
	at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
	at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because "this.directory" is null
	at org.jboss.resteasy.plugins.providers.multipart.Mime4JWorkaround$CustomTempFileStorageProvider.createStorageOutputStream(Mime4JWorkaround.java:146)
	at org.apache.james.mime4j.storage.ThresholdStorageProvider$ThresholdStorageOutputStream.write0(ThresholdStorageProvider.java:113)
	at org.apache.james.mime4j.storage.StorageOutputStream.write(StorageOutputStream.java:119)
	at org.apache.james.mime4j.util.ContentUtil.copy(ContentUtil.java:84)
	at org.apache.james.mime4j.storage.AbstractStorageProvider.store(AbstractStorageProvider.java:57)
	at org.apache.james.mime4j.storage.StorageBodyFactory.binaryBody(StorageBodyFactory.java:94)
	at org.jboss.resteasy.plugins.providers.multipart.Mime4jWorkaroundBinaryEntityBuilder.body(Mime4jWorkaroundBinaryEntityBuilder.java:159)
	at org.apache.james.mime4j.parser.MimeStreamParser.parse(MimeStreamParser.java:133)
	at org.jboss.resteasy.plugins.providers.multipart.Mime4JWorkaround.parseMessage(Mime4JWorkaround.java:83)
	at org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl.parse(MultipartInputImpl.java:104)
	at org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataReader.readFrom(MultipartFormDataReader.java:53)
	at org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataReader.readFrom(MultipartFormDataReader.java:23)
	at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:101)
	at org.jboss.resteasy.core.interception.jaxrs.ServerReaderInterceptorContext.readFrom(ServerReaderInterceptorContext.java:63)
	at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:80)
	at org.jboss.resteasy.core.MessageBodyParameterInjector.inject(MessageBodyParameterInjector.java:213)
	... 26 more

2023-04-24 16:34:28,438 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:34:28,438 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.StringTextStar
2023-04-24 16:34:28,439 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.StringTextStar
2023-04-24 16:34:28,439 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:34:28,440 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext,  Method : proceed
2023-04-24 16:34:28,440 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:34:28,440 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.StringTextStar

🟢 2.13.7.Final

2023-04-24 16:35:04,289 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.maxCapacityPerThread: 4096
2023-04-24 16:35:04,289 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.ratio: 8
2023-04-24 16:35:04,289 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.chunkSize: 32
2023-04-24 16:35:04,289 DEBUG [io.net.uti.Recycler] (vert.x-eventloop-thread-6) -Dio.netty.recycler.blocking: false
2023-04-24 16:35:04,294 DEBUG [io.net.buf.AbstractByteBuf] (vert.x-eventloop-thread-6) -Dio.netty.buffer.checkAccessible: true
2023-04-24 16:35:04,295 DEBUG [io.net.buf.AbstractByteBuf] (vert.x-eventloop-thread-6) -Dio.netty.buffer.checkBounds: true
2023-04-24 16:35:04,295 DEBUG [io.net.uti.ResourceLeakDetectorFactory] (vert.x-eventloop-thread-6) Loaded default ResourceLeakDetector: io.netty.util.ResourceLeakDetector@291b1f5
2023-04-24 16:35:04,331 DEBUG [io.net.han.cod.com.ZlibCodecFactory] (vert.x-eventloop-thread-6) -Dio.netty.noJdkZlibDecoder: false
2023-04-24 16:35:04,331 DEBUG [io.net.han.cod.com.ZlibCodecFactory] (vert.x-eventloop-thread-6) -Dio.netty.noJdkZlibEncoder: false
2023-04-24 16:35:04,354 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) RESTEASY002315: PathInfo: /topng/test_a98.jpg
2023-04-24 16:35:04,358 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ServerReaderInterceptorContext,  Method : proceed
2023-04-24 16:35:04,359 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:35:04,359 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.plugins.providers.multipart.MultipartFormDataReader
2023-04-24 16:35:04,399 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:35:04,400 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.plugins.providers.InputStreamProvider
2023-04-24 16:35:04,400 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyReader: org.jboss.resteasy.plugins.providers.InputStreamProvider
2023-04-24 16:35:04,400 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Provider : org.jboss.resteasy.plugins.providers.InputStreamProvider,  Method : readFrom
2023-04-24 16:35:04,449 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:35:04,449 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.ByteArrayProvider
2023-04-24 16:35:04,449 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.ByteArrayProvider
2023-04-24 16:35:04,450 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:35:04,450 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ServerWriterInterceptorContext,  Method : proceed
2023-04-24 16:35:04,450 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.core.providerfactory.SortedKey
2023-04-24 16:35:04,450 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) MessageBodyWriter: org.jboss.resteasy.plugins.providers.ByteArrayProvider
2023-04-24 16:35:04,450 DEBUG [org.jbo.res.res.i18n] (executor-thread-0) Provider : org.jboss.resteasy.plugins.providers.ByteArrayProvider,  Method : writeTo

@Karm
Copy link
Member

Karm commented Apr 25, 2023

Would you like me to dive deeper or do you guys have it covered? @jmartisk?
Sorry for letting it slide under the radar. Feel free to email/zulip me...

@jmartisk
Copy link
Contributor Author

@Karm We'd like to get this upgrade into Quarkus 2.13.8, so yes it would be really nice if you could help us find a way to fix it. Thanks a lot!

@gsmet gsmet added this to the 2.13.8.Final milestone May 9, 2023
@gsmet
Copy link
Member

gsmet commented May 9, 2023

I tried to upgrade to RESTEasy 4.7.9.Final just in case.

@quarkus-bot
Copy link

quarkus-bot bot commented May 9, 2023

Failing Jobs - Building 23d9a8b

Status Name Step Failures Logs Raw logs
Gradle Tests - JDK 11 Build Failures Logs Raw logs
Gradle Tests - JDK 11 Windows Build Failures Logs Raw logs
✔️ JVM Tests - JDK 11
JVM Tests - JDK 11 Windows Build ⚠️ Check → Logs Raw logs
✔️ JVM Tests - JDK 17
JVM Tests - JDK 18 Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Gradle Tests - JDK 11 #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.devmode.BasicJavaPlatformModuleDevModeTest.main line 23 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.gradle.KotlinGRPCProjectBuildTest.testBasicMultiModuleBuild line 16 - More details - Source on GitHub

org.opentest4j.AssertionFailedError: 

Expecting value to be true but was false

⚙️ Gradle Tests - JDK 11 Windows #

- Failing: integration-tests/gradle 

📦 integration-tests/gradle

io.quarkus.gradle.ConditionalDependenciesTest.scenarioTwo line 147 - More details - Source on GitHub

java.lang.AssertionError: 

Expecting path:

io.quarkus.gradle.devmode.ResourcesInBuildStepsDevModeTest.main line 24 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference was not fulfilled within 3 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

⚙️ JVM Tests - JDK 18 #

- Failing: integration-tests/logging-gelf 

📦 integration-tests/logging-gelf

io.quarkus.logging.gelf.it.GelfLogHandlerTest.test line 32 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a io.quarkus.logging.gelf.it.GelfLogHandlerTest expected: not <null> within 20 seconds.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)

@gsmet gsmet changed the title 2.13.x: Upgrade RESTEasy to 4.7.8.Final 2.13.x: Upgrade RESTEasy to 4.7.9.Final May 15, 2023
@gsmet
Copy link
Member

gsmet commented May 15, 2023

@jmartisk @rsvoboda AFAICS, the upgrade to 4.7.9.Final fixes the issue we had with the AWT testing. Should I merge?

@jmartisk
Copy link
Contributor Author

Yeah!

Copy link
Member

@rsvoboda rsvoboda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

additional set of changes - resteasy/resteasy@4.7.8.Final...4.7.9.Final

@gsmet
Copy link
Member

gsmet commented May 15, 2023

This is probably what fixed our issues: resteasy/resteasy@322f341

@gsmet gsmet merged commit 260ecd4 into quarkusio:2.13 May 15, 2023
@jmartisk jmartisk deleted the 2.13-resteasy-4.7.8 branch May 16, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants