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

luminous: client: dual client segfault with racing ceph_shutdown #18721

Closed
wants to merge 5 commits into from

Conversation

shinobu-x
Copy link
Contributor

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)
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)
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)
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)
...and make g_lockdep a bool.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit 0cd0bd7)
@tchaikov tchaikov added this to the luminous milestone Nov 4, 2017
@jdurgin
Copy link
Member

jdurgin commented Jan 23, 2018

We should include #18929 at the same time as this one

@smithfarm
Copy link
Contributor

closing in favor of #20082

@smithfarm smithfarm closed this Jan 23, 2018
@yuriw
Copy link
Contributor

yuriw commented Jan 23, 2018

@shinobu-x @jdurgin pls rebase

--- pr 18721 --- pulling https://github.com/shinobu-x/ceph.git branch wip-luminous-20988
remote: Counting objects: 23, done.
remote: Total 23 (delta 18), reused 18 (delta 18), pack-reused 5
Unpacking objects: 100% (23/23), done.
From https://github.com/shinobu-x/ceph

  • branch wip-luminous-20988 -> FETCH_HEAD
    Auto-merging src/test/libcephfs/test.cc
    CONFLICT (content): Merge conflict in src/test/libcephfs/test.cc
    Auto-merging src/common/lockdep.cc
    CONFLICT (content): Merge conflict in src/common/lockdep.cc
    Adding qa/suites/rados/basic/d-require-luminous/at-mkfs.yaml
    Adding qa/suites/rados/basic/d-require-luminous/at-end.yaml
    Automatic merge failed; fix conflicts and then commit the result.
    Traceback (most recent call last):
    File "/home/yuriw/wip_master/src/script/build-integration-branch", line 62, in
    assert not r
    AssertionError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants