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: common: data race in OutputDataSocket #29201

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 changed the title mimic: data race in OutputDataSocket mimic: common: data race in OutputDataSocket Jul 23, 2019
@smithfarm smithfarm requested a review from tchaikov Jul 23, 2019
@smithfarm smithfarm added common and removed core labels Jul 23, 2019
@smithfarm

This comment has been minimized.

Copy link
Contributor Author

smithfarm commented Jul 23, 2019

In file included from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/convenience.h:15,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/include/encoding.h:35,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/include/uuid.h:8,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/include/types.h:21,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/msg/msg_types.h:21,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/entity_name.h:20,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/config.h:21,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/dout.h:22,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/include/Context.h:19,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/Cond.h:19,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/OutputDataSocket.h:18,
                 from /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/OutputDataSocket.cc:15:
/usr/include/c++/8/mutex: In instantiation of 'std::scoped_lock<_Mutex>::scoped_lock(std::scoped_lock<_Mutex>::mutex_type&) [with _Mutex = Mutex; std::scoped_lock<_Mutex>::mutex_type = Mutex]':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/common/OutputDataSocket.cc:305:35:   required from here
/usr/include/c++/8/mutex:610:19: error: 'using mutex_type = class Mutex' {aka 'class Mutex'} has no member named 'lock'; did you mean 'nlock'?
       { _M_device.lock(); }
         ~~~~~~~~~~^~~~
         nlock
/usr/include/c++/8/mutex: In instantiation of 'std::scoped_lock<_Mutex>::~scoped_lock() [with _Mutex = Mutex]':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/common/OutputDataSocket.cc:305:35:   required from here
/usr/include/c++/8/mutex:617:19: error: 'using mutex_type = class Mutex' {aka 'class Mutex'} has no member named 'unlock'; did you mean 'nlock'?
       { _M_device.unlock(); }
         ~~~~~~~~~~^~~~~~
         nlock
src/CMakeFiles/common-objs.dir/build.make:351: recipe for target 'src/CMakeFiles/common-objs.dir/common/OutputDataSocket.cc.o' failed
make[3]: *** [src/CMakeFiles/common-objs.dir/common/OutputDataSocket.cc.o] Error 1
@smithfarm smithfarm requested a review from cbodley Jul 23, 2019
@smithfarm

This comment has been minimized.

Copy link
Contributor Author

smithfarm commented Jul 23, 2019

So, no std::scoped_lock in mimic. What to do?

the list of buffers is protected by mutex m_lock. when dump_data() fails
and puts unwritten buffers back into the list, it needs to reaquire the
lock

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

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 8645e24)

Conflicts:
    src/common/OutputDataSocket.cc
- use Mutex::Locker instead of std::scoped_lock
@smithfarm smithfarm force-pushed the smithfarm:wip-40268-mimic branch from 3fd65b8 to 8fc9073 Jul 23, 2019
@smithfarm

This comment has been minimized.

Copy link
Contributor Author

smithfarm commented Jul 23, 2019

157/157 Test   #3: test_objectstore_memstore.sh ............***Timeout 3600.01 sec
@smithfarm

This comment has been minimized.

Copy link
Contributor Author

smithfarm commented Jul 23, 2019

jenkins test make check

@yuriw

This comment has been minimized.

Copy link
Contributor

yuriw commented Jul 23, 2019

@yuriw yuriw merged commit af8a9d9 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-40268-mimic branch Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.