]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
osd: fix race between handle_osd_ping and handle_osd_map
authorSage Weil <sage@newdream.net>
Fri, 23 Sep 2011 19:53:39 +0000 (12:53 -0700)
committerSage Weil <sage@newdream.net>
Fri, 23 Sep 2011 19:55:55 +0000 (12:55 -0700)
commit878fedbbac7e72fdc1394ad1db1677ec6dbcd365
treee672c3cc2356a1560dcbe06f6871540ae17dd6b9
parentdd8d4ecd202d82bd72d3f30b43e5fab604223e9b
osd: fix race between handle_osd_ping and handle_osd_map

If handle_osd_map is in progress and handle_osd_ping doesn't have the
map lock, we can't call osdmap->get_inst() in send_still_alive().  Keep
the entity_inst_t in the failure_pending map so that we don't need to.

osd/OSDMap.h: In function 'entity_inst_t OSDMap::get_inst(int)', in thread '0x7fda6a46b710'
osd/OSDMap.h: 477: FAILED assert(is_up(osd))
 ceph version 0.24.1 (commit:e06fb657842379259826f3d9215101fc14575fbd)
 1: (OSD::send_still_alive(int)+0x1b9) [0x4dd1b9]
 2: (OSD::handle_osd_ping(MOSDPing*)+0x716) [0x4f6446]
 3: (OSD::heartbeat_dispatch(Message*)+0x36) [0x4f6666]
 4: (SimpleMessenger::dispatch_entry()+0x882) [0x46f002]
 5: (SimpleMessenger::DispatchThread::entry()+0x1c) [0x465fac]
 6: (()+0x6a3a) [0x7fda7835aa3a]
 7: (clone()+0x6d) [0x7fda76f7777d]

Reported-by: Henry C Chang <henry_c_chang@tcloudcomputing.com>
Signed-off-by: Sage Weil <sage@newdream.net>
src/osd/OSD.cc
src/osd/OSD.h