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: directory exists but os.ReadDir reports "no such file or directory" #46408

Open
olongfen opened this issue May 27, 2021 · 14 comments
Open

os: directory exists but os.ReadDir reports "no such file or directory" #46408

olongfen opened this issue May 27, 2021 · 14 comments

Comments

@olongfen
Copy link

@olongfen olongfen commented May 27, 2021

 go version go1.16.4 linux/amd64

go env Output
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/olongfen/.cache/go-build"
GOENV="/home/olongfen/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/media/olongfen/data/gocode/pkg/mod"
GONOPROXY="github.com/olongfen"
GONOSUMDB="github.com/olongfen"
GOOS="linux"
GOPATH="/media/olongfen/data/gocode"
GOPRIVATE="github.com/olongfen"
GOPROXY="https://goproxy.io"
GOROOT="/media/olongfen/data/software/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/media/olongfen/data/software/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/media/olongfen/data/gocode/src/github.com/olongfen/note/go.mod"
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-build317772534=/tmp/go-build -gno-record-gcc-switches"

I do it

 I used os.ReadDir("/media/olongfen/stomach/data/ccb/A003-202104/A003-7/"), i confirm my dir is exist,but it send this error:
 ERRO[0000] readdirent /media/olongfen/stomach/data/ccb/A003-202104/A003-7/: no such file or directory 

image

What did you see instead?

@mknyszek mknyszek changed the title Dir is exists but used os.ReadDir to read it return no such file or directory os: directory exists but os.ReadDir reports "no such file or directory" May 27, 2021
@mknyszek mknyszek added this to the Backlog milestone May 27, 2021
@mknyszek
Copy link
Contributor

@mknyszek mknyszek commented May 27, 2021

Is that directory mounted in a special way? os.ReadDir uses standard OS filesystem APIs in order to work, and the fact that this directory is in /media suggests to me that this could be some specially mounted directory that isn't available through the regular filesystem APIs or something.

I don't think we'll be able to determine whether this is a bug without more information though.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 27, 2021

What is the output of ls -ld /media/olongfen/stomach/data/ccb/A003-202104/A003-7 (note no trailing slash).

Please report this as ordinary plain text in the issue, not as a screenshot. Screenshots are very difficult to read and there is no reason to use them for ordinary text. Thanks.

@olongfen
Copy link
Author

@olongfen olongfen commented May 28, 2021

ls -ld /media/olongfen/stomach/data/ccb/A003-202104/A003-7
output: drwxrwxrwx 2 root root 0 May 26 11:58 /media/olongfen/stomach/data/ccb/A003-202104/A003-7

i mount cifs device in this dir,but sometime i can read ,there is a little chance of reading failure,this is my mount command:sudo mount -t cifs -o username="guest",password="",file_mode=0777,dir_mode=0777 //192.168.3.250/stomach /media/olongfen/stomach,my gave all permissions in this dir,so i do not know why os.ReadDir sometime can not read it.Thanks

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 28, 2021

Does anything if you remove the trailing slash in the call to os.ReadDir?

@olongfen
Copy link
Author

@olongfen olongfen commented May 28, 2021

I try keep it, but nothing change
**ERRO[0000] readdirent /media/olongfen/stomach/data/ccb/A003-202104/A003-3/caijian/: no such file or directory func=":78|func1"
**

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 28, 2021

That is a different directory. Also, it has a trailing slash.

I'm trying to understand whether there is something about CIFS that is rejecting attempts to open a directory when the trailing slash is passed to os.OpenDir. Please try removing the trailing slash in all cases. Thanks.

@olongfen
Copy link
Author

@olongfen olongfen commented May 28, 2021

When my directory does not have /, i tried to use os.ReadDir open 100000.

package main

import (
	"fmt"
	"os"
)
 var (
		max      = 100000
		errCount int
		i        = 0
               dir="/media/olongfen/stomach/data/ccb/A003-202104/A003-7"
	)
	for i < max {
		if _, err := os.ReadDir(dir); err != nil {
			errCount++
		}
		i++
	}
	fmt.Println("fail count: ", errCount)
 // outout: fail count:  2615

When my directory does have /,i tried to use os.ReadDir open 100000.

package main

