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: ReadDir(\\.\pipe\) fails with go1.21 on Windows #61918

Closed
qmuntal opened this issue Aug 10, 2023 · 4 comments
Closed

os: ReadDir(\\.\pipe\) fails with go1.21 on Windows #61918

qmuntal opened this issue Aug 10, 2023 · 4 comments
Assignees
Labels
NeedsFix The path to resolution is known, but the work has not been done. OS-Windows
Milestone

Comments

@qmuntal
Copy link
Contributor

qmuntal commented Aug 10, 2023

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

$ go version
go version go1.21.0 windows/amd64

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
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\***\AppData\Local\go-build
set GOENV=C:\Users\***\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\***\go\pkg\mod
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\***\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Users\***\sdk\go1.21.0
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Users\***\sdk\go1.21.0\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.21.0
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\Users\***\code\gotest\go.mod
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\***\AppData\Local\Temp\go-build3463100184=/tmp/go-build -gno-record-gcc-switches

What did you do?

package main

import (
	"fmt"
	"os"
)

func main() {
	_, err := os.ReadDir(`\\.\pipe\`)
	if err != nil {
		fmt.Println("failed: ", err)
	} else {
		fmt.Println("succeeded")
	}
}

What did you expect to see?

succeeded

What did you see instead?

failed: readdir \\.\pipe\: The system cannot find the path specified.

It is important to note that this doesn't reproduce with go1.20.
Probably related to #61907.

@qmuntal qmuntal added OS-Windows NeedsFix The path to resolution is known, but the work has not been done. labels Aug 10, 2023
@qmuntal qmuntal self-assigned this Aug 10, 2023
@qmuntal qmuntal changed the title affected/package: os: ReadDir(\\.\pipe\) fails with go1.21 on Windows Aug 10, 2023
@qmuntal qmuntal changed the title os: ReadDir(\\.\pipe\) fails with go1.21 on Windows os: ReadDir(\\.\pipe\) fails with go1.21 on Windows Aug 10, 2023
@gopherbot
Copy link

Change https://go.dev/cl/518195 mentions this issue: os: support file systems without file IDs when reading directores on windows

@gopherbot
Copy link

gopherbot commented Aug 10, 2023

Change https://go.dev/cl/518196 mentions this issue: [release-branch.go1.21] os: support file systems without file IDs when reading directories on windows

@bcmills bcmills added this to the Go1.22 milestone Aug 11, 2023
@bcmills
Copy link
Contributor

bcmills commented Aug 11, 2023

@gopherbot, please backport to Go 1.21. This was a regression in a core library.

@gopherbot
Copy link

Backport issue(s) opened: #61964 (for 1.21).

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

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. OS-Windows
Projects
None yet
Development

No branches or pull requests

3 participants