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

test/librbd: decouple ceph_test_librbd_api from libceph-common #15611

Merged
merged 3 commits into from Jun 16, 2017

Conversation

Projects
None yet
4 participants
@tchaikov
Contributor

tchaikov commented Jun 10, 2017

Fixes: http://tracker.ceph.com/issues/20175
Signed-off-by: Kefu Chai kchai@redhat.com

@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jun 12, 2017

(gdb) info address ceph::buffer::list::list
Symbol "ceph::buffer::list::list()" is a function at address 0x555555610070.
(gdb) info shared
0x00007ffff768f9d0  0x00007ffff7a18da6  Yes         /var/ceph/ceph/build/lib/librbd.so.1
0x00007ffff725caf0  0x00007ffff739f32f  Yes         /var/ceph/ceph/build/lib/librados.so.2
0x00007ffff6edaab0  0x00007ffff6ee7811  Yes         /lib/x86_64-linux-gnu/libpthread.so.0
0x00007ffff6be0230  0x00007ffff6c885c9  Yes (*)     /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0x00007ffff693fac0  0x00007ffff694ffe5  Yes (*)     /lib/x86_64-linux-gnu/libgcc_s.so.1
0x00007ffff65bd910  0x00007ffff66e7403  Yes         /lib/x86_64-linux-gnu/libc.so.6
0x00007fffed5cd4c0  0x00007fffedd3b7df  Yes         /var/ceph/ceph/build/lib/libceph-common.so.0
(gdb) bt
#0  ceph::buffer::list::list (this=0x5555559dcd98) at ./include/rbd/../rados/buffer.h:378
#1  0x00007fffed5f34f4 in Message::Message (this=0x5555559dccd0, t=17, version=1, compat_version=0) at /var/ceph/ceph/src/msg/Message.h:289
#2  0x00007fffed5f3ba7 in PaxosServiceMessage::PaxosServiceMessage (this=0x5555559dccd0, type=17, v=0, enc_version=1, compat_enc_version=0)
    at /var/ceph/ceph/src/messages/PaxosServiceMessage.h:24
#3  0x00007fffed6ff738 in MAuth::MAuth (this=0x5555559dccd0) at /var/ceph/ceph/src/messages/MAuth.h:27
#4  0x00007fffed6fcc0e in MonConnection::start (this=0x5555559de738, epoch=0, entity_name=..., auth_supported=...) at /var/ceph/ceph/src/mon/MonClient.cc:1189
#5  0x00007fffed6f5c5b in MonClient::_reopen_session (this=0x5555558f21d8, rank=-1) at /var/ceph/ceph/src/mon/MonClient.cc:614
#6  0x00007fffed6f44c4 in MonClient::authenticate (this=0x5555558f21d8, timeout=300) at /var/ceph/ceph/src/mon/MonClient.cc:453
#7  0x00007ffff72dc75e in librados::RadosClient::connect (this=0x5555558f2190) at /var/ceph/ceph/src/librados/RadosClient.cc:298
#8  0x00007ffff7265aa9 in librados::Rados::connect (this=0x7fffffffdf28) at /var/ceph/ceph/src/librados/librados.cc:2271
#9  0x000055555563afba in connect_cluster_pp[abi:cxx11](librados::Rados&) (cluster=...) at test/librados/test.cc:273
#10 0x000055555559acde in main (argc=<optimized out>, argv=<optimized out>) at test/librbd/test_main.cc:38
$ nm ./.libs/ceph_test_librbd_api -C | grep 'ceph::buffer::list::list'
00000000000bc070 W ceph::buffer::list::list()
00000000000bc070 W ceph::buffer::list::list()

in short, libceph-common.so.0 is using the symbols offered by the executable itself! and this causes segfault, because the buffer::list changed its layout in luminous: we added _mempool to it recently.

never mind, we always strip the executables when packaging them. so the symbols will disappear when linker kicks in.

@tchaikov tchaikov changed the title from test/librbd: decouple ceph_test_librbd_api from libceph-common to [DNM] test/librbd: decouple ceph_test_librbd_api from libceph-common Jun 12, 2017

@tchaikov tchaikov changed the title from [DNM] test/librbd: decouple ceph_test_librbd_api from libceph-common to test/librbd: decouple ceph_test_librbd_api from libceph-common Jun 12, 2017

@dillaman

This comment has been minimized.

Contributor

dillaman commented Jun 12, 2017

Nit: typo in first commit subject line: standarnd

@dillaman

lgtm

tchaikov added some commits Jun 10, 2017

test/librbd: replace libcommon classes using standard library
so ceph_test_librbd_api has less dependencies on libcommon

Fixes: http://tracker.ceph.com/issues/20175
Signed-off-by: Kefu Chai <kchai@redhat.com>
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jun 12, 2017

changelog

  • fixed the typo
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jun 15, 2017

@dillaman did the test pass? or is there anything else i can do ?

@dillaman dillaman merged commit 7edc62d into ceph:master Jun 16, 2017

3 checks passed

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

@tchaikov tchaikov deleted the tchaikov:wip-20175 branch Jun 16, 2017

@smithfarm

This comment has been minimized.

Contributor

smithfarm commented Jul 6, 2017

Backport to kraken is non-trivial.

@dillaman

This comment has been minimized.

Contributor

dillaman commented Jul 6, 2017

@smithfarm I'll post a kraken PR tonight

@yuriw

This comment has been minimized.

Contributor

yuriw commented Sep 27, 2017

@smithfarm can this be backported to hammer? We need it for client-upgrades #17981

@tchaikov - can you do it?, pls

@dillaman

This comment has been minimized.

Contributor

dillaman commented Sep 27, 2017

@yuriw I can tackle it today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment