ipfs / go-mfs

An in memory model of a mutable IPFS filesystem
MIT License
46 stars 26 forks source link

crashing MFS with non-cached MerkleDAG #83

Closed michel47 closed 1 year ago

michel47 commented 3 years ago

Dear IPFS team, I encountered a problem with some block were missing from a directory w/i the MFS tree, in order to make the problem 'repeatable' I wrote the following script, every subsequent mfs command is timing out ...

# adding a directory w/ missing part!

qmdir=$(ipfs add -n -r -Q .)
echo qmdir: $qmdir

sed -e "s/Qm1234/$qmdir/" > dir.json <<EOF
{ "data" : "CAE=",
  "links" : [
   { "Cid" : { "/" : "Qm1234" }, "Name" : "not-here" }
  ]
}
EOF

qm=$(cat dir.json | ipfs dag put -f protobuf)
echo qm: $qm;
ipfs files rm -r /dont-do-ls 2>/dev/null
ipfs files cp /ipfs/$qm /dont-do-ls
ipfs files stat /dont-do-ls

ipfs object get $qm --data-encoding base64
ipfs --timeout 2s ls /ipfs/$qm
ipfs files ls -l /
ipfs --timeout 2s files ls -l /dont-do-ls

ipfs --timeout 2s files stat /

true;
welcome[bot] commented 3 years ago

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review. In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment. Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

Finally, remember to use https://discuss.ipfs.io if you just need general support.

schomatis commented 3 years ago

Hi @michel47, running this locally doesn't time out for the current MFS version in go-ipfs v0.8.0, just returns Error: merkledag: not found. Could you confirm if this is still a problem or if we can close it?

michel47 commented 3 years ago

The problem is still there, let me attached a transcript, is you have merkledag: not found it might simply be that your ipfs daemon is not running, please send me your log or its url, thanks

note: I am also running v0.8.0

This is what I have executed :

ipfs get Qmcz7VLgUyhXnUQ9CLaZSpk1P5PGeVkf6L7uMyYwHdx5ST -o issue83
cd issue83
sh test.sh

and this is the logfile from screen

qmdir: QmSW8egCbo1JxHYB9oVAuwDVKrAVkWQMwbCu4sUWDqr6XN
qm: Qma2nqq9rYCk8dWv2zoroMKZRujDyccoEmKZ9xoAajRrcp
Qma2nqq9rYCk8dWv2zoroMKZRujDyccoEmKZ9xoAajRrcp
Size: 0
CumulativeSize: 54
ChildBlocks: 1
Type: directory
{"Links":[{"Name":"not-here","Hash":"QmSW8egCbo1JxHYB9oVAuwDVKrAVkWQMwbCu4sUWDqr6XN","Size":0}],"Data":"CAE="}
Error: context deadline exceeded
.../    QmY1iB7DKsDC6vdahHQ4gpcZrTCKLakpBoYnBB94srNxNP  0
dont-do-ls/ Qma2nqq9rYCk8dWv2zoroMKZRujDyccoEmKZ9xoAajRrcp  0
etc/    QmSrCo7j4JnfKJqyHXvAgiTZn1CZLe7FYAoG7yZgpS7DeT  0
my/ QmeD79eRi2QamUYumAf97sNMsgjRxaJkRWjW1p8DZesDU9  0
public/ QmUPtfEJBrfFEaBLXVx8NXBFWZwtZ9rRz45CsE8i5sMf2h  0
root/   Qmb5EWCGmiw6162BFCVqnd82cmQXFdgAsKMtbFfoZ8Y3fp  0
Error: context deadline exceeded
Error: context deadline exceeded
aschmahmann commented 1 year ago

This repository is no longer maintained and has been copied over to Boxo. In an effort to avoid noise and crippling in the Boxo repo from the weight of issues of the past, we are closing most issues and PRs in this repo. Please feel free to open a new issue in Boxo (and reference this issue) if resolving this issue is still critical for unblocking or improving your usecase.

You can learn more in the FAQs for the Boxo repo copying/consolidation effort.