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

[DNM] jewel: client: dual client segfault with racing ceph_shutdown #21153

Closed
wants to merge 5 commits into from

Commits on Mar 31, 2018

  1. lockdep: don't take lockdep_mutex twice for new lock registrations

    We can do it under the same mutex, which should be more efficient.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    (cherry picked from commit 01863bb)
    jtlayton authored and smithfarm committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    ab2df43 View commit details
    Browse the repository at this point in the history
  2. lockdep: fix races with concurrent lockdep teardown

    If the cct is unregistered while other threads are flogging mutexes,
    then we can hit all sorts of bugs. Ensure that we handle that
    situation sanely, by checking that g_lockdep is still set after
    we take the lockdep_mutex.
    
    Also, remove an assertion from lockdep_unregister, and just turn it into
    an immediate return. It's possible to have a call to
    lockdep_unregister_ceph_context, and then a call to
    lockdep_register_ceph_context while a mutex is being held by another
    task.
    
    In that case, it's possible the lock does not exist in the map
    when we go to unregister it. That's not a bug though, just a natural
    consequence of that series of actions.
    
    Tracker: http://tracker.ceph.com/issues/20988
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    (cherry picked from commit 75f41a9)
    jtlayton authored and smithfarm committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    2edf45f View commit details
    Browse the repository at this point in the history
  3. client: fix signed/unsigned comparison compiler warning

    The build says:
    
    src/client/Client.cc: In member function ‘void Client::trim_caps(MetaSession*, int)’:
    src/client/Client.cc:4121:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
       if (s->caps.size() > max)
           ~~~~~~~~~~~~~~~^~~~~
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    (cherry picked from commit e057b67)
    jtlayton authored and smithfarm committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    2991460 View commit details
    Browse the repository at this point in the history
  4. client: test shutdown race

    Spawn threads that bring up a bunch of ceph_mounts with individual
    CephContext objects, and then tear them down in parallel.
    
    Tracker: http://tracker.ceph.com/issues/20988
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    (cherry picked from commit 8252f31)
    jtlayton authored and smithfarm committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    be3ddb4 View commit details
    Browse the repository at this point in the history
  5. lockdep: fix Mutex tests to disable lockdep properly

    ...and make g_lockdep a bool.
    
    Signed-off-by: Jeff Layton <jlayton@redhat.com>
    (cherry picked from commit 0cd0bd7)
    
    Conflicts:
    	src/test/common/test_mutex.cc (file does not exist in jewel)
    jtlayton authored and smithfarm committed Mar 31, 2018
    Configuration menu
    Copy the full SHA
    f371239 View commit details
    Browse the repository at this point in the history