Project

General

Profile

Bug #16122

msg: upper 32-bits of message sequence get lost

Added by Zheng Yan almost 8 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
jewel, hammer
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

struct ceph_msg_header {
        __le64 seq;       /* message seq# for this session */
...
};

class Message : public RefCountedObject {
...
  uint64_t get_seq() const { return header.seq; }
  void set_seq(uint64_t s) { header.seq = s; }
...
}

Message sequence is 64-bits number, but the upper 32-bits get lost when setting/getting message's sequence.

void Pipe::reader()
{
...
      if (m->get_seq() <= in_seq) {
        ldout(msgr->cct,0) << "reader got old message " 
                << m->get_seq() << " <= " << in_seq << " " << m << " " << *m
                << ", discarding" << dendl;
        msgr->dispatch_throttle_release(m->get_dispatch_throttle_size());
        m->put();
        if (connection_state->has_feature(CEPH_FEATURE_RECONNECT_SEQ) &&
            msgr->cct->_conf->ms_die_on_old_message)
          assert(0 == "old msgs despite reconnect_seq feature");
        continue;
      }
...
}

When in_seq is 0xffffffff, Pipe::reader expects the incoming message's sequence to be 0x100000000. But m->get_seq() return 0. So the incoming message gets dropped.


Related issues

Related to Ceph - Bug #17910: rgw: threads were stuck by discarded osd_op_reply message Duplicate 11/15/2016
Copied to Ceph - Backport #18219: jewel: msg: upper 32-bits of message sequence get lost Resolved
Copied to Ceph - Backport #18220: hammer: msg: upper 32-bits of message sequence get lost Rejected

History

#1 Updated by Zheng Yan almost 8 years ago

  • Status changed from New to Fix Under Review

#2 Updated by Yehuda Sadeh over 7 years ago

  • Status changed from Fix Under Review to Pending Backport
  • Backport set to jewel, hammer

#3 Updated by Yehuda Sadeh over 7 years ago

  • Related to Bug #17910: rgw: threads were stuck by discarded osd_op_reply message added

#4 Updated by Nathan Cutler over 7 years ago

  • Copied to Backport #18219: jewel: msg: upper 32-bits of message sequence get lost added

#5 Updated by Nathan Cutler over 7 years ago

  • Copied to Backport #18220: hammer: msg: upper 32-bits of message sequence get lost added

#6 Updated by Nathan Cutler almost 7 years ago

  • Status changed from Pending Backport to Resolved

#7 Updated by Greg Farnum about 5 years ago

  • Project changed from Ceph to Messengers
  • Category deleted (msgr)

Also available in: Atom PDF