-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
segfault when reconnecting after disconnect #7
Comments
Hi @larsonmpdx, Rahul |
Rahul, Thanks. I know you're bound by internal processes and schedules, but I think you should consider a process change to allow hot fix releases for issues like these. This is a bug that affects a wide range of use cases under fairly normal network conditions, and results in a segfault and full program crash. If you have any similar issues being held back I'd appreciate a release ASAP so I can avoid spending time on them myself. Michael |
Hi @larsonmpdx, Rahul |
Hi @larsonmpdx, Rahul |
I get a segfault if I run my perpetual logging application and simulate a network disconnect followed by a reconnect. on reconnect, it sometimes segfaults with this valgrind output:
==66725== Process terminating with default action of signal 11 (SIGSEGV)
==66725== Access not within mapped region at address 0x0
==66725== at 0x758364: awsiotsdk::mqtt::KeepaliveActionRunner::PerformAction(std::shared_ptrawsiotsdk::NetworkConnection, std::shared_ptrawsiotsdk::ActionData) (Connect.cpp:369)
here's a link to the offending line:
https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/src/mqtt/Connect.cpp#L369
I have no subscriptions so this function called on the previous line will return nullptr when given an empty subscription vector:
https://github.com/aws/aws-iot-device-sdk-cpp/blob/master/src/mqtt/Subscribe.cpp#L57
then nullptr is dereferenced in this bit:
p_subscribe_packet->ToString()
I think that's what's happening. I'm working on a fix and PR later today
The text was updated successfully, but these errors were encountered: