Comments (5)
Hard to say what the issue is, especially since it happens only sometimes. Maybe Hello/HelloACK is not received at all but I don't know why that would happen either.
from uvgrtp.
I have also replicated this issue on Windows while improving the ZRTP multistream example.
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 105
[RTPLIB][ERROR][::log_platform_error] ZRTP message length is not divisible by 32-bit word. Type: Hello : The operation completed successfully.
0
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 22
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 28
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 3
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 105
[RTPLIB][ERROR][::log_platform_error] ZRTP message length is not divisible by 32-bit word. Type: Hello : The operation completed successfully.
0
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 22
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 28
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 3
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][ERROR][::init_dhm] Session initialization failed, ZRTP cannot be used!
[RTPLIB][WARNING][::init] Failed to initialize ZRTP for media stream!
[RTPLIB][ERROR][::create_stream] Failed to initialize media stream 127.0.0.1:7778/8890
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][ERROR][::init_dhm] Session initialization failed, ZRTP cannot be used!
[RTPLIB][WARNING][::init] Failed to initialize ZRTP for media stream!
[RTPLIB][ERROR][::create_stream] Failed to initialize media stream 127.0.0.1:8888/7776
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 105
[RTPLIB][ERROR][::log_platform_error] ZRTP message length is not divisible by 32-bit word. Type: Hello : The operation completed successfully.
0
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 22
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 28
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 3
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 105
[RTPLIB][ERROR][::log_platform_error] ZRTP message length is not divisible by 32-bit word. Type: Hello : The operation completed successfully.
0
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 22
[RTPLIB][DEBUG][::alloc_zrtp_frame] Allocate ZRTP frame, packet size 28
[RTPLIB][DEBUG][::set_zrtp_start_base] Constructed ZRTP header. Length: 3
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::recv_msg] Receiving a ZRTP message
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][ERROR][::init_dhm] Session initialization failed, ZRTP cannot be used!
[RTPLIB][WARNING][::init] Failed to initialize ZRTP for media stream!
[RTPLIB][ERROR][::create_stream] Failed to initialize media stream 127.0.0.1:7776/8888
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][DEBUG][::~zrtp_message] Freeing zrtp message...
[RTPLIB][ERROR][::init_dhm] Session initialization failed, ZRTP cannot be used!
[RTPLIB][WARNING][::init] Failed to initialize ZRTP for media stream!
[RTPLIB][ERROR][::create_stream] Failed to initialize media stream 127.0.0.1:8890/7778
[RTPLIB][DEBUG][::~receiver] destroy receiver
[RTPLIB][DEBUG][::~receiver] destroy receiver
from uvgrtp.
I also think I encountered this problem when doing my example improvements and testing the new examples.
from uvgrtp.
I managed to figure out the reason for this bug. uvgRTP currently has race-condition when it comes to multithreaded creation of multiple media_streams with ZRTP. Which media_stream performs the Diffie-Hellman is not deterministic and this can lead to mismatches between ends as they may select different media_streams for the task, which then is never completed. Concretely, the issue is which thread can first lock this mutex.
This bug does not show up when:
- Only one media_stream is needed
- All needed media_streams are created in the same thread
Tasks:
- Fix ZRTP_Multistream example
- Document the safe usage of zrtp
- Maybe add an enum value to API that makes it possible to select the media_stream that performs DH. This enum should have the default value, which would correspond to current behavior.
from uvgrtp.
Fixed by 8b05132
I made it so that the Diffie-Hellman exchange is performed always unless the user specifies which stream does not perform DH.
ZRTP did fail once for me even after this fix, but I have been unable to replicate it. If the problem appears again, a new issue can be created. All in all, now multistream usage of ZRTP should be much more reliable.
from uvgrtp.
Related Issues (20)
- Compilation on Nanopi board HOT 3
- RTCP interval issues HOT 2
- A mistake for APP packet payload copying HOT 1
- Python API HOT 1
- Failed to flush the message queue HOT 15
- RTP header extension HOT 2
- uint8 overflow in a test HOT 2
- H264 Failed to flush the message queue HOT 16
- H265 Failed to flush the message queue HOT 3
- Streaming H264 video HOT 2
- Visual Studio Library Linking Documentation HOT 2
- Not Receiving RTP Packets from FFmpeg HOT 5
- H26x: Aggregation causes NAL units to be sent in different order HOT 5
- H26x incorrectly detected start code if preceded by 0x1 HOT 1
- H26x 00 01 00 detected as start code at certain alignments HOT 3
- bug in reception_flow.cc HOT 3
- error in uvgrtp::formats::h26x::packet_handler HOT 2
- [Android] Library fails to compile (at least for old SDK level 21) HOT 2
- rtcp_sender_report::report_blocks is always empty HOT 4
- Null pointer in rtp.cc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uvgrtp.