From 19679231fc32daa405cc060847a02ac1cfd51300 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 --- 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 89cbd690fb39b..176b40b5a17b5 100644 --- a/src/msg/Message.cc +++ b/src/msg/Message.cc @@ -298,7 +298,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; @@ -307,7 +308,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; @@ -320,7 +322,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