kubo
kubo copied to clipboard
Adding a directory with read-only or corrupt files returns an unhelpful error
Version information:
go-ipfs version: 0.4.22-rc1-39a71fe75 Repo version: 7 System version: amd64/linux Golang version: go1.12.7
Description:
To reproduce:
- Create a directory with several reasonably sized files.
- Use
chmod
to make one of these files unreadable. - Try adding the directory.
Expected results:
IPFS fails with something like "failed to read file X"
Actual results:
Error: read tcp 192.168.0.116:33916->192.168.0.165:5001: use of closed network connection
Cause:
This is due to an upstream bug: https://github.com/golang/go/issues/11745. The real error is getting swallowed by a different error.
replaces https://github.com/ipfs/go-ipfs/issues/3855
@Stebalien Can you confirm that this bug really affects read-only files (such as files added from a zfs snapshot)? The title suggests that, however, #3855 and the steps to reproduce are for files which are not even readable at all.
I ask since I am experiencing that very same error on adding files from a zfs snapshot. This might be unrelated though.
I can answer that myself: Reading files from a zfs snapshot (read only) works without any issues. Previous issues for me might just have been faulty paths. However, the returned error is indeed unhelpful without knowing this issues.