]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: share curmap in handle_osd_ping 28662/head
authorSage Weil <sage@redhat.com>
Wed, 19 Jun 2019 19:38:53 +0000 (14:38 -0500)
committerSage Weil <sage@redhat.com>
Wed, 19 Jun 2019 19:38:53 +0000 (14:38 -0500)
We just took the curmap ref above; do not call get_osdmap() again.

I think it may explain a weird segv I saw here in ~shared_ptr, although
I'm not quite certain.  Regardless, this change is correct and better.

(gdb) bt
#0  raise (sig=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00005596e5a98261 in reraise_fatal (signum=11) at ./src/global/signal_handler.cc:326
#2  handle_fatal_signal(int) () at ./src/global/signal_handler.cc:326
#3  <signal handler called>
#4  0x00005596f4fe80e0 in ?? ()
#5  0x00005596e5464068 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5596f4b7cf60) at /usr/include/c++/9/bits/shared_ptr_base.h:148
#6  std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x5596f4b7cf60) at /usr/include/c++/9/bits/shared_ptr_base.h:148
#7  0x00005596e543377f in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x7f2b25044e28, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#8  std::__shared_ptr<OSDMap const, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x7f2b25044e20, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1169
#9  std::shared_ptr<OSDMap const>::~shared_ptr (this=0x7f2b25044e20, __in_chrg=<optimized out>) at /usr/include/c++/9/bits/shared_ptr.h:103
#10 OSD::handle_osd_ping(MOSDPing*) () at ./src/osd/OSD.cc:4662

Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 155ddd3b827ed600e108486f264d5dc97af3773b..3ef0417a0ba8b5960aac41c530e9d993241c4750 100644 (file)
@@ -4565,7 +4565,7 @@ void OSD::handle_osd_ping(MOSDPing *m)
        if (is_active()) {
          ConnectionRef con = service.get_con_osd_cluster(from, curmap->get_epoch());
          if (con) {
-           service.maybe_share_map(con.get(), get_osdmap(), m->map_epoch);
+           service.maybe_share_map(con.get(), curmap, m->map_epoch);
          }
        }
       } else if (!curmap->exists(from) ||
@@ -4659,7 +4659,7 @@ void OSD::handle_osd_ping(MOSDPing *m)
        if (is_active()) {
          ConnectionRef con = service.get_con_osd_cluster(from, curmap->get_epoch());
          if (con) {
-           service.maybe_share_map(con.get(), get_osdmap(), m->map_epoch);
+           service.maybe_share_map(con.get(), curmap, m->map_epoch);
          }
        }
       }