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

ipfs files write corruption in large HAMTs #3921

@aschmahmann

Description

@aschmahmann
  • Version:
    js-ipfs version: 0.11.1-5ddd0c555cc6577ee15667f4ef4e7f3a3b17d04c
    interface-ipfs-core version: ^0.151.1
    ipfs-http-client version: 1.0.0
    Repo version: 11
    System version: x64/linux
    Node.js version: v16.11.1
    Commit: 5ddd0c5

  • Platform:
    Linux AdinPC 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

  • Subsystem:
    MFS

Severity:

High

Description:

  • Added a large HAMT to jsipfs
  • Copied the directory to MFS
  • Wrote a small file into the new MFS directory
  • Noticed that data disappeared

Steps to reproduce the error:

  1. Extract the zip
  2. jsipfs dag import basehamt.car (the output root CID is QmRrSZQc6bZBvdLzzeWy6ekLW4jGpNfTdiv1MeDstDmiM8)
  3. jsipfs files cp /ipfs/QmRrSZQc6bZBvdLzzeWy6ekLW4jGpNfTdiv1MeDstDmiM8 /hamttest-mfs
  4. cat supermodule_test | jsipfs files write --create /hamttest-mfs/supermodule_test
  5. jsipfs stat /hamttest-mfs (should be QmTES6nWfSKFiDHUfqh4gNpibq9STwrUTjXnUxMsrXcdHC)
  6. jsipfs ls QmRrSZQc6bZBvdLzzeWy6ekLW4jGpNfTdiv1MeDstDmiM8 | wc -l (output is 2006)
  7. jsipfs ls QmTES6nWfSKFiDHUfqh4gNpibq9STwrUTjXnUxMsrXcdHC | wc -l (output is 2005 despite us having just added a new file)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High: Likely tackled by core team if no one steps up

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions