kubo icon indicating copy to clipboard operation
kubo copied to clipboard

Adding a directory with read-only or corrupt files returns an unhelpful error

Open Stebalien opened this issue 5 years ago • 2 comments

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:

  1. Create a directory with several reasonably sized files.
  2. Use chmod to make one of these files unreadable.
  3. 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 avatar Aug 02 '19 00:08 Stebalien

@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.

jdannenberg avatar Sep 21 '22 06:09 jdannenberg

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.

jdannenberg avatar Sep 23 '22 09:09 jdannenberg