-
Bug
-
Resolution: Done
-
Major
-
2.2.17.SP3
In WFLY-16461 was detected that two tests failed using OpenJDK 19 EA. Finally it seems that the issue is in undertow. The tests do something like the following:
final PrintWriter writer = response.getWriter(); try { ... } catch (Exception e) { e.printStackTrace(writer); }
In JDK-19 this commit changed how the PrintWriter synchronizes the operation. Now the internal lock inside the PrintWriter is managed. The ServletPrintWriterDelegate uses the unsafe to create the instance and therefore the lock is not initialized. The final exception is the following:
ERROR [io.undertow.request] (default task-2) UT005023: Exception handling request to /entry-servlet-form/EntryServlet: java.lang.NullPointerException: Cannot enter synchronized block because "lock" is null at java.base/java.lang.Throwable.printStackTrace(Throwable.java:672) at java.base/java.lang.Throwable.printStackTrace(Throwable.java:749) at deployment.entry-servlet-form.war//org.wildfly.test.manual.elytron.seccontext.EntryServlet.doGet(EntryServlet.java:82) at javax.servlet.api@2.0.0.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:503) at javax.servlet.api@2.0.0.Final//javax.servlet.http.HttpServlet.service(HttpServlet.java:590) at io.undertow.servlet@2.2.17.Final//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ...
That class should to initialize the lock in order to be used, for example in the printStackTrace method of a Exception.
- causes
-
WFLY-16461 Security related manualmode tests failing on OpenJDK 19 EA
- Closed
- is incorporated by
-
UNDERTOW-2507 Get 2.0.41.SP branch in good shape
- Resolved
-
WFCORE-6057 Upgrade Undertow to 2.3.0.Final (CVE-2022-2764)
- Closed
-
WFCORE-5946 Upgrade Undertow to 2.2.18.Final
- Closed