Skip to content

helper: Bound internet checks so a DNS hang is not INTERNET_CHECK_FAIL - #4178

Merged
patrickelectric merged 4 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix/helper-internet-check-timeout
Aug 25, 2026
Merged

helper: Bound internet checks so a DNS hang is not INTERNET_CHECK_FAIL#4178
patrickelectric merged 4 commits into
bluerobotics:masterfrom
joaoantoniocardoso:fix/helper-internet-check-timeout

Conversation

@joaoantoniocardoso

@joaoantoniocardoso joaoantoniocardoso commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

Helper's internet check waited for every website probe, including DNS lookups that ignore the 5s socket timeout. A lost UDP query to 8.8.8.8 costs glibc ~10s, which matches the frontend's 10s Axios deadline, so the UI showed INTERNET_CHECK_FAIL while ICMP still worked.

  • check_internet_access now returns within 4s. Sites still resolving are online: false, error: "timeout" — not a failed network. In-flight probes are reused so a hung DNS lookup cannot queue a second worker.
  • Website probes use HEAD. Per-site results cache for 20s; the overall check caches for 25s to cover overlapping UI polls (20s).
  • Service scans skip Zenoh REST/scout (7117/7447). In-flight temporary_cache calls coalesce per args.
  • The unused periodic internet check is gone. Factory-mode HTTP still runs off the event loop.
  • The UI keeps the last verdict until three polls in a row fail, and does not treat Helper budget timeouts as offline. web_services polling is 10s so scans no longer stack every 5s.

Fixes #4176

Test plan

  • Open BlueOS with working internet: globe is online, notifications stay empty
  • GET /helper/latest/check_internet_access returns in well under 10s (Pi retest: 200 in ~19ms, all five sites online; cached/concurrent polls 12–25ms)
  • Helper logs no 1s timeouts on Zenoh 7447/7117 after restart
  • A single timed-out Axios poll does not clear has_internet or raise INTERNET_CHECK_FAIL
  • All-timeout Helper responses do not flip the UI to OFFLINE

@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review August 18, 2026 20:50
@github-actions

This comment was marked as resolved.

@joaoantoniocardoso
joaoantoniocardoso marked this pull request as draft August 18, 2026 20:54
@joaoantoniocardoso
joaoantoniocardoso force-pushed the fix/helper-internet-check-timeout branch from caebd3d to e4e69b9 Compare August 18, 2026 21:08
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review August 18, 2026 23:44
@joaoantoniocardoso joaoantoniocardoso added the move-to-stable Needs to be cherry-picked and move to stable label Aug 18, 2026
@joaoantoniocardoso
joaoantoniocardoso requested a review from a team August 19, 2026 00:14
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as draft August 19, 2026 00:18
@joaoantoniocardoso
joaoantoniocardoso marked this pull request as ready for review August 19, 2026 00:40
@joaoantoniocardoso
joaoantoniocardoso force-pushed the fix/helper-internet-check-timeout branch from b2d40cd to 1b61a18 Compare August 19, 2026 00:49
@patrickelectric
patrickelectric merged commit 29cdf07 into bluerobotics:master Aug 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

move-to-stable Needs to be cherry-picked and move to stable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: INTERNET_CHECK_FAIL 10s timeout despite working internet (slowest-probe wait = Axios deadline)

3 participants