Skip to content

CID with unexpected EOF can't be removed from MFS #7999

@lidel

Description

@lidel

Version information:

go-ipfs version: 0.8.0
Repo version: 11
System version: amd64/linux
Golang version: go1.15.8

Description:

Given QmYw8okuEpxCPhfX3CKbF8mtpmyHPHP9VC3VNhUepytcSh which is producing EOF error:

$ ipfs files stat /ipfs/QmYw8okuEpxCPhfX3CKbF8mtpmyHPHP9VC3VNhUepytcS
Error: unexpected EOF

..one can import it to MFS, but then removal is not possible:

$ ipfs files cp /ipfs/QmYw8okuEpxCPhfX3CKbF8mtpmyHPHP9VC3VNhUepytcSh /foo
Error: cp: cannot flush the created file /foo: unexpected EOF

$ ipfs files ls /
foo

$ ipfs files rm /foo
Error: unexpected EOF

🙈

I imagine we should

  • guard files cp against EOF somehow, so getting into this mess is not possible
  • (and/or) make it possible to files rm even when a file causes unexpected error

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)need/triageNeeds initial labeling and prioritizationtopic/MFSTopic MFS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions