Multiple simultaneous connections seg faults
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mosquitto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
root@horton:
mosquitto version 0.11.1 (build date 2011-06-21 12:30:43+0000) starting
I'm using the PHP MQTT Client and can reliably crash the broker. Here's the log file, showing the problem.
Jun 24 11:36:35 horton mosquitto[25024]: New client connected from 127.0.0.1.
Jun 24 11:36:35 horton mosquitto[25024]: Received CONNECT from 127.0.0.1 as PHP MQTT Client
Jun 24 11:36:35 horton mosquitto[25024]: Sending CONNACK to PHP MQTT Client (0)
Jun 24 11:36:35 horton mosquitto[25024]: Received PUBLISH from PHP MQTT Client (d0, q0, r0, m0, 'us/co/montrose/121 Apollo/
Jun 24 11:36:35 horton mosquitto[25024]: Sending PUBLISH to python_sub (d0, q0, r0, m0, 'us/co/montrose/121 Apollo/
Jun 24 11:36:35 horton mosquitto[25024]: Received DISCONNECT from PHP MQTT Client
Jun 24 11:36:35 horton mosquitto[25024]: New client connected from 127.0.0.1.
Jun 24 11:36:35 horton mosquitto[25024]: New client connected from 127.0.0.1.
Jun 24 11:36:35 horton mosquitto[25024]: Received CONNECT from 127.0.0.1 as PHP MQTT Client
Jun 24 11:36:35 horton mosquitto[25024]: Sending CONNACK to PHP MQTT Client (0)
Jun 24 11:36:35 horton mosquitto[25024]: Client PHP MQTT Client already connected, closing old connection.
Jun 24 11:36:35 horton mosquitto[25024]: Received CONNECT from 127.0.0.1 as PHP MQTT Client
Jun 24 11:36:35 horton mosquitto[25024]: Sending CONNACK to PHP MQTT Client (0)
Jun 24 11:36:35 horton kernel: [1355952.129433] mosquitto[25024]: segfault at 10 ip 08051853 sp bfd5b850 error 4 in mosquitto[
I'm publishing key/value pairs from php script on apache2.
$mqtt = new phpMQTT(
if ($mqtt->connect()) {
}
It looks like apache's threading is connecting with the same id and mosquitto is closing old connection incorrectly.
Jun 24 11:36:35 horton mosquitto[25024]: Client PHP MQTT Client already connected, closing old connection.
then I get the seg fault.
My workaround is randomizing the login id on the php side.
Changed in mosquitto: | |
milestone: | none → 0.11.2 |
status: | New → Fix Released |
Changed in mosquitto: | |
status: | Fix Released → In Progress |
I'm quite certain this is effectively a duplicate of #799688 but with different symptoms.