Skip to content
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

Issue with STUN for consent refresh (RFC7675) #58

Open
mglettig opened this issue Jun 14, 2022 · 4 comments
Open

Issue with STUN for consent refresh (RFC7675) #58

mglettig opened this issue Jun 14, 2022 · 4 comments

Comments

@mglettig
Copy link

mglettig commented Jun 14, 2022

In my setup I have a WebRTC data channel that I use to transfer relatively big data packages of ~30 MB. I observed connection closings when running the code on my embedded system (Jetson Nano). I investigated the errors and noticed that this line here is hit:

self.__log_info("Consent to send expired")

Root cause of that were 6 TransactionTimeouts: https://github.com/aiortc/aioice/blob/main/src/aioice/stun.py#L306 that were accumulated during the entire transfer.

I actually don't know why those timeouts happen (it is reproducible). But upon further digging into the code I notice that no retransmissions are done upon a failure: https://github.com/aiortc/aioice/blob/main/src/aioice/ice.py#L965

I would suggest to increase the retransmissions to at least 1. Or is there a particular reason for setting it to 0?

If anybody would have ideas for the root cause of my TransactionTimeouts it would be very welcome. Could a high system load (sending the data over the datachannel) lead to timeouts because the system misses to answer the Consent checks in time?

If it is of any help: I have wireshark traces of the STUN packages.

@mglettig mglettig changed the title Issue with STUN for consent refresh (RF7675) Issue with STUN for consent refresh (RFC7675) Jun 15, 2022
@jlaine
Copy link
Collaborator

jlaine commented Jun 16, 2022

I'm not sure we should be doing retransmissions here, wouldn't this throw off the frequency of these requests? It seems odd to me that you're getting 6 consecutive fails?

@mariokrous
Copy link

mariokrous commented Mar 30, 2023

I faced the same issue ( consent to send refresh) when I tried having multiple threads running together into the same process.
I assume that GIL was busy with other stuff and aioice could not get the control and send the consent message.
After spawning some processes, the issue resolved.

I can provide more info regarding that but it's not an aioice issue. It mainly relies on the software architecture of your project.

@jlaine
Copy link
Collaborator

jlaine commented Apr 1, 2023

In the light of @mariokrous's feedback I'm tmpted to close this issue.

@maksimu
Copy link

maksimu commented Dec 21, 2023

I faced the same issue ( consent to send refresh) when I tried having multiple threads running together into the same process. I assume that GIL was busy with other stuff and aioice could not get the control and send the consent message. After spawning some processes, the issue resolved.

I can provide more info regarding that but it's not an aioice issue. It mainly relies on the software architecture of your project.

@mariokrous
can you clarify what did you mean by "spawning some processes"? I'm encountering an error and it is only happening on Windows for some reason, but works well on Linux and Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants