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
rgw: Do not forward functor objects in rgw_iam_policy.h #51676
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thank you.
fbfbe74
to
6ee227d
Compare
src/rgw/rgw_iam_policy.h
Outdated
if (std::forward<F>(f)(itr->second, d)) { | ||
return true; | ||
if (f(itr->second, d)) { | ||
return true`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return true`; | |
return true; |
src/rgw/rgw_iam_policy.h
Outdated
if (!xd) { | ||
continue; | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
continue; | |
continue; |
src/rgw/rgw_iam_policy.h
Outdated
if (std::forward<F>(f)(*xc, *xd)) { | ||
return true; | ||
if (f(*xc, *xd)) { | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return true; | |
return true; |
6ee227d
to
61411c2
Compare
rgw_iam_policy.h implements the andible, orrible, and shortible methods which called forward on functor objects called in a loop. This does not have any effect currently since the callers do not pass stateful functors. However, in case a stateful functor that is also an rvalue is used, the forward would cause it to lose its state. Signed-off-by: Vedansh Bhartia <vedanshbhartia@gmail.com>
61411c2
to
ec5d0bd
Compare
teuthology results: http://pulpito.ceph.com/yuvalif-2023-06-11_16:58:37-rgw-wip-yuval-test1-distro-default-smithi/
|
@alimaredia can you please have a look at the teuthology results? |
those are tracked in https://tracker.ceph.com/issues/58751. they only fail in rgw/crypt with kmip |
@cbodley @yuvalif same with this crash in a reshard workunit here. Is this to be expected: http://qa-proxy.ceph.com/teuthology/yuvalif-2023-06-11_16:58:37-rgw-wip-yuval-test1-distro-default-smithi/7301224/teuthology.log |
it looks like an intentioanl abort. from the code and the backtrace it looks like radosgw-admin reshard command was called with "--inject-abort-at" flag. |
rgw_iam_policy.h implements the andible, orrible, and shortible methods which called forward on functor objects called in a loop. This does not have any effect currently since the callers do not pass stateful functors. However, in case a stateful functor that is also an rvalue is used, the forward would cause it to lose its state.
Fixes coverity defects 1510264, 1511592, 1511865
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows