-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Program exits with SIGABRT or SIGSEGV when using libnice #1299
Comments
The build looks broken, as the earlier warning "Unable to generate ECDSA P-256 key pair" indicates something is very wrong with OpenSSL. You should try running the program in a debugger, but this is probably not related to libdatachannel itself. |
The OpenSSL is from apt on Ubuntu 24.10. When I run it with gdb, it either segfaults or throws SIGABRT. Backtrace when it segfaults:
Backtrace when it throws SIGABRT:
EDIT: It also segfaults sometimes when I run it without gdb. |
OK, this is unrelated to libnice and actually a problem with OpenSSL. The issue is that your test program creates a peer connection then immediately exits. It appears OpenSSL registers an atexit handler to cleanup everything as soon as the main thread exits. In this case, the certificate is created in a background thread during cleanup so it leads to a race condition in OpenSSL. The issue will disappear if the program does not exit immediately, however it could happen in other scenarios at exit so I pushed a fix in #1300. |
If a PeerConnection is created anywhere in the program, the program will die by SIGABRT as soon as it exits. This does not happen when using libjuice. See the example below:
Output:
The text was updated successfully, but these errors were encountered: