-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Description
Summary
If you are running on illumos, you are likely suffering from https://www.illumos.org/issues/14898 and you should look into applying updates. If you are on an LTS release of some sort, you can ask your distro provider if that fix can be backported for you.
If you are running on Solaris, you should probably contact support and send them a link to the illumos issue to see if there's a corresponding fix available for Solaris.
There's a small chance that you're running into #54363 if the version of x/sys/unix in use doesn't contain the fix from https://go.dev/cl/422338.
Original Report (for posterity)
CAVEAT
This is clearly my own fault, but I am not smart enough (yet?) to figure out where my bug is.
It was introduced while attempting to fix a different problem in golang/sys@594fa53
as worked on in https://go-review.googlesource.com/c/sys/+/380034
What version of Go are you using (go version)?
$ go version go version go1.19 solaris/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 warning: GOPATH set to GOROOT (/home/nshalman/go/) has no effect GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/nshalman/.cache/go-build" GOENV="/home/nshalman/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="solaris" GOINSECURE="" GOMODCACHE="/home/nshalman/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="solaris" GOPATH="/home/nshalman/go/" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/nshalman/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/nshalman/go/pkg/tool/solaris_amd64" GOVCS="" GOVERSION="go1.19" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/nshalman/sys/go.mod" GOWORK="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3559396907=/tmp/go-build -gno-record-gcc-switches"
What did you do?
See fsnotify/fsnotify#371 (comment)
git clone https://github.com/nshalman/fsnotify -b fen-v2
cd fsnotify
mkdir deleteme
go run ./cmd/fsnotify deleteme/ &
for i in {1..500}; do touch deleteme/$i; done;
What did you expect to see?
No panics
What did you see instead?
panic: mismanaged memory
goroutine 33 [running]:
golang.org/x/sys/unix.(*EventPort).peIntToExt(0xc000200150, 0xc0004f52c0, 0xc000105da8)
/home/nshalman/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_solaris.go:959 +0x265
golang.org/x/sys/unix.(*EventPort).Get(0xc000200150, {0xc000105da8, 0x8, 0x0?}, 0x0?, 0x0?)
/home/nshalman/go/pkg/mod/golang.org/x/[email protected]/unix/syscall_solaris.go:1002 +0x2e9
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc000200060)
/home/nshalman/deleteme/fsnotify/fen.go:148 +0x10a
created by github.com/fsnotify/fsnotify.NewWatcher
/home/nshalman/deleteme/fsnotify/fen.go:47 +0x165
exit status 2