Project

General

Profile

Actions

Bug #36599

open

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

Added by Sage Weil over 5 years ago. Updated over 4 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.

Actions #2

Updated by Patrick Donnelly over 5 years ago

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

Updated by Greg Farnum about 5 years ago

  • Project changed from RADOS to Messengers
Actions #4

Updated by Greg Farnum about 5 years ago

  • Category set to AsyncMessenger
Actions #5

Updated by Patrick Donnelly over 4 years ago

  • Status changed from 12 to New
Actions

Also available in: Atom PDF