Skip to content

Server move fails: unpacker mishandles tar entries >100 chars ("Archive entry … is not listed in the manifest") #4499

Description

@amitav13

What happened

Moving the server (serverMove experiment) to a second persistent Mac fails at Start the new server:

The machine couldn't unpack the export: Archive entry
attachments/proj_<id>/files/attachments/proj_<id>/<long-attachment-name>.svg
is not listed in the manifest

Earlier steps succeed: stop running work → update skipped (target already on 0.44.0) → export (192 MB) → send data to target. The server stays put, as documented.

Why (from inspecting the export)

The export archive itself looks correct. I ran bb server export and inspected it:

  • The tar entry is files/attachments/proj_<id>/<name>.svg. The path is 146 characters, so it's written with a pax extended header (path= record). Python's tarfile and bsdtar read it correctly.
  • manifest.json lists it as attachments/proj_<id>/<name>.svg, which matches once the files/ prefix is removed.
  • It is the first entry in the archive longer than 100 characters. Every entry before it is shorter and unpacked fine.
  • The unpacker on the target reports the name as attachments/proj_<id>/files/attachments/proj_<id>/<name>.svg. It looks like the pax path (or a ustar prefix/name split) is being joined onto the wrong base instead of replacing the header's name field.

This isn't specific to one file: 68,786 of the 68,920 entries in my export are longer than 100 characters, mostly files/plugins/cache/git/.... So any real-world server move will probably fail the same way.

Repro

  1. Have a server with any stored file whose export path is longer than 100 characters (for example an attachment with a long generated filename, or any git plugin in plugins/cache).
  2. bb settings experiment serverMove true
  3. bb server move --to <other machine>; --check passes.
  4. The move fails at "Start the new server" with the error above.

Environment

  • bb-app 0.44.0 on both machines (macOS, Apple Silicon). The source server runs in the desktop app; the target is a manually enrolled persistent machine.
  • bb connect address (not a direct URL).

Expected

The unpacker honours pax path records (and ustar prefix) for long names, so the move completes.

I haven't tried bb server import on the target yet, so I don't know whether the offline import shares the same unpacker.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    hostHost daemon, process lifecycle, memory, event loop

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions