You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BTW... thanks for the full code to test! Very helpful.
At first I couldn't reproduce the error, then realized that I was getting some connect failures due to my 1024 socket limit on Linux. I increased that by 2x and got the segfault.
I ran the code through valgrind but didn't see any memory leaks (which was my first guess).
Then ran it through a debugger, and it appears to be crashing in the underlying Paho C client library on a call to a socket close function. Odd. I don't see any hard table limits for 1000 clients in the C code, but it could be something like that.
Unfortunately, we can't throw an async/tokio Rust app at the C guys to debug, so I probably need to write a similar test of >1000 clients in pure C and see if I can cause the same segfault and post an issue to that project.
I'm sure the first question will be... "Who needs 1000 separate clients in an app?!?!"
With the upgrade to Paho C v1.3.12, this is no longer crashing. Depending on the system and pre-set limits, you may not be able to open that many connections, but at least it's no longer crashing.
I try to create more than 1000 clients and then got
segmentation fault
How to reproduce ?
Use the following code!
Cargo.toml
The text was updated successfully, but these errors were encountered: