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
Core Dumped when authentication plugin returns MOSQ_ERR_AUTH few times #490
Comments
I also faced somewhat similar issue. Im not a very "C" savvy person
@ralight Assert macro does an application abort on FALSE isnt it? Is it a good idea to have this Assert there since the broker would fail on unsuccessful assertion? Or is it an expected behavior. |
I haven't yet managed to reproduce this, is there anything else you can tell me about the circumstances around when it happens? |
@dhanushkad I was able to do the same and it solved the issue. But not sure why assert(pollfds[context->pollfd_index].fd == context->sock); returns false. @ralight I re-created this issue by returning MOSQ_ERR_AUTH for any username or password that is passed to the auth plugin to connect to the Mosquitto broker. After trying to connect to the broker few times from a web-socket client broker gets
My auth plugin method is as below,
Mosquitto broker configuration file -
|
Do you know what version of libwebsockets you are using? |
I'm using libwebsockets-2.2.1 @ralight |
I believe this is fixed in the commit referenced above. Would you be able to try out the fixes branch to see if it works for you? |
Thank you @ralight ... I'll try out and let you know soon. |
It didn't fix the issue @ralight ..... I get the same error again after returning MOSQ_ERR_AUTH few times
|
Could you try again with this new fix please? |
Thank you @ralight I'll try out now |
@ralight It seems to be working now.. 👍 I'll run it for few days and report you. Thank you so much |
@ralight Broker was running for few days now.. And it seems to be working fine now 👍 |
So, I'm using the latest mosquitto (1.4.14) and libwebsockets-dev v1.7.1-1 and I'm getting this websockets core dump after a couple of failed authentications. Am I missing something? How did you get yours to work exactly @hasunperera? |
Hi, I was having the same problem, building the latest libwebsockets (2.4) and then mosquitto (1.4.14) and mosquitto-auth-plug fixed it for me. |
Closing as the issue seems fixed in latest version. Feel free to reopen if this bug is not fixed. |
This error popups after few seconds when authentication plugin is returning MOSQ_ERR_AUTH with mosquitto broker 1.4.14
loop.c:488: loop_handle_reads_writes: Assertion
pollfds[context->pollfd_index].fd == context->sock' failed. (core dumped)`The text was updated successfully, but these errors were encountered: