]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
tools/rados: always call rados.shutdown() before exit() 30608/head
authorLi Wang <laurence.liwang@gmail.com>
Tue, 27 Nov 2018 03:35:53 +0000 (03:35 +0000)
committerVikhyat Umrao <vumrao@redhat.com>
Mon, 30 Sep 2019 22:34:59 +0000 (15:34 -0700)
commit638abda05db7c0addd8ddeef530085a749758ae1
tree53b646ab0efb9523465ca9aead4afeb0d686a9e6
parentf404fbce11c37c60b00001c844e5cc26cf8bfbf3
tools/rados: always call rados.shutdown() before exit()

When connected to ceph cluster, if call exit(1) directly, will cause the finisher
thread segmentation fault as follows,

Caught signal (Segmentation fault) **in thread 7f45377fe700 thread_name:fn_anonymous

run 'rados mapext' without other arguments could easily get it. This patch fixes it
by calling rados.shutdown() before exit()

Fixes: http://tracker.ceph.com/issues/36732
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
(cherry picked from commit 2c149262888c50beb9f480a6cd78f77fd5920d1c)

 Conflicts:
src/tools/rados/rados.cc
        - removed conflicts in error conditions
        - no clearomap option
        - no set-chunk option
        - no tier-promote option
        - no touch option
        - no stat2 option
        - no unset-manifest
        - removed std::make_unique<JSONFormatter> as not defined
src/tools/rados/rados.cc