From: Sage Weil Date: Tue, 11 Nov 2014 00:04:38 +0000 (-0800) Subject: msg/simple: ms_die_on_skipped_message X-Git-Tag: v0.89~10^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F2916%2Fhead;p=ceph.git msg/simple: ms_die_on_skipped_message Assert if we skip an incoming seq. The SimpleMessenger never does this, but the kernel messenger does. Hopefully useful for tracking down bugs like #10057. Signed-off-by: Sage Weil --- diff --git a/src/common/config_opts.h b/src/common/config_opts.h index be9cb1311a8d..10c7ad1c666f 100644 --- a/src/common/config_opts.h +++ b/src/common/config_opts.h @@ -123,6 +123,7 @@ OPTION(ms_nocrc, OPT_BOOL, false) OPTION(ms_die_on_bad_msg, OPT_BOOL, false) OPTION(ms_die_on_unhandled_msg, OPT_BOOL, false) OPTION(ms_die_on_old_message, OPT_BOOL, false) // assert if we get a dup incoming message and shouldn't have (may be triggered by pre-541cd3c64be0dfa04e8a2df39422e0eb9541a428 code) +OPTION(ms_die_on_skipped_message, OPT_BOOL, false) // assert if we skip a seq (kernel client does this intentionally) OPTION(ms_dispatch_throttle_bytes, OPT_U64, 100 << 20) OPTION(ms_bind_ipv6, OPT_BOOL, false) OPTION(ms_bind_port_min, OPT_INT, 6800) diff --git a/src/msg/simple/Pipe.cc b/src/msg/simple/Pipe.cc index efd5e4d1ed26..3ff1fb1937bb 100644 --- a/src/msg/simple/Pipe.cc +++ b/src/msg/simple/Pipe.cc @@ -1572,6 +1572,12 @@ void Pipe::reader() assert(0 == "old msgs despite reconnect_seq feature"); continue; } + if (m->get_seq() > in_seq + 1) { + ldout(msgr->cct,0) << "reader missed message? skipped from seq " + << in_seq << " to " << m->get_seq() << dendl; + if (msgr->cct->_conf->ms_die_on_skipped_message) + assert(0 == "skipped incoming seq"); + } m->set_connection(connection_state.get());