]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/simple: ms_die_on_skipped_message 2916/head
authorSage Weil <sage@redhat.com>
Tue, 11 Nov 2014 00:04:38 +0000 (16:04 -0800)
committerSage Weil <sage@redhat.com>
Thu, 13 Nov 2014 21:28:06 +0000 (13:28 -0800)
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 <sage@redhat.com>
src/common/config_opts.h
src/msg/simple/Pipe.cc

index be9cb1311a8d1b39b21ae0fb28796abfe82d4eb2..10c7ad1c666fd6c49080b6b319621ff0c4da92b1 100644 (file)
@@ -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)
index efd5e4d1ed264867d959d8efd8df2cad642203bc..3ff1fb1937bb6a3b180b06a04af9dbfce6c1b42a 100644 (file)
@@ -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());