Project

General

Profile

Actions

Bug #22100

closed

ceph_perf_msgr_client only send emtpy requests except the first one

Added by Jeegn Chen over 6 years ago. Updated about 5 years ago.

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

0%

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

Description

The member bufferlist data is claimed after the first invocation of m->write().
As a result, conn->send_message() only send payload of zero length in the following loops.


  class ClientThread : public Thread {
...
    bufferlist data;<<<<<<<<<<<<<<<<<<<<<<<<<<<
    void *entry() override {
      lock.Lock();
      for (int i = 0; i < ops; ++i) {
...
        m->write(0, msg_len, data); <<<<<<<<<<<
        inflight++;
        conn->send_message(m);
        //cerr << __func__ << " send m=" << m << std::endl;
      }
      lock.Unlock();
      msgr->shutdown();
      return 0;
    }

The fix may be


  class ClientThread : public Thread {
...
    bufferlist data;
    void *entry() override {
      lock.Lock();
      for (int i = 0; i < ops; ++i) {
...
        bufferlist msg_data(data); <<<<<<<<<<<<<<<<<<<<<<
        m->write(0, msg_len, msg_data); <<<<<<<<<<<<<<<<<
        inflight++;
        conn->send_message(m);
        //cerr << __func__ << " send m=" << m << std::endl;
      }
      lock.Unlock();
      msgr->shutdown();
      return 0;
    }

Actions #1

Updated by John Spray over 6 years ago

  • Project changed from mgr to RADOS
Actions #3

Updated by Haomai Wang over 6 years ago

  • Status changed from New to Resolved
Actions #4

Updated by Greg Farnum about 5 years ago

  • Project changed from RADOS to Messengers
Actions

Also available in: Atom PDF