Hello, dear developers of mosquitto!
Recently I have made a series of tests with _modified_ version
mosquitto (modified by me) and experienced a memory leak.
The problem with detecting this leak is that I use a very
specific environment with does not allow using valgrind,
sanitizer, whatever else.
So, I would like to describe the use case which I have made and
ask if mosquitto was tested like that or not.
The configuration is following:
- there is a broker #1 which runs on device
- there is a broker #2 which runs on some cloud service
- broker #1 creates a secure bridge (mbedTLS connection) with
broker #2
- there are some clients of broker #1 which send data to each
other and over the bridge into the cloud
The situation which leads to memory leak:
- broker #2 decides for some reasons (I do now know why) to
disconnect the created bridge
- broker #1 detects that it has been disconnected and tries to
reconnect
- broker #1 reconnects and continue to send the data
- steps 1-3 repeats 5-10 times
- broker #1 experience memory leak
I have tested several times (tests we actually quite long - about
3-5 days) on several devices. And memory leak situation (some
applications crashed with OOM error) was very stable on device
which was disconnected. Instead, another device (identical
hardware and software) ran stably during our tests and it was not
disconnected from the cloud.
Of course, the memory leak could be introduced by my changes of
mosquitto. Unfortunately, I have no possibility to investigate
this issue due to H/W restrictions. Probably, running such test
for stable mosquitto under Linux could clarify this situation.
I will be happy to answer any of your questions.
Kind regards,
Sergey.
_______________________________________________