-
Notifications
You must be signed in to change notification settings - Fork 1k
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
fix dtls multi-thread crash issue #1409
Conversation
Sample code to reproduce the crash bug, it similar with the constructor of DtlsTransport.cpp (erizo/src/erizo/DtlsTransport.cpp)
the coredump backtrace looks like: |
…o0310/licode into yuanchao0310-bugfix_ssl_multi_threads
Another example code from ffmpeg: |
@yuanchao0310 I submitted a proposal with changes for this PR, including a unit test: yuanchao0310#1 |
Bugfix ssl multi threads (proposal to use std::thread and unit test)
Merged. Please review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks a lot for this contribution @yuanchao0310 !
Description
fix dtls multi-thread crash issue:
refer to:
https://linux.die.net/man/3/crypto_set_locking_callback
http://curl.haxx.se/libcurl/c/opensslthreadlock.html
http://curl.haxx.se/libcurl/c/threaded-ssl.html