Repository navigation
x/sys: fsnotify module demo cannot recv sysevents on mips64le #40633
Copy link
Copy link
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Milestone
Description
What version of Go are you using (go version)?
1.13.9/mips64le and 1.14.4
$ go version
Does this issue reproduce with the latest release?
The new version does not reappear
golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="" GOARCH="mips64le" GOBIN="" GOCACHE="/root/.cache/go-build" GOENV="/root/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="mips64le" GOHOSTOS="linux" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/root/go" GOPRIVATE="" GOPROXY="https://goproxy.cn,direct" GOROOT="/home/golang1.13.9" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/golang1.13.9/pkg/tool/linux_mips64le" GCCGO="gccgo" GOMIPS64="hardfloat" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -mabi=64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build378991297=/tmp/go-build -gno-record-gcc-switches"
What did you do?
write go.demo and test -v ./touchoff
1 package touchoff
2
3 import (
4 "testing"
5 "fmt"
6 "github.com/fsnotify/fsnotify"
7 )
8
9 func TestTouchOff(t *testing.T){
10
11 fmt.Printf("here is test over\n")
12 fsWatcher, err := fsnotify.NewWatcher()
13 if err != nil {
14 fmt.Println(err)
15 }
16
17 err1 := fsWatcher.Add("/home/tmp/")
18 if err1 != nil {
19 fmt.Printf("1111111111111111111111111111111-----------------error is--------%v\n", err1)
20 }
21
22 fmt.Printf("0000000000000000000000000000000000000\n")
23
24 for {
25 select{
26 case event := <-fsWatcher.Events:
27 fmt.Printf("222222%v\n", event.Op)
28 }
29 }
30 }
What did you expect to see?
What can I do to receive system events
What did you see instead?
goroutine 8 [syscall]:
syscall.Syscall6(0x1459, 0x6, 0xc0000efbd8, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/golang1.13.9/src/syscall/asm_linux_mips64x.s:40 +0x10
k8s.io/kubernetes/vendor/golang.org/x/sys/unix.EpollWait(0x6, 0xc0000efbd8, 0x7, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x0)
/root/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go:1760 +0x70
k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify.(*fdPoller).wait(0xc000016300, 0x0, 0x0, 0x0)
/root/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify/inotify_poller.go:86 +0x7c
k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc0000b8050)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.Issue is not actionable because of missing required information, which needs to be provided.
Activity
stan1334 commentedon Aug 7, 2020
@evanphx please help me, What should I do to get system catalog monitoring events in this version。 golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd
[-]mips64le fsnotify moudle cannot recv sysevent[/-][+]fsnotify moudle demo cannot recv sysevents on mips64le[/+][-]fsnotify moudle demo cannot recv sysevents on mips64le[/-][+]x/sys: fsnotify module demo cannot recv sysevents on mips64le[/+]toothrot commentedon Aug 7, 2020
Do you have the full error output?
stan1334 commentedon Aug 10, 2020
goroutine 8 [syscall]:
syscall.Syscall6(0x1459, 0x6, 0xc0000efbd8, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x0, 0x0, 0x0)
/home/golang1.13.9/src/syscall/asm_linux_mips64x.s:40 +0x10
k8s.io/kubernetes/vendor/golang.org/x/sys/unix.EpollWait(0x6, 0xc0000efbd8, 0x7, 0x7, 0xffffffffffffffff, 0x0, 0x0, 0x0)
/root/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go:1760 +0x70
k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify.(*fdPoller).wait(0xc000016300, 0x0, 0x0, 0x0)
/root/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify/inotify_poller.go:86 +0x7c
k8s.io/kubernetes/vendor/github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc0000b8050)
demo test error:
when i create or delete file on watch dir,cannot recv anything sys events
andybons commentedon Aug 10, 2020
@ianlancetaylor
ianlancetaylor commentedon Aug 10, 2020
What kernel version are you using?
You are not showing us the complete error output. The program is printing something before
goroutine 8 [syscall]:. Show us that. Thanks.stan1334 commentedon Aug 11, 2020
3.10 kernel version
The above error message is kubernetes unit test。 i test on local golang demo,No error details, unable to wait until the event, you can test it locally on mips64le。
ianlancetaylor commentedon Aug 11, 2020
@duchuanLX According to https://golang.org/wiki/MinimumRequirements, little-endian MIPS requires Linux kernel version newer than 4.1. Linux kernel version 3.10 is not supported. Sorry.
stan1334 commentedon Aug 11, 2020
Thank you very much, why did the 3.10 kernel pass the test in the sys2020 version?
golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd
ianlancetaylor commentedon Aug 11, 2020
Probably because the x/sys tests are not very good.
stan1334 commentedon Aug 12, 2020
Do you mean the test case
ianlancetaylor commentedon Aug 12, 2020
I'm sorry, I do not understand the question.
When you asked "why did the 3.10 kernel pass the test in the sys2020 version?" what did you mean by "the test"?
stan1334 commentedon Aug 12, 2020
sys version platfrom kernelversion res
2019 X86 3.10- PASS
2020 X86 3.10- PASS
2019 MIPS 3.10- FAIL
2020 MIPS 3.10- PASS
2019 MIPS 4.19 testing
ianlancetaylor commentedon Aug 12, 2020
As it says on the wiki page I mentioned, https://golang.org/wiki/MinimumRequirements, the minimum kernel version required for MIPS is 4.8. The minimum kernel version for x86 is 2.6.23. So it is not surprising that x86 passes.
In your little table, I don't know what "sys" means, and I don't know what 2019 and 2020 mean. I assume that 2020 is newer, so it sounds like it passes. That seems good.
The fact that the minimum requirement for MIPS is 4.8 doesn't mean that all earlier versions will always fail. It only means that programs may fail on earlier versions, and we won't try to fix them. Whether they fail or not depends on exactly what they do.
stan1334 commentedon Aug 12, 2020
golang.org/x/sys version platfrom kernelversion res
2019 X86 3.10- PASS
2020 X86 3.10- PASS
2019 MIPS64LE 3.10- FAIL(cannot recv any os events)
2020 MIPS64LE 3.10- PASS
2019 MIPS64LE 4.19 FAIL(os crush,i trying install new kernel again)
stan1334 commentedon Aug 13, 2020
golang.org/x/sys-version platfrom kernelversion res appearance
golang.org/x/sys@v0.0.0-20190813064441-fde4db37ae7a X86 3.10- PASS
golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd X86 3.10- PASS
golang.org/x/sys@v0.0.0-20190813064441-fde4db37ae7a MIPS 3.10- FAIL cannot recv any os events about file,such as create file or delete file
golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd MIPS 3.10- PASS
golang.org/x/sys@v0.0.0-20190813064441-fde4db37ae7a MIPS 4.19- FAIL cannot recv any os events about file,such as create file or delete file
golang.org/x/sys@v0.0.0-20200805065543-0cf7623e9dbd MIPS 4.19- PASS
ianlancetaylor commentedon Aug 13, 2020
I'm sorry, I don't understand. Is there still a bug here? Is there something to fix?
stan1334 commentedon Aug 14, 2020
golang.org/x/sys@v0.0.0-20190813064441-fde4db37ae7a MIPS64 cannot recv os event。
unix/zsyscall_linux_mips64le.go:1790
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
1784 var _p0 unsafe.Pointer
1785 if len(events) > 0 {
1786 _p0 = unsafe.Pointer(&events[0])
1787 } else {
1788 _p0 = unsafe.Pointer(&_zero)
1789 }
1790 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
1791 n = int(r0)
1792 if e1 != 0 {
1793 err = errnoErr(e1)
1794 }
1795 return
1796 }
ianlancetaylor commentedon Aug 14, 2020
From what you say above it sounds like that problem is already fixed in a later version of golang.org/x/sys.
mvdan commentedon Jun 15, 2021
Closing old issues that still have the WaitingForInfo label where enough details to investigate weren't provided. Feel free to leave a comment with more details and we can reopen.