SLO GET disconnect fails to close sockets

Bug #1909588 reported by Alistair Coles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Committed
Undecided
Alistair Coles

Bug Description

Client disconnects during an SLO GET can leave unclosed sockets (since patch https://review.opendev.org/c/openstack/swift/+/755639)

To reproduce socket leak in saio:

create an SLO:

dd if=/dev/zero of=./junk_64MiB bs=8192 count=8192
swift upload --use-slo -S 8192000 test ./junk_64MiB

in another window start watching proxy server sockets:

$ sudo watch -n 1 'lsof -itcp -P|grep swift-pro'
Every 1.0s: lsof -itcp -P|grep swift-pro saio: Tue Dec 29 14:58:54 2020

swift-pro 11157 vagrant 53u IPv4 65243 0t0 TCP *:8090 (LISTEN)
swift-pro 11158 vagrant 74u IPv4 65323 0t0 TCP *:8080 (LISTEN)
swift-pro 11314 vagrant 53u IPv4 65243 0t0 TCP *:8090 (LISTEN)
swift-pro 11315 vagrant 74u IPv4 65323 0t0 TCP *:8080 (LISTEN)
curl the SLO and ctrl-C out, watch sockets accumulate:

swift auth
export OS_STORAGE_URL=http://saio:8080/v1/AUTH_test
export OS_AUTH_TOKEN=AUTH_tkae586b30b0fc4646b034dafc892d16f3
$ curl -XGET -i http://saio:8080/v1/AUTH_test/test/junk_64MiB -H "X-Auth-Token: AUTH_tkae586b30b0fc4646b034dafc892d16f3" -o junk --limit-rate 2m
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  6 64.0M 6 4316k 0 0 2450k 0 0:00:26 0:00:01 0:00:25 2449k^C
Every 1.0s: lsof -itcp -P|grep swift-pro saio: Tue Dec 29 15:02:04 2020

swift-pro 11157 vagrant 53u IPv4 65243 0t0 TCP *:8090 (LISTEN)
swift-pro 11158 vagrant 74u IPv4 65323 0t0 TCP *:8080 (LISTEN)
swift-pro 11314 vagrant 53u IPv4 65243 0t0 TCP *:8090 (LISTEN)
swift-pro 11315 vagrant 72u IPv4 71976 0t0 TCP localhost:52782->localhost:11211 (ESTABLISHED)
swift-pro 11315 vagrant 73u IPv4 72064 0t0 TCP localhost:57488->saio:6020 (CLOSE_WAIT)
swift-pro 11315 vagrant 74u IPv4 65323 0t0 TCP *:8080 (LISTEN)

Changed in swift:
assignee: nobody → Alistair Coles (alistair-coles)
status: New → In Progress
Revision history for this message
Alistair Coles (alistair-coles) wrote :
Changed in swift:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/swift 2.27.0

This issue was fixed in the openstack/swift 2.27.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.