{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/385","repository_url":"https://api.github.com/repos/eclipse/paho.mqtt.c","labels_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/385/comments","events_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/385/events","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/385","id":278164786,"number":385,"title":"Segmentation faults during disconnect and failed reconnect attempt","user":{"login":"JuergenKosel","id":17272123,"avatar_url":"https://avatars2.githubusercontent.com/u/17272123?v=4","gravatar_id":"","url":"https://api.github.com/users/JuergenKosel","html_url":"https://github.com/JuergenKosel","followers_url":"https://api.github.com/users/JuergenKosel/followers","following_url":"https://api.github.com/users/JuergenKosel/following{/other_user}","gists_url":"https://api.github.com/users/JuergenKosel/gists{/gist_id}","starred_url":"https://api.github.com/users/JuergenKosel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuergenKosel/subscriptions","organizations_url":"https://api.github.com/users/JuergenKosel/orgs","repos_url":"https://api.github.com/users/JuergenKosel/repos","events_url":"https://api.github.com/users/JuergenKosel/events{/privacy}","received_events_url":"https://api.github.com/users/JuergenKosel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2017-11-30T15:36:44Z","updated_at":"2017-12-05T15:42:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Hello,\r\n\r\nwhile continuing testing for issue #373 a segmentation fault was caused in the following line:\r\nhttps://github.com/eclipse/paho.mqtt.c/blob/c85e4a2fd6e96ebc35caef99a024d94c9b664ba0/src/MQTTAsync.c#L1099\r\n\r\nOutput from gdb:\r\n```\r\nProgram terminated with signal 11, Segmentation fault.\r\n#0  0x0fed5b98 in MQTTAsync_freeCommand1 (command=0x0) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1024\r\n1024\t\tif (command->command.type == SUBSCRIBE)\r\n(gdb) up\r\n#1  0x0fed5d50 in MQTTAsync_freeCommand (command=0x0) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1054\r\n1054\t\tMQTTAsync_freeCommand1(command);\r\n(gdb) up\r\n#2  0x0fed5f68 in MQTTAsync_writeComplete (socket=26) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1105\r\n1105\t\t\t\tMQTTAsync_freeCommand(com);\r\n(gdb) bt\r\n#0  0x0fed5b98 in MQTTAsync_freeCommand1 (command=0x0) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1024\r\n#1  0x0fed5d50 in MQTTAsync_freeCommand (command=0x0) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1054\r\n#2  0x0fed5f68 in MQTTAsync_writeComplete (socket=26) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1105\r\n#3  0x0feed364 in Socket_continueWrites (pwset=0x54084bcc) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/Socket.c:822\r\n#4  0x0feeba00 in Socket_getReadySocket (more_work=0, tp=0x54084c8c) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/Socket.c:264\r\n#5  0x0fedb7dc in MQTTAsync_cycle (sock=0x54084d28, timeout=1000, rc=0x54084d24) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:2916\r\n#6  0x0fed7cb0 in MQTTAsync_receiveThread (n=0x102bda84) at /home/klj/echo-sources-git-svn-full/paho.mqtt.c/src/MQTTAsync.c:1740\r\n#7  0x0e842a6c in ?? ()\r\n#8  0x0e4ec8a0 in ?? ()\r\n```"},"comment":{"url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/comments/349343363","html_url":"https://github.com/eclipse/paho.mqtt.c/issues/385#issuecomment-349343363","issue_url":"https://api.github.com/repos/eclipse/paho.mqtt.c/issues/385","id":349343363,"user":{"login":"JuergenKosel","id":17272123,"avatar_url":"https://avatars2.githubusercontent.com/u/17272123?v=4","gravatar_id":"","url":"https://api.github.com/users/JuergenKosel","html_url":"https://github.com/JuergenKosel","followers_url":"https://api.github.com/users/JuergenKosel/followers","following_url":"https://api.github.com/users/JuergenKosel/following{/other_user}","gists_url":"https://api.github.com/users/JuergenKosel/gists{/gist_id}","starred_url":"https://api.github.com/users/JuergenKosel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuergenKosel/subscriptions","organizations_url":"https://api.github.com/users/JuergenKosel/orgs","repos_url":"https://api.github.com/users/JuergenKosel/repos","events_url":"https://api.github.com/users/JuergenKosel/events{/privacy}","received_events_url":"https://api.github.com/users/JuergenKosel/received_events","type":"User","site_admin":false},"created_at":"2017-12-05T15:41:59Z","updated_at":"2017-12-05T15:41:59Z","author_association":"CONTRIBUTOR","body":"With the latest update to pull request #384 I see the following result:\r\n```\r\n20171205 163536.573 connectCnt 39\r\n\r\n20171205 163803.873 Disconnected from MQTT broker reason (null)\r\n20171205 163803.873 Failed to queue message for send with retvalue -3\r\n20171205 163803.973 Connected 0 connectCnt 39\r\n\r\n20171205 163803.973 PublishCnt 2934339, FailedCnt 65, Pending 48725 maxPending 109866\r\n20171205 163803.973 MQTT mem current 10915872, max 24611920\r\n20171205 163803.973 Connected 0 connectCnt 39\r\n\r\n20171205 163803.973 PublishCnt 2934339, FailedCnt 65, Pending 48725 maxPending 109866\r\n20171205 163803.973 MQTT mem current 10916016, max 24611920\r\n20171205 163803.981 Established MQTT connection to SLGB-VM-MQTTSRV.inat.internal:1883\r\n20171205 163803.981   MQTT version 3.1.1\r\n\r\n20171205 163803.981 connectCnt 40\r\n\r\n20171205 163811.974 PublishCnt 2938667, FailedCnt 65, Pending 44397 maxPending 109866\r\n20171205 163811.974 MQTT mem current 9946448, max 24611920\r\n20171205 163811.974 PublishCnt 2938667, FailedCnt 65, Pending 44397 maxPending 109866\r\n20171205 163811.974 MQTT mem current 9946592, max 24611920\r\n20171205 163812.290 Some memory not freed at shutdown, possible memory leak\r\n20171205 163812.290 Heap scan start, total 256 bytes\r\n20171205 163812.290 Heap element size 32, line 766, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTProtocolClient.c, ptr 0x55b3a5e1c370\r\n20171205 163812.290   Content           \r\n20171205 163812.290 Heap element size 32, line 215, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTProtocolClient.c, ptr 0x7fdb0c001bb0\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 16, line 696, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTPacket.c, ptr 0x7fdb0c002cf0\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 16, line 231, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTPacket.c, ptr 0x7fdb0c002d10\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 16, line 696, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTPacket.c, ptr 0x7fdb0c002f20\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 16, line 231, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTPacket.c, ptr 0x7fdb0c003260\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 32, line 95, file /home/klj/org.eclipse.paho.mqtt.c/src/LinkedList.c, ptr 0x7fdb0c003650\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 32, line 95, file /home/klj/org.eclipse.paho.mqtt.c/src/LinkedList.c, ptr 0x7fdb0c003710\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 16, line 106, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTProtocolClient.c, ptr 0x7fdb0c0037b0\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap element size 48, line 232, file /home/klj/org.eclipse.paho.mqtt.c/src/MQTTProtocolClient.c, ptr 0x7fdb0c0038e0\r\n20171205 163812.371   Content           \r\n20171205 163812.371 Heap scan end\r\n20171205 163812.500 MQTT mem current 256, max 24611920\r\n20171205 163812.500 verdict fail\r\n```"}}
{"actor":{"display_login":"JuergenKosel"}}