Skip to content

no HTTP timeouts anywhere - a stalled server hangs install/add/search forever #196

Description

@eljulians

Component: crates/sources (http.rs) | Severity: High (UX) | Status: Reproduced

The ureq::Agent is built with only redirect_auth_headers configured; ureq 3.3's default Timeouts are all None (verified in the vendored source), and no call site sets a per-request timeout. Any endpoint that accepts a TCP connection and never responds (half-dead registry, corporate middlebox, wedged raw.githubusercontent edge) blocks the whole command indefinitely - with a spinner on a TTY, in complete silence otherwise. search_all queries registries sequentially, so one hung registry also blocks the others.

Where: crates/sources/src/http.rs:301-312 (UreqClient::new).

Repro (observed): run a loopback listener that accepts and never replies (python3 -c 'import socket;s=socket.socket();s.bind(("127.0.0.1",8942));s.listen();c,_=s.accept();import time;time.sleep(3600)'), point any flow at it (e.g. a url entry, or an HTTP(S)_PROXY for skillfile search docker --no-interactive); the command never returns (killed by external timeout 12, exit 124).

Expected: bounded connect/read timeouts (e.g. 10s connect / 30s read, possibly env-overridable) so a dead endpoint degrades into the existing per-entry/per-registry error paths.
Actual: indefinite hang; no flag or env var to bound it.

Fix sketch: set timeout_connect and timeout_global (or per-request .config().timeout_*) on the agent config in UreqClient::new; map the timeout error to a clear "timed out fetching {url}" message.

Tests:

  1. Unit (crates/sources/src/http.rs): spawn a std::net::TcpListener that accepts and stalls; call get_bytes against it; assert it returns Err within a bound (test with a generous outer deadline).
  2. No functional test needed beyond that (pyramid: this is a transport-layer property; one unit test pins it).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponent: sourcesCross-source architecture and new source backend supportgood first issueGood for newcomershelp wantedExtra attention is neededseverity: highHigh severity bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions