-
Bug
-
Resolution: Done
-
Critical
-
3.2.0.GA
-
None
-
False
-
-
False
-
-
-
-
0
A Camel CXF SAML security project is configured to serve on a TLS enabled port, if a unit test calls the CXF endpoint incorrectly, the test case hangs incorrectly and throws this thread dump:
@QuarkusTest has detected a hang, as there has been no test activity in PT30S To configure this timeout use the quarkus.test.hang-detection-timeout config property A stack trace is below to help diagnose the potential hang === Stack Trace === Thread main: TIMED_WAITING Stack: java.base@17.0.8/java.lang.Object.wait(Native Method) java.base@17.0.8/java.io.PipedInputStream.awaitSpace(PipedInputStream.java:273) java.base@17.0.8/java.io.PipedInputStream.receive(PipedInputStream.java:231) java.base@17.0.8/java.io.PipedOutputStream.write(PipedOutputStream.java:150) org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51) org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69) org.apache.cxf.io.CacheAndWriteOutputStream.write(CacheAndWriteOutputStream.java:81) org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51) com.ctc.wstx.io.UTF8Writer.flush(UTF8Writer.java:100) com.ctc.wstx.sw.BufferingXmlWriter.flush(BufferingXmlWriter.java:242) com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:260) org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:214) org.apache.cxf.binding.soap.saaj.SAAJOutInterceptor$SAAJOutEndingInterceptor.handleMessage(SAAJOutInterceptor.java:173) org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:528) org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439) org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:354) org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:312) org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:140) jdk.proxy6/jdk.proxy6.$Proxy187.getContact(Unknown Source) package.name.CxfClientSyncTest.testGetContact(CxfClientSyncTest.java:219) java.base@17.0.8/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
What is the incorrect configuration:
- Not using any truststore in the JUnit client: Doing so should give an error but the test case hangs.
- Using the incorrect endpoint URL: Doing so should throw the connection refused/timeout error but this also hangs the test case.
I'm not able to reproduce this issue with vanilla CXF.
I'm attaching a reproducer. To reproduce the issue:
mvn test
The issue is only reproducible on tls enabled CXF servers.
- links to
-
RHEA-2023:123625 Red Hat Build of Apache Camel for Quarkus 3.2.0 release (RHBQ 3.2.6.SP1)