]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msgr: mark_all_down on shutdown
authorSage Weil <sage@newdream.net>
Wed, 15 Feb 2012 16:09:32 +0000 (08:09 -0800)
committerSage Weil <sage@newdream.net>
Wed, 15 Feb 2012 16:21:10 +0000 (08:21 -0800)
This ensures we destroy all the Pipes and discard their messages.  Among
other things, this can avoid

2012-02-15 03:16:46.385242 7fe712b9a700 mon.f@5(peon) e1 *** Got Signal Terminated ***
2012-02-15 03:16:46.470227 7fe712b9a700 mon.f@5(peon) e1 shutdown
msg/SimpleMessenger.h: In function 'virtual SimpleMessenger::Pipe::~Pipe()' thread 7fe716a37780 time 2012-02-15 03:16:46.471005
msg/SimpleMessenger.h: 234: FAILED assert(!i->second->is_on_list())
 ceph version 0.41-362-g40802ae (commit:40802ae883a94d205a8716065b80ad5d7ff57d12)
 1: (SimpleMessenger::Pipe::~Pipe()+0x199) [0x4669d9]
 2: (SimpleMessenger::~SimpleMessenger()+0x31) [0x552231]
 3: (main()+0x3026) [0x4614a6]
 4: (__libc_start_main()+0xfe) [0x7fe714dd6d8e]
 5: /tmp/cephtest/binary/usr/local/bin/ceph-mon() [0x45e219]
 ceph version 0.41-362-g40802ae (commit:40802ae883a94d205a8716065b80ad5d7ff57d12)
 1: (SimpleMessenger::Pipe::~Pipe()+0x199) [0x4669d9]
 2: (SimpleMessenger::~SimpleMessenger()+0x31) [0x552231]
 3: (main()+0x3026) [0x4614a6]
 4: (__libc_start_main()+0xfe) [0x7fe714dd6d8e]
 5: /tmp/cephtest/binary/usr/local/bin/ceph-mon() [0x45e219]

Signed-off-by: Sage Weil <sage@newdream.net>
src/msg/SimpleMessenger.cc

index dcf4ccd8c65b87b2c1adb5c2f8561bb7e7aa003b..32eb818217b9230f0b5389fe3b857ffab9f4d1b0 100644 (file)
@@ -405,6 +405,9 @@ int SimpleMessenger::shutdown()
     dispatch_queue.cond.Signal();
     dispatch_queue.lock.Unlock();
   }
+
+  mark_down_all();
+
   return 0;
 }