Skip to content

Commit

Permalink
msg: output peer address when detecting bad CRCs
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/39367

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 1967923)
  • Loading branch information
gregsfortytwo authored and ashishkumsingh committed Apr 29, 2019
1 parent e6d1c63 commit 7ebc1d5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/msg/Message.cc
Expand Up @@ -295,7 +295,8 @@ Message *decode_message(CephContext *cct, int crcflags,

if (front_crc != footer.front_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in front " << front_crc << " != exp " << footer.front_crc << dendl;
ldout(cct, 0) << "bad crc in front " << front_crc << " != exp " << footer.front_crc
<< " from " << conn->get_peer_addr() << dendl;
ldout(cct, 20) << " ";
front.hexdump(*_dout);
*_dout << dendl;
Expand All @@ -304,7 +305,8 @@ Message *decode_message(CephContext *cct, int crcflags,
}
if (middle_crc != footer.middle_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in middle " << middle_crc << " != exp " << footer.middle_crc << dendl;
ldout(cct, 0) << "bad crc in middle " << middle_crc << " != exp " << footer.middle_crc
<< " from " << conn->get_peer_addr() << dendl;
ldout(cct, 20) << " ";
middle.hexdump(*_dout);
*_dout << dendl;
Expand All @@ -317,7 +319,8 @@ Message *decode_message(CephContext *cct, int crcflags,
__u32 data_crc = data.crc32c(0);
if (data_crc != footer.data_crc) {
if (cct) {
ldout(cct, 0) << "bad crc in data " << data_crc << " != exp " << footer.data_crc << dendl;
ldout(cct, 0) << "bad crc in data " << data_crc << " != exp " << footer.data_crc
<< " from " << conn->get_peer_addr() << dendl;
ldout(cct, 20) << " ";
data.hexdump(*_dout);
*_dout << dendl;
Expand Down

0 comments on commit 7ebc1d5

Please sign in to comment.