SimpleRADOSStriper: Avoid moving bufferlists by using deque in read()#47841
SimpleRADOSStriper: Avoid moving bufferlists by using deque in read()#47841
Conversation
|
LGTM. Not sure we need two commits, but that's your call. |
Well, both structures should work, right? I wonder if you'll see invalid access when running with valgrind, before and after your patch. |
c0de339 to
23a54a9
Compare
cbodley
left a comment
There was a problem hiding this comment.
looks good if it works 👍
Test added for verification. |
| my_lock.unlock(); | ||
| } | ||
|
|
||
| TEST(LibRadosAio, MultiReads) { |
There was a problem hiding this comment.
i like the idea of this test, but we really want it to test the actual code in SimpleRADOSStriper::read() instead of a copy of its logic. that way if we change SimpleRADOSStriper in the future, this test can catch issues there
@batrick is test/libcephsqlite/main.cc the right place for this?
There was a problem hiding this comment.
Why not both? :)
It should go in a new file src/test/libcephsqlite/striper.cc or something instead though.
| my_lock.unlock(); | ||
| } | ||
|
|
||
| TEST(LibRadosAio, MultiReads) { |
There was a problem hiding this comment.
Why not both? :)
It should go in a new file src/test/libcephsqlite/striper.cc or something instead though.
|
@yuriw this should be ready to merge soon -- let's try to get the forthcoming backport into the next quincy release. This bug is very disruptive. |
70b3b22 to
c5475bc
Compare
Fixes: https://tracker.ceph.com/issues/57152 Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
c5475bc to
c4a2c38
Compare
|
@Matan-B can you take a look at https://tracker.ceph.com/issues/57310 and confirm whether this PR will address it? @NitzanMordhai left a comment about that tracker being related to the same issue you've documented here. |
That's a different RADOS striper (the original one). So I don't think so. |
|
jenkins test make check |
|
jenkins test api |
|
jenkins test make check |
|
Tests LGTM. 0 Related Failures. Failures: |
From the tracker's core dump:
Reproduced by attempting to make multithreaded aio requests similarly to
SimpleRADOSStriper:Same segfault:
Assumptions
It looks like we are deallocating the bufferlist before all requests using it are finished.
When using
unique_ptr<librados::bufferlist>std::dequeinstead ofvectorto avoid moves with significantly more requests, the test passes succefully.std::vector(not included in the commit)Fixes: https://tracker.ceph.com/issues/57152
Signed-off-by: Matan Breizman mbreizma@redhat.com
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windows