import (
	"fmt"
	"os"
)
 var (
		max      = 100000
		errCount int
		i        = 0
                dir = "/media/olongfen/stomach/data/ccb/A003-202104/A003-7/"

	)
	for i < max {
		if _, err := os.ReadDir(dir); err != nil {
			errCount++
		}
		i++
	}
	fmt.Println("fail count: ", errCount)
 // otput: fail count:  2575

so i think nothing to do with slash

@ZekeLu
Copy link

@ZekeLu ZekeLu commented May 28, 2021

@olongfen This is off-topic, but can you format your comment to make it easy to read? See https://github.github.com/gfm/ for how to write markdown.

@olongfen
Copy link
Author

@olongfen olongfen commented May 28, 2021

@olongfen This is off-topic, but can you format your comment to make it easy to read? See https://github.github.com/gfm/ for how to write markdown.

I am sorry

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 28, 2021

Thanks. Can you run your program under strace -f, so that we can see exactly what the system calls are doing?

go build x.go
strace -f ./x

@olongfen
Copy link
Author

@olongfen olongfen commented May 30, 2021

Thanks. Can you run your program under strace -f, so that we can see exactly what the system calls are doing?

go build x.go
strace -f ./x

My used command strace -f ./x then output :

execve("./main", ["./main"], 0x7fff2c148678 /* 85 vars */) = 0
arch_prctl(ARCH_SET_FS, 0x5af570)       = 0
sched_getaffinity(0, 8192, [0, 1, 2, 3, 4, 5, 6, 7]) = 8
openat(AT_FDCWD, "/sys/kernel/mm/transparent_hugepage/hpage_pmd_size", O_RDONLY) = 3
read(3, "2097152\n", 20)                = 8
close(3)                                = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f667c838000
mmap(NULL, 131072, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f667c818000
mmap(NULL, 1048576, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f667c718000
mmap(NULL, 8388608, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f667bf18000
mmap(NULL, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6677f18000
mmap(NULL, 536870912, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6657f18000
mmap(0xc000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(0xc000000000, 67108864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6655f18000
mmap(NULL, 2165776, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6655d07000
mmap(0x7f667c818000, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f667c818000
mmap(0x7f667c798000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f667c798000
mmap(0x7f667c31e000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f667c31e000
mmap(0x7f6679f48000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6679f48000
mmap(0x7f6668098000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f6668098000
mmap(NULL, 1048576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6655c07000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6655bf7000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6655be7000
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=877846365}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=877904963}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=877963979}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878026488}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878080406}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878141518}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878194808}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878255920}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878314587}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878377096}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878432481}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878489961}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878555613}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878608414}) = 0
rt_sigprocmask(SIG_SETMASK, NULL, [QUIT], 8) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878911529}) = 0
clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=878972082}) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc000002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid()                                = 176723
rt_sigaction(SIGHUP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGILL, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGFPE, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSTKFLT, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGURG, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPROF, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGIO, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPWR, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGSYS, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_3, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_3, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_4, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_5, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_6, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_7, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_8, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_9, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_10, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_11, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_12, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_13, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_14, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_15, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_16, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_17, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_18, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_19, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_20, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_21, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_22, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_23, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_24, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_25, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_26, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_27, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_28, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_29, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_30, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_31, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGRT_32, {sa_handler=0x4678c0, sa_mask=~[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO, sa_restorer=0x467a00}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[], [], 8) = 0
clone(child_stack=0xc00005c000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLSstrace: Process 176724 attached
, tls=0xc00004c090) = 176724
[pid 176724] gettid( <unfinished ...>
[pid 176723] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176724] <... gettid resumed>)      = 176724
[pid 176723] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176724] sigaltstack(NULL,  <unfinished ...>
[pid 176723] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176724] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 176723] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=886071685}) = 0
[pid 176724] sigaltstack({ss_sp=0xc00004e000, ss_flags=0, ss_size=32768}, NULL) = 0
[pid 176724] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176723] rt_sigprocmask(SIG_SETMASK, ~[],  <unfinished ...>
[pid 176724] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176723] <... rt_sigprocmask resumed>[], 8) = 0
[pid 176724] gettid( <unfinished ...>
[pid 176723] clone(child_stack=0xc00005e000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS <unfinished ...>
[pid 176724] <... gettid resumed>)      = 176724
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, strace: Process 176725 attached
 <unfinished ...>
[pid 176723] <... clone resumed>, tls=0xc00004c490) = 176725
[pid 176723] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176725] gettid( <unfinished ...>
[pid 176723] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176725] <... gettid resumed>)      = 176725
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] rt_sigprocmask(SIG_SETMASK, ~[],  <unfinished ...>
[pid 176725] sigaltstack(NULL,  <unfinished ...>
[pid 176723] <... rt_sigprocmask resumed>[], 8) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176725] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 176723] clone(child_stack=0xc000058000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=886439405}) = 0
[pid 176725] sigaltstack({ss_sp=0xc00005e000, ss_flags=0, ss_size=32768},  <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC, strace: Process 176726 attached
 <unfinished ...>
[pid 176725] <... sigaltstack resumed>NULL) = 0
[pid 176723] <... clone resumed>, tls=0xc00004c890) = 176726
[pid 176726] gettid( <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=886510784}) = 0
[pid 176723] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176726] <... gettid resumed>)      = 176726
[pid 176725] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176723] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] futex(0x5af630, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176726] sigaltstack(NULL,  <unfinished ...>
[pid 176725] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176726] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 176725] gettid( <unfinished ...>
[pid 176726] sigaltstack({ss_sp=0xc00006a000, ss_flags=0, ss_size=32768},  <unfinished ...>
[pid 176725] <... gettid resumed>)      = 176725
[pid 176726] <... sigaltstack resumed>NULL) = 0
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176726] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176725] mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0 <unfinished ...>
[pid 176726] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176725] <... mmap resumed>)        = 0x7f6655ba7000
[pid 176726] gettid( <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=886830871}) = 0
[pid 176726] <... gettid resumed>)      = 176726
[pid 176725] rt_sigprocmask(SIG_SETMASK, ~[],  <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176726] futex(0x5af630, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 176725] <... rt_sigprocmask resumed>[], 8) = 0
[pid 176723] <... futex resumed>)       = 0
[pid 176726] <... futex resumed>)       = 1
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=886912097}) = 0
[pid 176723] rt_sigprocmask(SIG_SETMASK, ~[],  <unfinished ...>
[pid 176726] sched_yield( <unfinished ...>
[pid 176725] clone(child_stack=0xc000092000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS <unfinished ...>
[pid 176723] <... rt_sigprocmask resumed>[], 8) = 0
[pid 176726] <... sched_yield resumed>) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] clone(child_stack=0xc00005a000, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS <unfinished ...>
[pid 176726] futex(0x5af218, FUTEX_WAKE_PRIVATE, 1strace: Process 176727 attached
strace: Process 176728 attached
) = 0
[pid 176725] <... clone resumed>, tls=0xc000080090) = 176727
[pid 176723] <... clone resumed>, tls=0xc00004cc90) = 176728
[pid 176728] gettid( <unfinished ...>
[pid 176727] gettid( <unfinished ...>
[pid 176726] futex(0xc00004c950, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176728] <... gettid resumed>)      = 176728
[pid 176727] <... gettid resumed>)      = 176727
[pid 176725] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176723] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176728] sigaltstack(NULL,  <unfinished ...>
[pid 176727] sigaltstack(NULL,  <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] futex(0x5af630, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176728] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 176727] <... sigaltstack resumed>{ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
[pid 176725] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176728] sigaltstack({ss_sp=0xc000074000, ss_flags=0, ss_size=32768},  <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=887418733}) = 0
[pid 176728] <... sigaltstack resumed>NULL) = 0
[pid 176727] sigaltstack({ss_sp=0xc000084000, ss_flags=0, ss_size=32768},  <unfinished ...>
[pid 176725] futex(0x5af630, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 176728] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176727] <... sigaltstack resumed>NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... futex resumed>)       = 0
[pid 176728] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176727] rt_sigprocmask(SIG_SETMASK, [],  <unfinished ...>
[pid 176725] <... futex resumed>)       = 1
[pid 176728] gettid( <unfinished ...>
[pid 176727] <... rt_sigprocmask resumed>NULL, 8) = 0
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=887640342}) = 0
[pid 176728] <... gettid resumed>)      = 176728
[pid 176727] gettid( <unfinished ...>
[pid 176725] futex(0xc00004c550, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176728] futex(0xc00004cd50, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176727] <... gettid resumed>)      = 176727
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176727] futex(0xc000080150, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176723] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=887938988}) = 0
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] readlinkat(AT_FDCWD, "/proc/self/exe",  <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=888011065}) = 0
[pid 176723] <... readlinkat resumed>"/media/olongfen/data/gocode/src/"..., 128) = 66
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] fcntl(0, F_GETFL <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=892128265}) = 0
[pid 176723] <... fcntl resumed>)       = 0x8002 (flags O_RDWR|O_LARGEFILE)
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] futex(0xc000080150, FUTEX_WAKE_PRIVATE, 1) = 1
[pid 176727] <... futex resumed>)       = 0
[pid 176723] fcntl(1, F_GETFL <unfinished ...>
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] <... fcntl resumed>)       = 0x8002 (flags O_RDWR|O_LARGEFILE)
[pid 176727] futex(0xc00004cd50, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] fcntl(2, F_GETFL <unfinished ...>
[pid 176728] <... futex resumed>)       = 0
[pid 176727] <... futex resumed>)       = 1
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=892443114}) = 0
[pid 176723] <... fcntl resumed>)       = 0x8002 (flags O_RDWR|O_LARGEFILE)
[pid 176728] futex(0xc00004cd50, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176727] futex(0xc000080150, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=892591878}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] clock_gettime(CLOCK_REALTIME,  <unfinished ...>
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] <... clock_gettime resumed>{tv_sec=1622416107, tv_nsec=453949970}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=892848757}) = 0
[pid 176723] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=892861748}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] openat(AT_FDCWD, "/media/olongfen/stomach/data/ccb/A003-202104/A003-7/", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=892909869}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893137904}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893192241}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893381235}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893432289}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893613111}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893666540}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893844219}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=893893877}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894066806}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894110527}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894283526}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894326829}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894566457}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894616185}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894785064}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=894839960}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895010933}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895058566}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895243718}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895515753}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895701743}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=895852462}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896044040}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896096142}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896287929}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896333606}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896517361}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896567926}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896757269}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896811187}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=896995221}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897046136}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897243021}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897312934}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897494873}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897547115}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897724165}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897778013}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=897957787}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=898009400}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=898193225}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=898250915}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=898438022}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=898484258}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] <... openat resumed>)      = 3
[pid 176723] epoll_create1(EPOLL_CLOEXEC) = 4
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] pipe2( <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... pipe2 resumed>[5, 6], O_NONBLOCK|O_CLOEXEC) = 0
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=898752033}) = 0
[pid 176723] epoll_ctl(4, EPOLL_CTL_ADD, 5, {EPOLLIN, {u32=6144824, u64=6144824}} <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... epoll_ctl resumed>)   = 0
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=898830256}) = 0
[pid 176723] epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET, {u32=1438318216, u64=140077501709960}} <unfinished ...>
[pid 176724] epoll_pwait(4,  <unfinished ...>
[pid 176723] <... epoll_ctl resumed>)   = -1 EPERM (Operation not permitted)
[pid 176724] <... epoll_pwait resumed>[], 128, 0, NULL, 824634097432) = 0
[pid 176723] epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc000093ce4 <unfinished ...>
[pid 176724] getpid( <unfinished ...>
[pid 176723] <... epoll_ctl resumed>)   = -1 EPERM (Operation not permitted)
[pid 176724] <... getpid resumed>)      = 176723
[pid 176723] getdents64(3 <unfinished ...>
[pid 176724] tgkill(176723, 176723, SIGURG) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899364060}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899410994}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899593143}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899645315}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899858334}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=899908760}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900083645}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900137912}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900326277}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900390602}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176723] <... getdents64 resumed>, 0xc0000dc000, 8192) = -1 EINTR (Interrupted system call)
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] --- SIGURG {si_signo=SIGURG, si_code=SI_TKILL, si_pid=176723, si_uid=1000} ---
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=900636935}) = 0
[pid 176723] rt_sigreturn({mask=[]} <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... rt_sigreturn resumed>) = -1 EINTR (Interrupted system call)
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=900714251}) = 0
[pid 176723] getdents64(3 <unfinished ...>
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900914837}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=900965752}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901145526}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901206289}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901419448}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901471829}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176723] <... getdents64 resumed>, /* 2 entries */, 8192) = 48
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] getdents64(3 <unfinished ...>
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=901654257}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901710410}) = 0
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000}, NULL) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC, {tv_sec=98683, tv_nsec=901910928}) = 0
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... getdents64 resumed>, 0xc0000dc000, 8192) = -1 ENOENT (No such file or directory)
[pid 176724] <... clock_gettime resumed>{tv_sec=98683, tv_nsec=901967081}) = 0
[pid 176723] close(3 <unfinished ...>
[pid 176724] nanosleep({tv_sec=0, tv_nsec=20000},  <unfinished ...>
[pid 176723] <... close resumed>)       = 0
[pid 176723] write(1, "fail count:  1\n", 15fail count:  1
) = 15
[pid 176724] <... nanosleep resumed>NULL) = 0
[pid 176723] exit_group(0 <unfinished ...>
[pid 176724] clock_gettime(CLOCK_MONOTONIC,  <unfinished ...>
[pid 176723] <... exit_group resumed>)  = ?
[pid 176726] <... futex resumed>)       = -1 (errno 18446744073709551388)
[pid 176725] <... futex resumed>)       = ?
[pid 176728] <... futex resumed>)       = -1 (errno 18446744073709551388)
[pid 176727] <... futex resumed>)       = ?
[pid 176728] +++ exited with 0 +++
[pid 176726] +++ exited with 0 +++
[pid 176727] +++ exited with 0 +++
[pid 176725] +++ exited with 0 +++
[pid 176724] <... clock_gettime resumed> <unfinished ...>) = ?
[pid 176724] +++ exited with 0 +++
+++ exited with 0 +++

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 31, 2021

