# tar_malformed

> The tar stream is truncated, has a wrong checksum, or has a missing or non-empty end marker.

The tar stream is truncated, has a wrong checksum, or has a missing or non-empty end marker.

| | |
| --- | --- |
| Kind | Build or validation problem |
| Reported by | Archive validation (registry, room hosts, disko publish) |
| `disko` exit code | 1 (problems) |

The tar inside the archive is damaged: it is truncated, a header checksum is
wrong, or it does not end with exactly two all-NUL blocks and nothing after
them.

## Why it happens

Archive validation reports this code: the registry on upload, and room hosts
before loading. `disko publish` always writes a well-formed tar. You usually
see it for an archive built by another tool (many add extra zero records at
the end) or one that was cut short.

## Wrong

```sh
tar -czf release.tgz game.json src art
```

## Right

```sh
disko publish --dry-run --out release.tgz
```

## See also

- [Publish a release](/get-started/publish)
- [`tar_header_not_canonical`](/errors/tar_header_not_canonical)
