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

mimic: mgr: DaemonServer::handle_conf_change - broken locking #29197

Merged
merged 1 commit into from Jul 30, 2019

Conversation

@smithfarm
Copy link
Contributor

smithfarm commented Jul 23, 2019

@smithfarm smithfarm self-assigned this Jul 23, 2019
@smithfarm smithfarm added this to the mimic milestone Jul 23, 2019
@smithfarm smithfarm added bug fix core mgr and removed core labels Jul 23, 2019
@smithfarm smithfarm requested review from tchaikov and liewegas Jul 23, 2019
@smithfarm

This comment has been minimized.

Copy link
Contributor Author

smithfarm commented Jul 23, 2019

In file included from /usr/include/c++/7/mutex:43:0,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/ceph_context.h:21,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/Mutex.h:20,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/PyModule.h:20,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/PyModuleRegistry.h:18,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/DaemonServer.h:17,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/DaemonServer.cc:14:
/usr/include/c++/7/bits/std_mutex.h: In instantiation of 'std::lock_guard<_Mutex>::lock_guard(std::lock_guard<_Mutex>::mutex_type&) [with _Mutex = Mutex; std::lock_guard<_Mutex>::mutex_type = Mutex]':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/DaemonServer.cc:1960:29:   required from here
/usr/include/c++/7/bits/std_mutex.h:162:19: error: 'std::lock_guard<Mutex>::mutex_type {aka class Mutex}' has no member named 'lock'; did you mean 'Lock'?
       { _M_device.lock(); }
         ~~~~~~~~~~^~~~
         Lock
/usr/include/c++/7/bits/std_mutex.h: In instantiation of 'std::lock_guard<_Mutex>::~lock_guard() [with _Mutex = Mutex]':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/mgr/DaemonServer.cc:1960:29:   required from here
/usr/include/c++/7/bits/std_mutex.h:168:19: error: 'std::lock_guard<Mutex>::mutex_type {aka class Mutex}' has no member named 'unlock'; did you mean 'Unlock'?
       { _M_device.unlock(); }
         ~~~~~~~~~~^~~~~~
         Unlock
src/CMakeFiles/ceph-mgr.dir/build.make:134: recipe for target 'src/CMakeFiles/ceph-mgr.dir/mgr/DaemonServer.cc.o' failed
make[3]: *** [src/CMakeFiles/ceph-mgr.dir/mgr/DaemonServer.cc.o] Error 1
The is_locked_by_me() is only meant to be safe if you know
you hold the lock. It's meant to be used in an assertion.

Fixes: http://tracker.ceph.com/issues/38899
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit a929a5a)

Conflicts:
    src/mgr/DaemonServer.cc
- use Mutex::Locker instead of std::lock_guard
@smithfarm smithfarm force-pushed the smithfarm:wip-38963-mimic branch from 6e632a6 to afacc16 Jul 23, 2019
@smithfarm smithfarm changed the title mimic: DaemonServer::handle_conf_change - broken locking mimic: mgr: DaemonServer::handle_conf_change - broken locking Jul 23, 2019
@smithfarm smithfarm requested a review from trociny Jul 23, 2019
@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Jul 23, 2019

@yuriw yuriw merged commit bc0ab0b into ceph:mimic Jul 30, 2019
4 checks passed
4 checks passed
Docs: build check OK - docs built
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
@smithfarm smithfarm deleted the smithfarm:wip-38963-mimic branch Aug 27, 2019
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.