Describe the bug
A race condition exists between HttpDispatcherLink.destroy() and HttpDispatcherLink.finish() methods that causes an IOException: Request not read yet when WebSocket connections are closed. This occurs when one thread destroys the connection objects while another thread is still completing the HTTP respons
The race condition occurs between two concurrent operations:
Thread A (WebSocket destruction path):
Calls HttpDispatcherLink.destroy(Exception e)
Sets this.isc = null
Nullifies other connection references
Thread B (HTTP response completion path):
Executing HttpDispatcherLink.finish(Exception e)
Calls closeStreams() which attempts to use the ISC
ISC has been nullified by Thread A → throws IOException
Steps to Reproduce
Not easily reproducible
Expected behavior
Connection lifecycle methods should handle concurrent calls gracefully without throwing exceptions.
Diagnostic information:
- OpenLiberty Version: 26.0.0.1
- Java Version: 21.0.9