-
Notifications
You must be signed in to change notification settings - Fork 605
HTTP2Transport race may lead to deadlock #10
Comments
Thanks for pointing this out @jshslt. We haven't had a chance to dive deep into this yet, but we will definitely investigate the matter to see what we can do. In the meantime, could you expand on the use case of this? More specifically, is this an issue that you actually foresee happening in your production code or just something you noticed as you were going through the code? Thanks! |
@sanjayrd we happened to hit it for real. We've been getting a lot of |
@jshslt - FYI we were also seeing the PENDING->CONNECTED loop you mention. For us it would reliably happen if we accidentally had two clients using the same refresh token. The two clients would essentially ping-pong, causing the server to kick the other off when reconnecting. |
We have confirmed the problem and are working on a fix. Thanks, |
Changes in this update -Implemented Sensory wake word detector functionality -Removed the need for a std::recursive_mutex in MessageRouter -Added AIP unit test -Added handleDirectiveImmediately functionality to SpeechSynthesizer -Added memory profiles for: AIP SpeechSynthesizer ContextManager AVSUtils AVSCommon -Bug fix for MultipartParser.h compiler warning -Suppression of sensitive log data even in debug builds. Use cmake parameter -DACSDK_EMIT_SENSITIVE_LOGS=ON to allow logging of sensitive information in DEBUG builds -Fix crash in ACL when attempting to use more than 10 streams -Updated MediaPlayer to use autoaudiosink instead of requiring pulseaudio -Updated MediaPlayer build to suppport local builds of GStreamer -Fixes for the following Github issues: #5 #8 #9 #10 #17 #24
A fix for this has been pushed in version 0.4.1. |
Hi,
I think there's a race in HTTP2Transport that can lead to deadlock if the
networkLoop
thread tries to signal out a successful connection, while another thread has asked for the network thread to terminate (and is waiting to join).full scenario -
A - if any client thread calls
MessageRouter::disable
. MessageRouter lock is taken.MessageRouter::disconnectAllTransportsLocked
is called. the transports are iterated,HTTP2Transport::disconnect
is called, which callsjoin()
on the SDK network thread.B - SDK network thread, when connection is just established,
HTTP2Transport::networkLoop
calls the onConnected callbackMessageRouter::onConnected
, which tries to take the MessageRouter lock.if B happens while A is in process, deadlock.
please advise?
The text was updated successfully, but these errors were encountered: