Comment 20 for bug 1466549

Revision history for this message
Romain LE DISEZ (rledisez) wrote : Re: Download DLO objects leak connections when client kill connection

It seems the bug is not really fixed but it is "moved". I know have sockets leak when a client stops a DLO download. Each interrupted DLO download leak one TCP socket. It applies on Linux, don't know if others OS are impacted.

How to reproduce, on a fresh SAIO on master, with processes just started:
1. Upload an object in DLO
    $ dd if=/dev/zero of=2x1G bs=1M count=2048
    $ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing post test
    $ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing upload test -S 1073741824 2x1G

2. In an other terminal, watch socket stats:
   $ while [ 1 ]; do grep ^TCP /proc/net/sockstat; sleep 1; done
(For now, you should see that the number of allocated sockets is stable, for me: alloc 45)

3. Start to download the object, but stop it before the end (eg: CTRL+C)
    $ swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing download test 2x1G --no-download
(Now, you should see one more allocated socket)

4. Repeat step 3 and observe the socket stacking

So, no more connections leak, but socket leak. Instead of few hours, it takes few days to exhaust server resources.