Skip to content
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

cURL fails in the latest mac 12.7.4 and 14.4.1 runner releases #9626

Closed
2 of 13 tasks
mmastrac opened this issue Apr 3, 2024 · 7 comments
Closed
2 of 13 tasks

cURL fails in the latest mac 12.7.4 and 14.4.1 runner releases #9626

mmastrac opened this issue Apr 3, 2024 · 7 comments
Assignees
Labels
Area: Common Tools awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug report OS: macOS

Comments

@mmastrac
Copy link

mmastrac commented Apr 3, 2024

Description

Hi all,

For some strange reason, our mac arm64 CI started failing as soon as the runners ticked over to 14.4.1.

It appears that cURL is unable to connect to a localhost or local unix socket for a server that is certainly running at the time.

Example failed run: https://github.com/denoland/deno/actions/runs/8544295631/job/23410919147?pr=23212

Actual output from cURL:

[tls_test 012.13] error: Error: curl https://localhost:50061/d/1 failed: 7:
[tls_test 012.13]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[tls_test 012.13]                                  Dload  Upload   Total   Spent    Left  Speed
[tls_test 012.13] 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[tls_test 012.13] curl: (7) Failed to connect to localhost port 50061 after 0 ms: Couldn't connect to server
[tls_test 012.13] 
[tls_test 012.13]     throw new Error(
[tls_test 012.13]           ^
[tls_test 012.13]     at curl (file:///Users/runner/work/deno/deno/tests/unit/tls_test.ts:1066:11)
[tls_test 012.13]     at eventLoopTick (ext:core/01_core.js:168:7)
[tls_test 012.13]     at async curlFakeHttpsServer (file:///Users/runner/work/deno/deno/tests/unit/tls_test.ts:1078:18)
[tls_test 012.13] 

Build info:

Current runner version: '2.314.1'
Operating System
  macOS
  14.4.1
  23E224
Runner Image
  Image: macos-14-arm64
  Version: 20240402.2
  Included Software: https://github.com/actions/runner-images/blob/macos-14-arm64/20240402.2/images/macos/macos-14-arm64-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macos-14-arm64%2F20240402.2
Runner Image Provisioner
  2.0.361.1+33a726b54233caea13315dba3887b0e7c5a1d482

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • macOS 11
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

20240402.2

https://github.com/denoland/deno/actions/runs/8544295631/job/23410919147?pr=23212

Is it regression?

Yes

Expected behavior

cURL should connect successfully (as it does on other platforms)

Actual behavior

cURL fails to connect with cURL error 7 (failed to connect)

Repro steps

  1. Perform a cURL against a server listening on a localhost port.
  2. cURL fails to connect.
@bartlomieju
Copy link

FWIW the same problem happened on macOS12 too.

@mmastrac
Copy link
Author

mmastrac commented Apr 3, 2024

Example of failing macOS 12 build below. Note that we upgraded this runner to macOS-13 as a temporary fix which worked, but macOS-14 started failing today when those images updated.

https://github.com/denoland/deno/actions/runs/8529068224/job/23364054712

Current runner version: '2.314.1'
Operating System
  macOS
  12.7.4
  21H1123
Runner Image
  Image: macos-12
  Version: 20240329.1
  Included Software: https://github.com/actions/runner-images/blob/macOS-12/20240329.1/images/macos/macos-12-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20240329.1
Runner Image Provisioner
GITHUB_TOKEN Permissions

Same error:

[tls_test 011.72] error: Error: curl https://localhost:3550/d/1 failed: 7:
[tls_test 011.72]   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
[tls_test 011.72]                                  Dload  Upload   Total   Spent    Left  Speed
[tls_test 011.72] 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
[tls_test 011.72] curl: (7) Failed to connect to localhost port 3550 after 0 ms: Couldn't connect to server
[tls_test 011.72] 
[tls_test 011.72]     throw new Error(
[tls_test 011.72]           ^
[tls_test 011.72]     at curl (file:///Users/runner/work/deno/deno/tests/unit/tls_test.ts:1078:11)
[tls_test 011.72]     at eventLoopTick (ext:core/01_core.js:168:7)
[tls_test 011.72]     at async curlFakeHttpsServer (file:///Users/runner/work/deno/deno/tests/unit/tls_test.ts:1091:18)
[tls_test 011.72] 

@mmastrac mmastrac changed the title cURL fails in the latest 14.4.1 runner release cURL fails in the latest mac 12.7.4 and 14.4.1 runner releases Apr 3, 2024
@mmastrac
Copy link
Author

mmastrac commented Apr 3, 2024

Might be related to #9586

@mmastrac
Copy link
Author

mmastrac commented Apr 3, 2024

@erik-bershel Unfortunately this appears to be caused by #9586.

It looks like we're preferentially binding ipv6, so curl can no longer connect to our localhost address with the --ipv4 flag. We might rethink how we bind local addresses and prefer ipv4, but as a heads up the change definitely had some unintended side-effects.

mmastrac added a commit to denoland/deno that referenced this issue Apr 4, 2024
@erik-bershel
Copy link
Contributor

erik-bershel commented Apr 4, 2024

Hey @mmastrac!
I'll reconsider those changes again shortly. Until then, I suggest you to use the workaround. Namely, delete or clear the config file. As you did as I see. 😆

@erik-bershel erik-bershel self-assigned this Apr 4, 2024
@erik-bershel erik-bershel added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Apr 4, 2024
@mmastrac
Copy link
Author

mmastrac commented Apr 4, 2024

Thanks @erik-bershel! Appreciate it 😀

haines added a commit to cerbos/cerbos that referenced this issue Apr 5, 2024
actions/runner-images#9626

Signed-off-by: Andrew Haines <haines@cerbos.dev>
jabenninghoff added a commit to jabenninghoff/rdev that referenced this issue Apr 5, 2024
lepapareil added a commit to Orange-OpenSource/hurl that referenced this issue Apr 8, 2024
lepapareil added a commit to Orange-OpenSource/hurl that referenced this issue Apr 8, 2024
satyarohith pushed a commit to denoland/deno that referenced this issue Apr 11, 2024
miticollo added a commit to miticollo/miticollo.github.io that referenced this issue Apr 11, 2024
@erik-bershel
Copy link
Contributor

Hey there!
New macOS images delivered. Closing this item as completed.

dalisoft added a commit to dalisoft/release-me that referenced this issue Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Common Tools awaiting-deployment Code complete; awaiting deployment and/or deployment in progress bug report OS: macOS
Projects
None yet
Development

No branches or pull requests

3 participants