deadlock on callback call after sending disconnect from client to server

Bug #1313725 reported by Michael Frommberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mosquitto
Fix Released
Undecided
Unassigned

Bug Description

After sending a disconnect from the client to the server no more callbacks will be called (e.g. connect). It seems that the mosq->callback_mutex blocks after disconnecting. In _mosquitto_packet_write in net_mosq.c line 792 the pthread_mutex_unlock call is missing. the callback_mutex is taken in line 786.

Tested it with mosquitto 1.3.1 and 1.3. Same behaviour.

I attach a patch for mosquitto 1.3.1 which fixes the bug...

Revision history for this message
Michael Frommberger (michael-frommberger) wrote :

And here the patch fro mosquitto 1.3.1

Revision history for this message
Roger Light (roger.light) wrote :

Thanks for this, I implemented the change based on your description rather than looking at the patch, for simplicity.

Changed in mosquitto:
milestone: none → 1.3.2
status: New → Fix Committed
Changed in mosquitto:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.