]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix RGWSyncTraceNode crash in reload 22926/head
authorTianshan Qu <tianshan@xsky.com>
Wed, 6 Jun 2018 06:39:37 +0000 (14:39 +0800)
committerNathan Cutler <ncutler@suse.com>
Sat, 7 Jul 2018 08:06:41 +0000 (10:06 +0200)
commita6bcfc2c719a26c2bbd19a1604c579c751e058fe
tree89b3875c54d74cc504f0453e78455273a4b3f873
parente367974219e6bfc8ea5e6d70ceef245e189119e6
rgw: fix RGWSyncTraceNode crash in reload

reload or restart will finalize RGWSyncTraceManager and destroy
complete_nodes, which will trigger RGWSyncTraceNode release twice.

A situation is sync more than 4096 objects and get full complete_nodes,
complete_nodes have a member A who's parent is P which is not finished
and A is the last child of P. In destroy complete_nodes, nodes will be
released one by one.
Release A will trigger release P, and call finish_node(P). there is
trap that circular_buffer won't change size until destroy all items,
so circular_buffer is still full and pop the first item which is A,
and released A again.

fixes: http://tracker.ceph.com/issues/24432

Signed-off-by: Tianshan Qu <tianshan@xsky.com>
(cherry picked from commit 3536c7810ae1c1ed508d4eb62b08b7da0c098c07)
src/rgw/rgw_sync_trace.cc