Skip to content

[1.2.0a6] KeyError and AssertionError on first backup, subsequent backups do not have errors #4577

@manjaroblack

Description

@manjaroblack

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

Yes

Is this a BUG / ISSUE report or a QUESTION?

BUG / ISSUE report and QUESTION

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

Your borg version (borg -V).

1.2.0a6

Operating system (distribution) and version.

NAME="Manjaro Linux"
Release: 18.0.4
Kernel: Linux 5.1.0-1-MANJARO
Architecture: x86-64

Hardware / network configuration, and filesystems used.

elektrophagous              
    description: Convertible
    product: 80Y7 (LENOVO_MT_80Y7_BU_idea_FM_YOGA 920-13IKB)
    vendor: LENOVO
    version: Lenovo YOGA 920-13IKB
          product: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
          memory: 16GiB

How much data is handled by borg?

80GB

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

borg create -v --stats --progress --compression zstd,22 --chunker-params 10,23,16,4095 $REPO::$HOST-$DATE /
--exclude /dev
--exclude /proc
--exclude /sys
--exclude /var/run
--exclude /run
--exclude /tmp
--exclude /lost+found
--exclude /mnt
--exclude /var/cache
--exclude /home/*/.cache
--exclude /home/ds/Downloads
--exclude /home/lost+found

Describe the problem you're observing.

On the first run of borg create after init, I get an error after about 4GB of deduplicated data. Following backups do not throw any errors.

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

Yes it is reproducible on my system. Happens every time on first backup after init.

Include any warning/errors/backtraces from the system logs

Creating archive at "/run/media/ds/bb::elektrophagous-2019-05-16-23:30"
Exception ignored in: <bound method Repository.__del__ of <Repository /run/media/ds/bb>>                                                                                                                         
Traceback (most recent call last):
  File "borg/repository.py", line 178, in __del__
  File "borg/repository.py", line 431, in close
  File "borg/locking.py", line 383, in release
  File "borg/locking.py", line 282, in modify
KeyError: (('localhost.localdomain@167275820287493', 31031, 0),)
Local Exception
Traceback (most recent call last):
  File "borg/archiver.py", line 574, in do_create
  File "borg/archiver.py", line 527, in create_inner
  File "borg/archiver.py", line 657, in _process
  File "borg/archiver.py", line 657, in _process
  File "borg/archiver.py", line 657, in _process
  File "borg/archiver.py", line 622, in _process
  File "borg/archive.py", line 1229, in process_file
  File "borg/archive.py", line 1085, in process_file_chunks
  File "borg/archive.py", line 1063, in write_part_file
  File "borg/archive.py", line 504, in write_checkpoint
  File "borg/cache.py", line 937, in chunk_decref
  File "borg/repository.py", line 1168, in delete
  File "borg/repository.py", line 498, in prepare_txn
AssertionError: bug in code, exclusive lock should exist here

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "borg/archiver.py", line 164, in wrapper
  File "borg/archiver.py", line 574, in do_create
  File "borg/cache.py", line 488, in __exit__
  File "borg/cache.py", line 520, in close
  File "borg/cache.py", line 312, in close
  File "borg/locking.py", line 383, in release
  File "borg/locking.py", line 282, in modify
KeyError: ('localhost.localdomain@167275820287493', 31031, 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "borg/archiver.py", line 4395, in main
  File "borg/archiver.py", line 4327, in run
  File "borg/archiver.py", line 164, in wrapper
  File "borg/repository.py", line 203, in __exit__
  File "borg/repository.py", line 431, in close
  File "borg/locking.py", line 383, in release
  File "borg/locking.py", line 282, in modify
KeyError: ('localhost.localdomain@167275820287493', 31031, 0)

Platform: Linux elektrophagous 5.1.0-1-MANJARO #1 SMP PREEMPT Mon Mar 18 21:43:04 UTC 2019 x86_64
Linux: arch Manjaro Linux
Borg: 1.2.0a6  Python: CPython 3.6.8 msgpack: 0.6.1
PID: 31031  CWD: /home/ds
sys.argv: ['borg', 'create', '-v', '--stats', '--progress', '--compression', 'zstd,22', '--chunker-params', '10,23,16,4095', '/run/media/ds/bb::elektrophagous-2019-05-16-23:30', '/', '--exclude', '/dev', '--exclude', '/proc', '--exclude', '/sys', '--exclude', '/var/run', '--exclude', '/run', '--exclude', '/tmp', '--exclude', '/lost+found', '--exclude', '/mnt', '--exclude', '/var/cache', '--exclude', '/home/ds/.cache', '--exclude', '/home/ds/Downloads', '--exclude', '/home/lost+found']
SSH_ORIGINAL_COMMAND: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions