Description:
We're experiencing a reproducible crash in the Paho MQTT C++ library during MQTT connection establishment. The crash occurs in the tok->wait() function when waiting for MQTT connection completion.
Crash Details:
Signal: SIGSEGV (Segmentation fault)
Location: pthread_cond_timedwait with abstime=0x0 (NULL pointer)
Stack Trace:
#0 0x76c421e0 in _pthread_cond_timedwait (...)
#1 0x76c4256e in pthread_cond_wait (...)
#2 through #5: std::condition_variable::wait(...)
#6 mqtt::token::wait()
#7 Proxy::init (our application)
Root Cause Analysis:
The crash appears to be caused by signal interruption (likely SIGTERM) during the MQTT library's internal condition variable operations. When a signal interrupts std::condition_variable::wait(), it can corrupt the condition variable's internal state, leading to a NULL pointer being passed to pthread_cond_timedwait.
Description:
We're experiencing a reproducible crash in the Paho MQTT C++ library during MQTT connection establishment. The crash occurs in the tok->wait() function when waiting for MQTT connection completion.
Crash Details:
Signal: SIGSEGV (Segmentation fault)
Location: pthread_cond_timedwait with abstime=0x0 (NULL pointer)
Stack Trace:
#0 0x76c421e0 in _pthread_cond_timedwait (...)
#1 0x76c4256e in pthread_cond_wait (...)
#2 through #5: std::condition_variable::wait(...)
#6 mqtt::token::wait()
#7 Proxy::init (our application)
Root Cause Analysis:
The crash appears to be caused by signal interruption (likely SIGTERM) during the MQTT library's internal condition variable operations. When a signal interrupts std::condition_variable::wait(), it can corrupt the condition variable's internal state, leading to a NULL pointer being passed to pthread_cond_timedwait.