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: TestNilResolverLookup fails with cgo argument has Go pointer to Go pointer on linux-amd64-wsl #56658

Closed
mknyszek opened this issue Nov 8, 2022 · 3 comments
Assignees
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Milestone

Comments

@mknyszek
Copy link
Contributor

mknyszek commented Nov 8, 2022

Persistently failing since https://go.dev/cl/446179.

CC @rsc @ianlancetaylor

@mknyszek mknyszek added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels Nov 8, 2022
@mknyszek mknyszek added this to the Go1.20 milestone Nov 8, 2022
@mknyszek mknyszek added the Soon This needs to be done soon. (regressions, serious bugs, outages) label Nov 8, 2022
@mknyszek
Copy link
Contributor Author

mknyszek commented Nov 8, 2022

Actually, I'm not sure if linux-amd64-wsl is first class...

@rsc rsc self-assigned this Nov 8, 2022
@gopherbot
Copy link

Change https://go.dev/cl/448795 mentions this issue: net: pass C string to res_nsearch, in case it stores the pointer

@gopherbot
Copy link

Change https://go.dev/cl/448798 mentions this issue: net: allocate res_state entirely in C memory

gopherbot pushed a commit that referenced this issue Nov 8, 2022
The linux-amd64-wsl builder was failing because the res_nsearch
implementation was storing pointer to the res_state's own fields
in other fields in the res_state. If the res_state is Go memory, this
looks like pointers to Go pointers. Moving the res_state to C memory
avoids the problem.

The linux-amd64-wsl builder has been fixed a different way by
replacing res_nsearch with res_search on Linux, where it is thread-safe.
But other systems that still need to use res_nsearch (such as macOS)
may run into the same kind of problem, so it is probably still worth
arranging for the res_state to live entirely in C memory.

Fixes #56658 (again).

Change-Id: I58a14e72c866eaceb02ad828854a1f626b9b8e73
Reviewed-on: https://go-review.googlesource.com/c/go/+/448798
Run-TryBot: Russ Cox <rsc@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
@golang golang locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker Soon This needs to be done soon. (regressions, serious bugs, outages)
Projects
None yet
Development

No branches or pull requests

3 participants