[jboss-jira] [JBoss JIRA] (WFLY-8466) Socket leak when setting HTTP Content-Length and client not reading entire response

Johannes Ritter (JIRA) issues at jboss.org
Thu Mar 30 02:19:00 EDT 2017


    [ https://issues.jboss.org/browse/WFLY-8466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13386316#comment-13386316 ] 

Johannes Ritter commented on WFLY-8466:
---------------------------------------

Thank you for the hint. After some first tests with Undertow 1.4.11 the issue seems to be fixed.

I downloaded Undertow 1.4.11 from [here|https://github.com/undertow-io/undertow/releases] and upgraded the following 3 modules:
* modules/system/layers/base/io/undertow/core/main/undertow-core-1.4.11.Final.jar
* modules/system/layers/base/io/undertow/servlet/main/undertow-servlet-1.4.11.Final.jar
* modules/system/layers/base/io/undertow/websocket/main/undertow-websockets-jsr-1.4.11.Final.jar

I couldn't find a replacement for "modules/system/layers/base/io/undertow/js/main/undertow-js-1.0.2.Final.jar".
Since we have a serious issue on one of our customer's system regarding the socket leak I would like to upgrade Undertow on the customer system. It is save to only upgrade the 3 listed modules?

> Socket leak when setting HTTP Content-Length and client not reading entire response
> -----------------------------------------------------------------------------------
>
>                 Key: WFLY-8466
>                 URL: https://issues.jboss.org/browse/WFLY-8466
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 10.1.0.Final
>         Environment: CentOS 6.7
>            Reporter: Johannes Ritter
>            Assignee: Stuart Douglas
>              Labels: leak, socket
>         Attachments: socket_leak.tar.gz
>
>
> Wildfly leaks half-open sockets if the client closes the connection before all data was sent to the client. This only happens when the HTTP header field "Content-Length" was manually set.
> The leaked sockets can be determined by "lsof -p <process-id> | grep identify". The relevant sockets are listed with "Can't identify protocol".
> The leak occurs if the client connection is closed (on the client side) before the server could send the complete response.
> It does not happen every time. I have attached an example application using a web browser as client. One button click sends the request 500 times. The socket does not leak on every button click.
> *Another interesting fact is, that the socket will also leak if a Content-Length larger than the actual response data is set.* This is independent from the client's behavior.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list