Skip to content

Corrupted segment reference count - corrupted index or hints #8535

Description

@ginkel

Have you checked borgbackup docs, FAQ, and open GitHub issues?

Yes

Is this a BUG / ISSUE report or a QUESTION?

BUG

System information. For client/server mode post info for both machines.

Your borg version (borg -V).

borg 1.4.0

Operating system (distribution) and version.

Ubuntu 24.04

Hardware / network configuration, and filesystems used.

How much data is handled by borg?

~ 3 TB

Full borg commandline that lead to the problem (leave away excludes and passwords)

borg compact --info ssh://<user>@<user>.your-storagebox.de:23/./borg/antares

Describe the problem you're observing.

Hi there,

I guess this started when a nightly borg backup was interrupted by a scheduled hardware maintenance at our ISP. Long story short, compacting throws an error Corrupted segment reference count - corrupted index or hints (see full log below).

I have already tried running borg check --repair as well as deleting the last few archives to no avail.

This is the same machine and remote as in #6140, but the error seems to be different.

Any ideas?

Thanks,
Thilo

Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.

Include any warning/errors/backtraces from the system logs

Nov 10 04:38:00 antares.<domain> systemd[1]: Starting borgmatic.service - borgmatic backup...
Nov 10 04:39:00 antares.<domain> borgmatic[783516]: INFO /etc/borgmatic/config.yaml: Running command for pre-everything hook
Nov 10 04:39:00 antares.<domain> borgmatic[783516]: WARNING Creating btrfs snapshot at /borg-backup
Nov 10 04:39:00 antares.<domain> borgmatic[783516]: WARNING Create a readonly snapshot of '/' in '//borg-backup'
Nov 10 04:39:00 antares.<domain> borgmatic[783516]: INFO hetzner: Creating archive
Nov 10 04:39:07 antares.<domain> borgmatic[783516]: INFO Creating archive at "ssh://<user>@<user>.your-storagebox.de:23/./borg/antares::antares.<domain>-2024-11-10.04:39"
Nov 10 05:24:45 antares.<domain> borgmatic[783516]: INFO hetzner: Pruning archives
Nov 10 05:26:44 antares.<domain> borgmatic[783516]: INFO hetzner: Compacting segments
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20794 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20795 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20796 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20797 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20798 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20799 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20800 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20801 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20802 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20803 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20804 not found, but listed in compaction data
Nov 10 05:26:47 antares.<domain> borgmatic[783516]: INFO Remote: segment 20805 not found, but listed in compaction data
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO Traceback (most recent call last):
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO   File "/.3LcwXLX0gNhr7CrW/python-envs/borg-1.2.8/lib/python3.11/site-packages/borg/remote.py", line 240, in serve
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO     res = f(**args)
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO           ^^^^^^^^^
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO   File "/.3LcwXLX0gNhr7CrW/python-envs/borg-1.2.8/lib/python3.11/site-packages/borg/repository.py", line 505, in commit
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO     self.compact_segments(threshold)
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO   File "/.3LcwXLX0gNhr7CrW/python-envs/borg-1.2.8/lib/python3.11/site-packages/borg/repository.py", line 880, in compact_segments
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO     assert segments[segment] == 0, 'Corrupted segment reference count - corrupted index or hints'
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO            ^^^^^^^^^^^^^^^^^^^^^^
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO AssertionError: Corrupted segment reference count - corrupted index or hints
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO Platform: Linux antares.<domain> 6.8.0-48-generic #48-Ubuntu SMP PREEMPT_DYNAMIC Fri Sep 27 14:04:52 UTC 2024 x86_64
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO Linux: Unknown Linux
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO Borg: 1.4.0  Python: CPython 3.12.3 msgpack: 1.0.3 fuse: pyfuse3 3.3.0 [pyfuse3,llfuse]
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO PID: 816512  CWD: /
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO sys.argv: ['/usr/bin/borg', 'compact', '--info', 'ssh://<user>@<user>.your-storagebox.de:23/./borg/antares']
Nov 10 05:26:51 antares.<domain> borgmatic[783516]: INFO SSH_ORIGINAL_COMMAND: None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions