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

libmosquitto 1.6.6 threaded usage - won't connect #1415

Closed
tillz opened this issue Sep 19, 2019 · 8 comments
Milestone

Comments

@tillz
Copy link
Contributor

@tillz tillz commented Sep 19, 2019

After upgrading libmosquitto to version 1.6.6 from the eclipse repository, the threaded interface stopped working for me.
This gist shows a minimal example, which works with libmosquitto 1.6.4 but not with 1.6.6.
I even tried it with mosquitto_connect instead of mosquitto_connect_async, without any difference.
Of course I might just have missed a part of the documentation for the threaded api, however it worked without any problem in older versions.

I already started debugging this problem, it appears that the CONNECT-message is sent successfully, and the server replies with CONNACK, however the connect_callback is never called. Moreover, the mosquitto-thread seems to sleep forever without ever reading from the socket.
Maybe this commit introduced an issue (@ralight?).

Thanks in advance for investigating this issue.

@karlp

This comment has been minimized.

Copy link
Contributor

@karlp karlp commented Sep 23, 2019

possibly same regression as #1385 too?

@tillz

This comment has been minimized.

Copy link
Contributor Author

@tillz tillz commented Sep 23, 2019

I had a look at that issue before opening this one and therefore tested and reproduced the problem on a secondary x86_64 machine (nearly fresh Debian 10). So it seems this isn‘t specific to ARM cpus.

@Pehoh

This comment has been minimized.

Copy link

@Pehoh Pehoh commented Sep 24, 2019

Same issue for me, I use mosquitto on my Ubuntu (16.04) for test purposes, and the connect_callback is never called since the 1.6.6 update.

Edit: I just rolled back to 1.6.0 and everything works fine.

@ralight

This comment has been minimized.

Copy link
Contributor

@ralight ralight commented Sep 24, 2019

A fix will be here today/early tomorrow.

ralight added a commit that referenced this issue Sep 24, 2019
Closes #1415 and #1422. Thanks to Karl Palsson, Till Zimmermann and Liam Fry.
@ralight

This comment has been minimized.

Copy link
Contributor

@ralight ralight commented Sep 24, 2019

If you are able to try out the fixes branch and report back I would appreciate it.

git clone https://github.com/eclipse/mosquitto
cd mosquitto
git checkout fixes
make
@ralight ralight added this to the 1.6.7 milestone Sep 24, 2019
@tillz

This comment has been minimized.

Copy link
Contributor Author

@tillz tillz commented Sep 24, 2019

Thanks for your quick fix, I can confirm everything is working fine again (at least for me) with the fixes branch.

@tillz tillz closed this Sep 24, 2019
@karlp

This comment has been minimized.

Copy link
Contributor

@karlp karlp commented Sep 25, 2019

Works for me now too, thanks

@Pehoh

This comment has been minimized.

Copy link

@Pehoh Pehoh commented Sep 25, 2019

I can confirm it is working with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.