Project

General

Profile

Bug #36599

msg/async: should read data out of socket after shutdown(), before close()

Added by Sage Weil about 2 months ago. Updated about 2 months ago.

Status:
Verified
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/25/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic,luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:

Description

From a user:

These are right steps to close a TCP session and avoid resets; RESETs are bad and generally should occur only when you kernel queue overflows. (this field is default off, but if we turn it on - then it will indicate that user space process is not able to handle the load; see this field: /proc/sys/net/ipv4/tcp_abort_on_overflow).

1) shutdown(SHUT_WR) - https://linux.die.net/man/3/shutdown
2) Run a readloop and dump what is in socket => Resulting in proper ACK's being sent back to the sender waiting for ACK;
3) When you get read() error on the loop, then issue a full close or do shutdown(SHUT_RD) and you can exit.

This will create a proper FIN-ACK-FIN-ACK sequence and will not result in RESET's between hosts.

We are already doing the shutdown call, but we do not read off any data on the socket before closing.

History

#2 Updated by Patrick Donnelly about 2 months ago

  • Target version set to v14.0.0
  • Backport set to mimic,luminous

Also available in: Atom PDF