-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: waitid: function not implemented on Windows 10(Bash on Ubuntu) #16610
Comments
Why do you refers to Windows 10 in the topic? What Linux version are you running? |
Bash on Ubuntu for Win10 lsb_release -a
|
Ian, this is Microsoft's implementation of the Linux system calls atop the Window 10 kernel. It's Linux-like. They didn't implement this system call apparently. |
go1.6.3 works OK, but go1.7rc5 NOT OK. |
CL https://golang.org/cl/25507 mentions this issue. |
OK, thanks. |
Maybe we should ask Microsoft if they'd rather fix this than us work around it. I believe it's still in development and they're targeting Linux parity. Their goal is Docker stuff iiuc. |
Yes, maybe they will fix it in future. |
@jstarks, are you involved with Windows' Linux subsystem? Windows 10 doesn't seem to implement the |
cc @benhillis |
@bradfitz Given the above I'm inclined to submit CL 25507 for the 1.7 release. It's simple and safe. |
Fine by me. |
WSL has implemented the waitid system call and it will be available in a post Anniversary Update Windows Insider flight. One caveat: the P_PGID IdType is not yet implemented, are you using that? |
@benhillis, nope. Just P_PID: const _P_PID = 1
....
// The waitid system call expects a pointer to a siginfo_t,
// which is 128 bytes on all GNU/Linux systems.
// On Darwin, it requires greater than or equal to 64 bytes
// for darwin/{386,arm} and 104 bytes for darwin/amd64.
// We don't care about the values it returns.
var siginfo [128]byte
psig := &siginfo[0]
_, _, e := syscall.Syscall6(syscall.SYS_WAITID, _P_PID, uintptr(p.Pid), uintptr(unsafe.Pointer(psig)), syscall.WEXITED|syscall.WNOWAIT, 0, 0) |
Reportedly waitid is not available for Ubuntu on Windows. Fixes golang#16610. Change-Id: Ia724f45a85c6d3467b847da06d8c65d280781dcd Reviewed-on: https://go-review.googlesource.com/25507 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Insiders Build 14901 implemented waitid. Here's the output for 'go build', though:
This is Go 1.7rc6 linux/amd64. Microsoft/BashOnWindows#638. |
I guess it's not fully implemented yet. |
@aschneiderg Do you happen to have an strace of the failing waited system call? We should handle everything except P_PGID IdType but it's possible we missed something. |
@benhillis, use of
Where those constants are:
|
@bradfitz thanks for the pointer. I suspect we aren't handling the nowait flag correctly. I'll take a look this morning. |
Still getting |
@stuart-warren, the bug you're looking for is microsoft/WSL#638 This is Go's issue tracker and this issue is closed. We're probably not going to go out of our way to support a variant of Linux when that Linux variant is still under development and has a goal to not feel like a variant. |
FYI I've checked this fix in to WSL and it should be available in an upcoming Windows Insider build. Thanks again for bringing this to my attention. |
@benhillis, excellent. Thanks for the fix and the update. |
The fix should be available in Windows version 14936 and later. |
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.7rc5 linux/amd64
go env
)?If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
cat hello.go
go build hello.go
go build command-line-arguments: /usr/local/go/pkg/tool/linux_amd64/compile: waitid: function not implemented
works OK in go1.7rc5
go build hello.go
go build command-line-arguments: /usr/local/go/pkg/tool/linux_amd64/compile: waitid: function not implemented
But when I switched it to go1.6.3, it works OK.
The text was updated successfully, but these errors were encountered: