Project

General

Profile

Bug #36599

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

Added by Sage Weil about 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
AsyncMessenger
Target version:
% Done:

0%

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

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 4 years ago

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

#3 Updated by Greg Farnum over 3 years ago

  • Project changed from RADOS to Messengers

#4 Updated by Greg Farnum over 3 years ago

  • Category set to AsyncMessenger

#5 Updated by Patrick Donnelly about 3 years ago

  • Status changed from 12 to New

Also available in: Atom PDF