From 7ebc1d54492f5fa1ea5d8793cef85831cb7fe2e6 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 17 Apr 2019 15:27:22 -0700 Subject: [PATCH] msg: output peer address when detecting bad CRCs Fixes: http://tracker.ceph.com/issues/39367 Signed-off-by: Greg Farnum (cherry picked from commit 19679231fc32daa405cc060847a02ac1cfd51300) --- src/msg/Message.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/msg/Message.cc b/src/msg/Message.cc index d87b217c65f25..66060fd3f33b6 100644 --- a/src/msg/Message.cc +++ b/src/msg/Message.cc @@ -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; @@ -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; @@ -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; -- 2.39.5