Thanks. That output is very odd. Omitting a lot of irrelevancies, I see

[pid 176723] getdents64(3 <unfinished ...>
[pid 176723] <... getdents64 resumed>, /* 2 entries */, 8192) = 48
[pid 176723] getdents64(3 <unfinished ...>
[pid 176723] <... getdents64 resumed>, 0xc0000dc000, 8192) = -1 ENOENT (No such file or directory)

The Go library does not expect the getdents64 system call to fail with ENOENT.

Looking at the glibc code, I see this:

	      /* On some systems getdents fails with ENOENT when the
		 open directory has been rmdir'd already.  POSIX.1
		 requires that we treat this condition like normal EOF.  */
	      if (bytes < 0 && errno == ENOENT)
		bytes = 0;

Perhaps we should do something similar.

That said, it doesn't seem to me that this directory has been removed. This seems like a bug in the CIFS file system support, a bug that is being papered over by glibc.

Specifically, I think the bug may be here: https://github.com/torvalds/linux/blob/master/fs/cifs/readdir.c#L721. Why is that code correct? Anybody know someone to ask? Thanks.

@olongfen
Copy link
Author

@olongfen olongfen commented Jun 1, 2021

Thanks. That output is very odd. Omitting a lot of irrelevancies, I see

[pid 176723] getdents64(3 <unfinished ...>
[pid 176723] <... getdents64 resumed>, /* 2 entries */, 8192) = 48
[pid 176723] getdents64(3 <unfinished ...>
[pid 176723] <... getdents64 resumed>, 0xc0000dc000, 8192) = -1 ENOENT (No such file or directory)

The Go library does not expect the getdents64 system call to fail with ENOENT.

Looking at the glibc code, I see this:

	      /* On some systems getdents fails with ENOENT when the
		 open directory has been rmdir'd already.  POSIX.1
		 requires that we treat this condition like normal EOF.  */
	      if (bytes < 0 && errno == ENOENT)
		bytes = 0;

Perhaps we should do something similar.

That said, it doesn't seem to me that this directory has been removed. This seems like a bug in the CIFS file system support, a bug that is being papered over by glibc.

Specifically, I think the bug may be here: https://github.com/torvalds/linux/blob/master/fs/cifs/readdir.c#L721. Why is that code correct? Anybody know someone to ask? Thanks.

Thanks.

@networkimprov
Copy link

@networkimprov networkimprov commented Jun 2, 2021

Ian, have you asked that Q on any Linux forum?

@gopherbot remove WaitingForInfo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants