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

os/signal: warning: syscall() may go away, please rewrite code to use direct calls on openbsd #59667

Closed
bcmills opened this issue Apr 17, 2023 · 22 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-OpenBSD
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented Apr 17, 2023

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`

(attn @golang/openbsd @4a6f656c; see also #36435)

@bcmills bcmills added OS-OpenBSD NeedsFix The path to resolution is known, but the work has not been done. labels Apr 17, 2023
@bcmills bcmills added this to the Backlog milestone Apr 17, 2023
@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Apr 17, 2023
@bcmills
Copy link
Contributor Author

bcmills commented Apr 17, 2023

Looks like this was fixed by CL 484555.

@bcmills bcmills closed this as completed Apr 17, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-04-12 15:45 openbsd-arm64-jsing go@b7428b7c os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1321096947/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls
2023-04-13 17:28 openbsd-arm64-jsing go@b5a7f2ee os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1776706503/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls
2023-04-13 17:46 openbsd-arm64-jsing go@74c296b6 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-2131467224/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot gopherbot reopened this May 30, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-05-26 16:17 openbsd-arm64-jsing go@4c1d8bf5 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-2708591509/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@mknyszek
Copy link
Contributor

CC @4a6f656c

This warning pops up in the last failure, but that's actually also a timeout. Maybe needs a new issue?

@aclements
Copy link
Member

@cherrymui points out this is because os/signal/signal_cgo_test.go:TestTerminalSignal uses syscall.Syscall, which kind of unavoidably uses syscall. That suggests we either need to rewrite that test to not use syscall.Syscall (I'm not sure that's possible) or stop building it on openbsd.

@bcmills
Copy link
Contributor Author

bcmills commented May 31, 2023

syscall.Wait4 is already defined. I guess that just leaves SYS_IOCTL, for which a wrapper could presumably be added in internal/syscall/unix?

@cherrymui cherrymui changed the title cmd/link: warning: syscall() may go away, please rewrite code to use direct calls on openbsd os/signal: warning: syscall() may go away, please rewrite code to use direct calls on openbsd Jun 1, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-08-20 05:56 openbsd-arm64-jsing go@a2ec545e os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-917651527/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-08-21 18:00 openbsd-arm64-jsing go@c7383441 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-3327794622/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-10-18 14:06 openbsd-arm64-jsing go@045ce51b os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1917193263/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/538459 mentions this issue: os/signal: use syscall.Wait4 directly in tests

gopherbot pushed a commit that referenced this issue Nov 1, 2023
Rather than using syscall.Syscall6 with SYS_WAIT4, use syscall.Wait4
directly.

Updates #59667

Change-Id: I50fea3b7d10003dbc632aafd5e170a9fe96d6f42
Reviewed-on: https://go-review.googlesource.com/c/go/+/538459
Run-TryBot: Joel Sing <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Reviewed-by: Cherry Mui <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
@4a6f656c
Copy link
Contributor

4a6f656c commented Nov 2, 2023

I'm going to close this as the warning: syscall() may go away, please rewrite code to use direct calls on openbsd message is just a warning. All of the failures logged come from a range of different sources, including timeouts and breakage in other parts of Go (that have since been fixed).

@4a6f656c 4a6f656c closed this as completed Nov 2, 2023
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/540020 mentions this issue: os/signal,syscall: avoid calling ioctl via syscall.Syscall on BSDs

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-11-22 15:50 openbsd-arm64-jsing go@37971b31 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1478659808/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot gopherbot reopened this Nov 24, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-11-29 19:13 openbsd-arm64-jsing go@636c6e35 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1780026275/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-11-29 15:49 openbsd-arm64-jsing go@1908d435 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1313590292/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-12-05 17:17 openbsd-arm64-jsing go@285ef16b os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1479236923/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-12-15 21:57 openbsd-arm64-jsing go@79309716 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1820602792/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-12-18 19:42 openbsd-arm64-jsing go@08bec0db os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-136164261/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2023-12-06 17:29 openbsd-arm64-jsing go@c80bd631 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-12492246475020622049/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2024-02-19 15:44 openbsd-arm64-jsing go@cf52e709 os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1307644512/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- goos == "openbsd" && `warning: syscall\(\) may go away, please rewrite code to use direct calls`
2024-02-28 05:32 openbsd-arm64-jsing go@b8c76eff os/signal.test [build] (log)
go.go(/home/gopher/build/tmp/go-link-1182854327/go.o:(syscall.libc_syscall_trampoline.abi0)): warning: syscall() may go away, please rewrite code to use direct calls

watchflakes

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/572155 mentions this issue: syscall: export Tc{get,set}pgrp for testing

gopherbot pushed a commit that referenced this issue Mar 20, 2024
Provide appropriate implementations of internal/syscall/unix.Tcsetpgrp
and use this for runSessionLeader in os/signal/signal_cgo_test.go.
This avoids calling syscall.Syscall with SYS_IOCTL on BSDs.

Updates #59667
Updates #63900

Change-Id: Ifa4696bba9f1eb68e81e7103f030bc254adaf0af
Reviewed-on: https://go-review.googlesource.com/c/go/+/540020
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: David Chase <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Joel Sing <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime. help wanted NeedsFix The path to resolution is known, but the work has not been done. OS-OpenBSD
Projects
Archived in project
Development

No branches or pull requests

5 participants