Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osd: initialize waiting_for_pg_osdmap on startup #16535

Merged
merged 1 commit into from Aug 2, 2017

Conversation

Projects
None yet
3 participants
@liewegas
Copy link
Member

liewegas commented Jul 24, 2017

We assume this is always initialized and non-null in _process. Currently
we have a window between startup and the first call to prune_pg_waiters
(via consume_map()) when it is null, which can lead to a segv.

Signed-off-by: Sage Weil sage@redhat.com

Fixes http://tracker.ceph.com/issues/20748

@liewegas liewegas added this to the luminous milestone Jul 24, 2017

@liewegas liewegas force-pushed the liewegas:wip-osd-shard-init branch from 74972f9 to 112b7fd Jul 24, 2017

@gregsfortytwo

This comment has been minimized.

Copy link
Member

gregsfortytwo commented Jul 24, 2017

jenkins retest this please

@gregsfortytwo
Copy link
Member

gregsfortytwo left a comment

LGTM, although Jenkins was failing on what looked like (obviously unrelated) python packaging issues...

@liewegas

This comment has been minimized.

Copy link
Member Author

liewegas commented Jul 24, 2017

  0x0
  1
  UninitCondition
  Conditional jump or move depends on uninitialised value(s)
  
    
      0x69D16B
      /usr/bin/ceph-osd
      __shared_count
      /usr/include/c++/4.8.2/bits
      shared_ptr_base.h
      552
    
    
      0x69D16B
      /usr/bin/ceph-osd
      __shared_ptr
      /usr/include/c++/4.8.2/bits
      shared_ptr_base.h
      779
    
    
      0x69D16B
      /usr/bin/ceph-osd
      shared_ptr
      /usr/include/c++/4.8.2/bits
      shared_ptr.h
      103
    
    
      0x69D16B
      /usr/bin/ceph-osd
      get_osdmap
      /usr/src/debug/ceph-12.1.1-550-g8246df6/src/osd
      OSD.h
      1887
    
    
      0x69D16B
      /usr/bin/ceph-osd
      OSD::ShardedOpWQ::ShardedOpWQ(unsigned int, OSD*, long, long, ShardedThreadPool*)
      /usr/src/debug/ceph-12.1.1-550-g8246df6/src/osd
      OSD.h
      1722
    
    
      0x667065
      /usr/bin/ceph-osd
      OSD::OSD(CephContext*, ObjectStore*, int, Messenger*, Messenger*, Messenger*, Messenger*, Messenger*, Messenger*, Messenger*, MonClient*, std::string const&, std::string const&)
      /usr/src/debug/ceph-12.1.1-550-g8246df6/src/osd
      OSD.cc
      1959
    
    
      0x51276A
      /usr/bin/ceph-osd
      main
      /usr/src/debug/ceph-12.1.1-550-g8246df6/src
      ceph_osd.cc
      615
    
  

@liewegas

This comment has been minimized.

Copy link
Member Author

liewegas commented Jul 24, 2017

/a/sage-2017-07-24_18:23:25-rados-wip-sage-testing-distro-basic-smithi/1438365

osd: initialize shardedwq osdmap references on startup
The _process methods assumes the shard osdmap refs are
non-null, but that leaves a window between startup and
the first call to prune_pg_waiters (via consume_map()),
which can lead to a seg fault.

Calling prune during startup, before we have any work,
will initialize those references.

Fixes: http://tracker.ceph.com/issues/20748
Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas force-pushed the liewegas:wip-osd-shard-init branch from 112b7fd to c3aa866 Aug 1, 2017

@liewegas

This comment has been minimized.

Copy link
Member Author

liewegas commented Aug 1, 2017

updated with a simpler fix

@liewegas

This comment has been minimized.

Copy link
Member Author

liewegas commented Aug 1, 2017

@gregsfortytwo mind reviewing?

@gregsfortytwo
Copy link
Member

gregsfortytwo left a comment

LGTM

@liewegas

This comment has been minimized.

@liewegas liewegas merged commit e27a78c into ceph:master Aug 2, 2017

3 of 4 checks passed

make check (arm64) make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@liewegas liewegas deleted the liewegas:wip-osd-shard-init branch Aug 2, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.