golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
122.58k stars 17.48k forks source link

os: TestNonpollableDeadline fail in wsl1 #63326

Open qiulaidongfeng opened 11 months ago

qiulaidongfeng commented 11 months ago

What version of Go are you using (go version)?

$ go version
tip

Does this issue reproduce with the latest release?

yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/mnt/e/TEMP/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/mnt/e/gofile/gogit/go1'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/mnt/e/gofile/gogit/go1/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='devel go1.22-27d2000103 Sun Oct 1 20:01:52 2023 +0800'
GCCGO='gccgo'
GOAMD64='v2'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build3012391525=/tmp/go-build -gno-record-gcc-switches'

What did you do?

cd src 
./all.bash

What did you expect to see?

Test passed.

What did you see instead?

--- FAIL: TestNonpollableDeadline (0.00s)
    timeout_test.go:38: SetDeadline on file returned <nil>, wanted file type does not support deadline
    timeout_test.go:41: SetReadDeadline on file returned <nil>, wanted file type does not support deadline
    timeout_test.go:44: SetWriteDeadline on file returned <nil>, wanted file type does not support deadline
FAIL
FAIL    os      2.353s
prattmic commented 11 months ago

cc @golang/runtime

Could you provide more information about your OS environment? What Linux kernel version and distribution you are using?

This test creates a file with os.CreateTemp, could you log where that file is? What kind of filesystem is it on?

Edit: ah, I missed the issue title says wsl1. The details about the specific versions and tmp file would still be useful.

prattmic commented 11 months ago

cc @golang/windows

qiulaidongfeng commented 11 months ago

system information:

uname -a
Linux XTZJ-20220215FM 4.4.0-22000-Microsoft #1281-Microsoft Tue Nov 08 17:05:00 PST 2022 x86_64 x86_64 x86_64 GNU/Linux

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:        22.04
Codename:       jammy

The file created by os.CreateTemp is located in/tmp/ostest4281423558, and the file system is wslfs.