Skip to content

epmd: Fix regression introduced in e522e738e - #11409

Merged
jhogberg merged 1 commit into
erlang:maintfrom
jhogberg:john/erts/fix-epmd-regression/OTP-20275
Aug 3, 2026
Merged

epmd: Fix regression introduced in e522e738e#11409
jhogberg merged 1 commit into
erlang:maintfrom
jhogberg:john/erts/fix-epmd-regression/OTP-20275

Conversation

@jhogberg

Copy link
Copy Markdown
Contributor

Fixes #11402

Copilot AI review requested due to automatic review settings July 30, 2026 18:50
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

CT Test Results

  2 files   12 suites   7m 57s ⏱️
129 tests 123 ✅ 6 💤 0 ❌
145 runs  139 ✅ 6 💤 0 ❌

Results for commit e3d12c3.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes an epmd regression where binding an implicitly-added IPv6 (or IPv4) loopback socket could cause epmd to exit on systems where that loopback/protocol stack is unavailable (e.g., IPv6 disabled), even when users explicitly configure an IPv4-only address like ERL_EPMD_ADDRESS=127.0.0.1.

Changes:

  • Reworks “nonfatal bind failure” tracking from an index threshold to a per-socket bitmask.
  • Marks implicitly-added loopback sockets (v4/v6) as nonfatal so bind failures are logged but do not terminate epmd.
  • Updates the bind failure path to consult the nonfatal socket bitmask and continue after closing the failed socket.
Comments suppressed due to low confidence (2)

erts/epmd/src/epmd_srv.c:389

  • Use an unsigned shift when building the nonfatal socket bitmask to avoid signed left-shift pitfalls and make the intent explicit.
          nonfatal_sockets |= (1 << num_sockets);

erts/epmd/src/epmd_srv.c:513

  • Use an unsigned shift when checking the nonfatal socket bitmask to avoid signed left-shift pitfalls and make the intent explicit.
              if (!(nonfatal_sockets & (1 << i))) {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread erts/epmd/src/epmd_srv.c
@jhogberg jhogberg self-assigned this Jul 31, 2026
@rickard-green rickard-green added the team:VM Assigned to OTP team VM label Aug 3, 2026
@jhogberg
jhogberg requested a review from rickard-green August 3, 2026 09:19
@jhogberg
jhogberg merged commit 024e59f into erlang:maint Aug 3, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GHSA-h6f3-hx58-xhj6 fix breaks ERL_EPMD_ADDRESS=127.0.0.1 on IPV4-only systems

3 participants