Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

shell.AddDir fails with "unexpected EOF" on directories with very large files #259

@rsamf

Description

@rsamf

When attempting to add a directory with very large files to IPFS, I'm getting an error returned "unexpected EOF". I'm running a private IPFS network with ipfs nodes running ipfs/go-ipfs:release, and cluster nodes running ipfs/ipfs-cluster:v0.14.1.

Tested with go-ipfs-api v0.2.0 and v0.3.0.

To reproduce this while you're in an empty directory, you can create very large files easily like so:

fallocate -l 5120000 a.txt
fallocate -l 5120000 b.txt

Then try running the AddDir method with the path to the directory. With these sizes, AddDir will consistently fail. AddDir can be flaky if the files are lesser in size (say ~5M). It will always work if the files are much lesser (say ~1k).

I noticed that if the directory contains just one gigantic file, AddDir will work without error. But as soon as there is 2 or more files, and at least one of those files is considerably large (at least ~5M), then I will get the "unexpected EOF" error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions