-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Misleading Telegram fallback log + dead-code remote-IP retry on EADDRNOTAVAIL #94620
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
When the host hits a kernel-side local socket allocation failure (
EADDRNOTAVAILonconnect()), the gateway logs:Two problems:
1. Misleading message
EADDRNOTAVAILis a local allocation failure — the kernel can't assign a source address/port for the new socket. DNS resolved fine, and the remote IP isn't unreachable (ICMP works to other destinations). The message points triage at the remote ("Telegram is down") when the actual symptom is local socket resource exhaustion or a network-extension policy wedge.2. Fallback logic is dead code for this errno class
The fallback retries an alternative Telegram API IP. But changing the remote IP cannot fix a local source-address-assignment failure. Every retry will hit the same errno. This wastes time and produces more misleading log noise during an incident.
Real-world impact
Hit this on 2026-06-18 during a host-wide TCP outage. The misleading log sent initial triage toward Telegram availability checks before discovering plain
nc -vz 127.0.0.1 18789was also failing withCan't assign requested address— i.e. a kernel-layer issue affecting all destinations including loopback.Suggested fix
EADDRNOTAVAIL(errno 49 on macOS, 99 on Linux) at the undici/fetch boundary.Repro
Trigger any condition that causes
connect()to fail withEADDRNOTAVAIL(e.g. exhaust ephemeral ports, wedge a Network Extension). Watch the gateway log the misleading fallback and uselessly try the alternative IP.Environment