Visitar URL original
memory leak · Issue #732 · streamnative/mop · GitHub
Skip to content

memory leak #732

Description

@hujie6

Describe the bug

when i test mqtt proxy with many connections, memory leak appeared.
image

it seems that bytebuf.release was not be called when decode msg

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]

Additional context
Add any other context about the problem here.

Activity

  1. self-assigned this
    on Aug 4, 2022
  2. hujie6 commented on Aug 18, 2022

    @hujie6
    ContributorAuthor

    case BODY:
    ByteBuf mqttBuf = in.readBytes(header.getBodyLength());
    MqttAdapterMessage adapterMsg = new MqttAdapterMessage(header.version, header.clientId);
    out.add(adapterMsg);
    out.add(mqttBuf);

    readBytes() will create a new ByteBuf, and we add it to the out list, it will be released by netty. however, when i start two thousand clients to pub and sub, mop has occasional memory leaks,and i do not know why.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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