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

Small memory leak with 4.3.4 from get_buffer #4694

Open
dembekadam opened this issue Jun 10, 2024 · 0 comments
Open

Small memory leak with 4.3.4 from get_buffer #4694

dembekadam opened this issue Jun 10, 2024 · 0 comments

Comments

@dembekadam
Copy link

Issue description

We use zmq PUB SUB sockets to have allocations in Kubernetes pods to communicate with each other over TCP.
We usually send several messages per second.

When monitoring pod size and RSS of our application we see small increase every few hours. around 2-3 MB per day.
We have a wrapper for memory allocation build in that monitor each memory allocation and free with stack trace similar to tools like valgrind.

Evey few hours it reports possible leak from

/3rdparty/build_3rd_party_libraries_rocky8/Zmq/source/src/decoder.hpp:72
_ZN3zmq20stream_engine_base_t17in_event_internalEv
/3rdparty/build_3rd_party_libraries_rocky8/Zmq/source/src/stream_engine_base.cpp:280
_ZN3zmq20stream_engine_base_t13restart_inputEv
/3rdparty/build_3rd_party_libraries_rocky8/Zmq/source/src/stream_engine_base.cpp:461
_ZN3zmq14session_base_t15write_activatedEPNS_6pipe_tE
/3rdparty/build_3rd_party_libraries_rocky8/Zmq/source/src/session_base.cpp:332
_ZN3zmq11io_thread_t8in_eventEv
/3rdparty/build_3rd_party_libraries_rocky8/Zmq/source/src/io_thread.cpp:91

The issue seams similar to #2830 but leak is only observer few times a day and not for each message.

Environment

  • libzmq version (commit hash if unreleased):
  • OS: Rocky 8 ZMQ 4.3.4 CZMQ 4.2.1

Minimal test code / Steps to reproduce the issue

What's the actual result? (include assertion message & call stack if applicable)

Small increase in process RSS size continues to grow for 30 days in row .

What's the expected result?

No memory leak

@dembekadam dembekadam changed the title Small memory leak with 4.3.4 Small memory leak with 4.3.4 from get_buffer Jun 10, 2024
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

1 participant