Skip to content

Failed to read thread allocated/de-allocated bytes: mallctl: not using jemalloc #134

@guodong

Description

@guodong

Please use this template for reporting suspected bugs or requests for help.

Issue Description

I have built OpenR and tested it in a mininet env. But the log on each instance shows the following error:

E0708 02:45:17.745582 266847 Util.cpp:190] Failed to read thread allocated/de-allocated bytes: mallctl: not using jemalloc

Environment

  • tag or commit hash on which this occured: 660c13e
  • OS version: Ubuntu 20.04

It seems that the error is not fatal to break OpenR, is it an incorrect invoke of folly?

Code in Util.cpp that throws the error:

uint64_t
getThreadBytesImpl(bool isAllocated) {
  uint64_t bytes{0};
  const char* cmd = isAllocated ? "thread.allocated" : "thread.deallocated";
  try {
    folly::mallctlRead(cmd, &bytes);
  } catch (const std::exception& ex) {
    XLOG(ERR) << "Failed to read thread allocated/de-allocated bytes: "
              << ex.what();
  }
  return bytes;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions