Skip to content

Fix EPERM and socket mismatch between selected and succeeded pairs when using bridge (Docker) interfaces. #84

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

Merged
merged 5 commits into from
Jun 30, 2025

Conversation

Karolk99
Copy link
Contributor

Closes #77 #83

@Karolk99 Karolk99 requested a review from mickel8 June 26, 2025 15:24
@Karolk99
Copy link
Contributor Author

The problem with the test test/integration/p2p_test.exs:10 also occurs on the master branch. After initial debugging, the problem occurs when:

  1. Ice state changes to :connected
  2. p2p test tries to send a message using ICEAgent.send_data
  3. Before handling send_data ICEAgent tries to nominate the only existing candidate pair (pair state changes to :waiting than :in_progress
  4. ICEAgent handles send_data message and crashes because there is no pair with state :succeeded

@Karolk99
Copy link
Contributor Author

Potential fixes:

  • only check if valid? attribute is true
  • Don't change pair state to :waiting/:in_progress when trying to nominate a pair.

Copy link
Contributor

@mickel8 mickel8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally, I would give an approve but this time we MUST be very verbose in comments both in the main logic as well as in tests. We spent a lot of time trying to find out what's going on with eperm and how to solve it so it MUST be very well described in comments for future reference. Especially, if it turns out that we are wrong

@mickel8
Copy link
Contributor

mickel8 commented Jun 27, 2025

The problem with the test test/integration/p2p_test.exs:10 also occurs on the master branch. After initial debugging, the problem occurs when:

Nice catch!! Let's move this to a separate PR

Copy link

codecov bot commented Jun 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.91%. Comparing base (7552d06) to head (be6980c).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #84      +/-   ##
==========================================
+ Coverage   83.88%   85.91%   +2.02%     
==========================================
  Files          25       25              
  Lines        1837     1874      +37     
==========================================
+ Hits         1541     1610      +69     
+ Misses        296      264      -32     
Files with missing lines Coverage Δ
lib/ex_ice/priv/ice_agent.ex 87.77% <100.00%> (+1.69%) ⬆️

... and 3 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4854d81...be6980c. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Karolk99 Karolk99 requested a review from mickel8 June 30, 2025 10:16
@mickel8 mickel8 changed the title Fix ICE Runtime Error Fix socket mismatch between selected and succeeded pairs when using bridge interfaces. Jun 30, 2025
@mickel8 mickel8 changed the title Fix socket mismatch between selected and succeeded pairs when using bridge interfaces. Fix EPERM and socket mismatch between selected and succeeded pairs when using bridge interfaces. Jun 30, 2025
@mickel8 mickel8 changed the title Fix EPERM and socket mismatch between selected and succeeded pairs when using bridge interfaces. Fix EPERM and socket mismatch between selected and succeeded pairs when using bridge (Docker) interfaces. Jun 30, 2025
@Karolk99 Karolk99 merged commit b54cc62 into master Jun 30, 2025
4 checks passed
@mickel8 mickel8 deleted the 77/ice-runtime-error branch July 1, 2025 09:21
Karolk99 added a commit that referenced this pull request Jul 8, 2025
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

Successfully merging this pull request may close these issues.

ICE Runtime Error - Selected local candidate's socket is different than succeeded local candidate's socket.
2 participants