I develop a http server in Go. It uses fineuplader to upload files to my fuse file system.
The fuse file system has a cache algorithm. If the cache is full, file write will wait cache available for 20 min. This makes the Go http server io.copy() waiting.
And the go http server has a routine work check some Linux service is active. I use following
cmd := exec.Command(“systemctl”, “is-active”, “–quiet”, servicename)
err := cmd.Run()
I found this routine work hang on
cmd.Run() . It not 100% hang on, but have a very high fail rate.
I written a minimal reproducible example and put it on github https://github.com/derentw/GoCmdHangExample
What I want to see is
cmd.Output() run without delay.
I also try Go 1.14, and it also have this problem.