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

net: TestInterfaceArrivalAndDepartureZoneCache is broken on linux-arm64 #61414

Closed
heschi opened this issue Jul 18, 2023 · 11 comments
Closed

net: TestInterfaceArrivalAndDepartureZoneCache is broken on linux-arm64 #61414

heschi opened this issue Jul 18, 2023 · 11 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@heschi
Copy link
Contributor

heschi commented Jul 18, 2023

I recently rebuilt our linux-arm64 image to include the iproute2 package, which caused the skip at https://cs.opensource.google/go/go/+/master:src/net/interface_unix_test.go;l=193;drc=f229e7031a6efb2f23241b5da000c3b3203081d6 to stop happening. Unfortunately the test is failing:

--- FAIL: TestInterfaceArrivalAndDepartureZoneCache (0.00s)
    interface_unix_test.go:196: args=[ip address add fe80::1 dev gotest0] out="RTNETLINK answers: Permission denied\n" err=exit status 2

cc @ianlancetaylor @neild @stapelberg

@heschi heschi added the Soon This needs to be done soon. (regressions, serious bugs, outages) label Jul 18, 2023
@heschi heschi added this to the Go1.21 milestone Jul 18, 2023
@ianlancetaylor
Copy link
Contributor

That's weird, because the test is skipped unless the program is running as root. So it sounds like the test is running as root but it still gets permission denied. Why would that happen?

In any case I suppose we can look for "Permission denied" in the output string and skip the test in that case. Unless @stapelberg knows any better.

@heschi
Copy link
Contributor Author

heschi commented Jul 18, 2023

I'll do that for now.

@gopherbot
Copy link

Change https://go.dev/cl/510737 mentions this issue: net: tolerate permission errors in interface tests

@heschi heschi added the NeedsFix The path to resolution is known, but the work has not been done. label Jul 18, 2023
gopherbot pushed a commit that referenced this issue Jul 18, 2023
On our linux-arm64 builders, we're getting permission errors despite
running as root. Detect those errors and skip the test.

For #61414.

Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986
Reviewed-on: https://go-review.googlesource.com/c/go/+/510737
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
@stapelberg
Copy link
Contributor

Is IPv6 disabled on the test runner for some reason? That would explain a “permission denied” from “ip address add”: https://github.com/torvalds/linux/blob/ccff6d117d8dc8d8d86e8695a75e5f8b01e573bf/net/ipv6/addrconf.c#L2502

Which Linux kernel version is the test runner using?

@bcmills
Copy link
Contributor

bcmills commented Jul 19, 2023

it sounds like the test is running as root but it still gets permission denied. Why would that happen?

My guess would be a container environment.

We have seen several tests in the past that assumed root has permission to do anything supported by the kernel, but in practice many containers enforce syscall restrictions even for the container's root user.

@heschi
Copy link
Contributor Author

heschi commented Jul 19, 2023

@gopherbot please backport

@gopherbot
Copy link

Change https://go.dev/cl/511137 mentions this issue: [release-branch.go1.20] net: tolerate permission errors in interface tests

@gopherbot
Copy link

Change https://go.dev/cl/511136 mentions this issue: [release-branch.go1.21] net: tolerate permission errors in interface tests

@gopherbot
Copy link

Backport issue(s) opened: #61448 (for 1.19), #61449 (for 1.20).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://go.dev/wiki/MinorReleases.

@gopherbot
Copy link

Change https://go.dev/cl/511097 mentions this issue: [release-branch.go1.19] net: tolerate permission errors in interface tests

gopherbot pushed a commit that referenced this issue Jul 19, 2023
…tests

On our linux-arm64 builders, we're getting permission errors despite
running as root. Detect those errors and skip the test.

For #61414.
Fixes #61449

Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986
Reviewed-on: https://go-review.googlesource.com/c/go/+/510737
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 8e1ec1c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/511137
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
gopherbot pushed a commit that referenced this issue Jul 19, 2023
…tests

On our linux-arm64 builders, we're getting permission errors despite
running as root. Detect those errors and skip the test.

For #61414.
Fixes #61448.

Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986
Reviewed-on: https://go-review.googlesource.com/c/go/+/510737
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 8e1ec1c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/511097
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Bypass: Heschi Kreinick <heschi@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
@gopherbot
Copy link

Closed by merging 06a9034 to release-branch.go1.21.

gopherbot pushed a commit that referenced this issue Jul 20, 2023
…tests

On our linux-arm64 builders, we're getting permission errors despite
running as root. Detect those errors and skip the test.

Fixes #61414.

Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986
Reviewed-on: https://go-review.googlesource.com/c/go/+/510737
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 8e1ec1c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/511136
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
bradfitz pushed a commit to tailscale/go that referenced this issue Aug 2, 2023
…tests

On our linux-arm64 builders, we're getting permission errors despite
running as root. Detect those errors and skip the test.

Fixes golang#61414.

Change-Id: I5d7c45789337bee3860b19335bbb9eb884c48986
Reviewed-on: https://go-review.googlesource.com/c/go/+/510737
Auto-Submit: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
(cherry picked from commit 8e1ec1c)
Reviewed-on: https://go-review.googlesource.com/c/go/+/511136
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsFix The path to resolution is known, but the work has not been done. Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

5 participants