Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory leak #732

Open
hujie6 opened this issue Aug 4, 2022 · 1 comment
Open

memory leak #732

hujie6 opened this issue Aug 4, 2022 · 1 comment
Assignees

Comments

@hujie6
Copy link
Contributor

hujie6 commented Aug 4, 2022

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.

@hujie6 hujie6 added the type/bug label Aug 4, 2022
@mattisonchao mattisonchao self-assigned this Aug 4, 2022
@hujie6
Copy link
Contributor Author

hujie6 commented Aug 18, 2022

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants