Closed
Description
Describe the bug
[DEBUG] [2023-03-30T11:50:27Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: Received PUBACK packet
[DEBUG] [2023-03-30T11:50:27Z] [00007f25b18af700] [mqtt5-general] - id=0x7f25b18ae2d0: aws_mqtt5_packet_puback_view packet id set to 3
[DEBUG] [2023-03-30T11:50:27Z] [00007f25b18af700] [mqtt5-general] - id=0x7f25b18ae2d0: puback 0 reason code: Success
[INFO] [2023-03-30T11:50:27Z] [00007f25b18af700] [mqtt5-client] - Publish completion callback triggered.
[DEBUG] [2023-03-30T11:50:27Z] [00007f25b18af700] [task-scheduler] - id=0x7f25ac07aba0: Running Mqtt5Service task with status
[DEBUG] [2023-03-30T11:50:27Z] [00007f25b18af700] [task-scheduler] - id=0x7f25ac07aba0: Scheduling Mqtt5Service task for future execution at time 121574941865786
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [task-scheduler] - id=0x7f25ac07aba0: Running Mqtt5Service task with status
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: next PINGREQ scheduled for time 122774964312793
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: queuing PINGREQ
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: enqueuing PINGREQ operation to front
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: setting up encode for a PINGREQ packet
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [mqtt5-client] - id=0x7f25ac07ab70: finished encoding current operation
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [task-scheduler] - id=0x7f2590002460: Scheduling socket_written_task task for immediate execution
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [task-scheduler] - id=0x7f25ac07aba0: Scheduling Mqtt5Service task for future execution at time 121604964385447
[DEBUG] [2023-03-30T12:06:47Z] [00007f25b18af700] [task-scheduler] - id=0x7f2590002460: Running socket_written_task task with status
[INFO] [2023-03-30T12:07:11Z] [00007f25b18af700] [socket] - id=0x7f25900022c0 fd=21: socket is closed.
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [task-scheduler] - id=0x7f2590003910: Scheduling channel_shutdown task for immediate execution
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [channel] - id=0x7f2590003710: Channel shutdown is already pending, not scheduling another.
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [task-scheduler] - id=0x7f2590003910: Running channel_shutdown task with status
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [channel] - id=0x7f2590003710: beginning shutdown process
Mqtt5 Client disconnection with reason: aws-c-io: AWS_IO_SOCKET_CLOSED, socket is closed..
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [channel] - id=0x7f2590003710: handler 0x7f2590014560 shutdown in read dir completed.
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [tls-handler] - id=0x7f2590014690: Shutting down read direction with error code 1051
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [channel] - id=0x7f2590003710: handler 0x7f2590014690 shutdown in read dir completed.
[DEBUG] [2023-03-30T12:07:11Z] [00007f25b18af700] [channel] - id=0x7f2590003710: handler 0x7f25ac07ac38 shutdown in read dir completed.
Segmentation fault
Expected Behavior
This should be continuously connected whether mqtt is in idle state or not.
Current Behavior
After some time MQTT is getting disconnected and Socket getting closed.
Reproduction Steps
Step to reproduce:
- Establish the connection
- publish some data, which working fine.
- receive some data which subscribed.
- leave for some time more than 10 minutes in idle state
- then automatically socket get closed and MQTT get disconnected.
Possible Solution
No response
Additional Information/Context
No response
SDK version used
aws-iot-device-sdk-cpp-v2
Environment details (OS name and version, etc.)
Ubuntu 18.04