Mosquitto: libmosquitto 1.6.6 threaded usage - won't connect

Created on 19 Sep 2019  路  8Comments  路  Source: eclipse/mosquitto

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.

Most helpful comment

A fix will be here today/early tomorrow.

All 8 comments

possibly same regression as https://github.com/eclipse/mosquitto/issues/1385 too?

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鈥榯 specific to ARM cpus.

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.

A fix will be here today/early tomorrow.

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

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

Works for me now too, thanks

I can confirm it is working with the fix.

Was this page helpful?
0 / 5 - 0 ratings