Skip to content

Segmentation Fault on disconnect network cable #13

Closed
@Kevin-Tacheny

Description

@Kevin-Tacheny

This is running on a raspberry pi with raspbian.
mqttConnection->Ping(); is getting called every 10 seconds in a thread.

When I disconnect the network cable I get this segmentation fault after about 20-30 seconds

backtrace
#0 0x76ea1ff4 in s_hash_for (state=0x0, key=0x748fed36) at /home/pi/projects/aws-crt-cpp-build/deps/build/src/AwsCCommon/source/hash_table.c:68 #1 0x76ea274c in aws_hash_table_find (map=0x5d41c, key=0x748fed36, p_elem=0x748fed38) at /home/pi/projects/aws-crt-cpp-build/deps/build/src/AwsCCommon/source/hash_table.c:383 #2 0x76dc2a70 in mqtt_create_request (connection=0x5d378, send_request=0x76dc1260 , send_request_ud=0x5d378, on_complete=0x0, on_complete_ud=0x0) at /home/pi/projects/aws-crt-cpp-build/deps/build/src/AwsCMqtt/source/client_channel_handler.c:568 #3 0x76dc13f0 in aws_mqtt_client_connection_ping (connection=0x5d378) at /home/pi/projects/aws-crt-cpp-build/deps/build/src/AwsCMqtt/source/client.c:1288 #4 0x76eeca74 in Aws::Crt::Mqtt::MqttConnection::Ping (this=0x5bbb0) at /home/pi/projects/_crt_0/source/mqtt/MqttClient.cpp:578 #5 0x76f163ac in CAwsSdkInterface::ping (this=0x40368) at /home/pi/projects/iot_layer/src/CAwsSdkInterface.cpp:632 #6 0x76f86968 in connection_thread (ptrCPcsWorkFlow=0x40200) at /home/pi/projects/agent_workflow/sestra-workflow/src/CPcsWorkFlow.cpp:94 #7 0x76f8f5c8 in std::_Bind_simple::_M_invoke<0u>(std::_Index_tuple<0u>) ( this=0x5ef4c) at /usr/include/c++/6/functional:1391 #8 0x76f8f4bc in std::_Bind_simple::operator()() (this=0x5ef4c) at /usr/include/c++/6/functional:1380 #9 0x76f8f494 in std::thread::_State_impl >::_M_run() ( this=0x5ef48) at /usr/include/c++/6/thread:197 #10 0x76c5d9dc in ?? () from /usr/lib/arm-linux-gnueabihf/libstdc++.so.6 #11 0x769b2fc4 in start_thread (arg=0x748ff3d0) at pthread_create.c:458

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions