-
Notifications
You must be signed in to change notification settings - Fork 866
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
[BUG] Two caller in different processes may generate same group id. #1838
Comments
I have tried a simple fix by myself https://github.com/gou4shi1/srt/commit/e94227cd98eda1b58bb8872a050e4ca88d3efa1a.diff |
No, streamid is an optional setting to be interpreted by the user application, and it's empty by default. The problem must be somewhere else. Can you provide me with more information about the case you conducted? Meaning from which host you have callers and where the listener is etc. I think there's one check lacking - if you found a matching peer group, it should be checked that it has come from the same server as the existing sockets, while peer group ID should not be itself a sufficing peer group ID. |
Both callers and listener are localhost. |
Wait. But there are two callers running in two different SRT applications? |
YES. |
Potentially some additional Unique Identifier has to be included in the Group Membership extension.
|
Yes, and then the key for the group peer map would be a 64-bit value consisting of the group ID and UID. This way, this facility could be used like before. |
Beside the group id conflict problem, does socket id confliction will cause server error? Also, can we use |
I'm afraid, not.
|
And whether the problem could exist with two peer sockets with two different IDs I'm only about to check. But I don't think there's a problem here - you can associate a socket with a peer socket only once. Second socket, even if with the same ID, could only be associated with a different socket, as well as when sending a packet the DESTINATION socket ID is used. |
Ok, I was unprecise: Not as the only way - it can be added as an alternative and used when compiling in C++11 mode. |
Status log. |
Describe the bug
I launched three caller processes on my desktop at the same time, they will push different videos to the same server, but two callers generated same socket id sequence, and server considered they are from same group :(
Here is the server debug log https://1drv.ms/u/s!AuaosNlJ5ELxjyxer5F6zlUwraBx?e=qSoAW4
May be it's because the seed of
srand()
are same?Can I use stream id as group id?
Expected behavior
Different processes should not generate same group id.
Desktop (please provide the following information):
The text was updated successfully, but these errors were encountered: