vorta icon indicating copy to clipboard operation
vorta copied to clipboard

IndexError-caused crash

Open pal-2 opened this issue 1 year ago • 1 comments

Happened while I was trying to delete a lot (many dozens) of old archives from a repo. I reduced borg's priority to batch and (I/O) to idle to reduce CPU load. After the crash happened, Vorta restarted automatically, as normal, and I saw that the archives were successfully deleted, so the crash did not affect that and likely happened after the conclusion of the deletion process.

Info:

OS: Arch Linux Kernel: Linux Zen SMP PREEMPT_DYNAMIC Fri, 01 Nov 2024 03:30:35 +0000 Kernel Version: 6.11.6 Datetime: 2024-11-14 12:00:22 -0300 Borg: 1.4.0 Vorta: 0.10.0

Logs:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/peewee.py", line 7253, in get
    return clone.execute(database)[0]
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "/usr/lib/python3.12/site-packages/peewee.py", line 4553, in __getitem__
    return self.row_cache[item]
           ~~~~~~~~~~~~~~^^^^^^
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/vorta/views/archive_tab.py", line 922, in delete_result
    ArchiveModel.get(name=archive).delete_instance()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/peewee.py", line 6805, in get
    return sq.get()
           ^^^^^^^^
  File "/usr/lib/python3.12/site-packages/peewee.py", line 7256, in get
    raise self.model.DoesNotExist('%s instance matching query does '
vorta.store.models.ArchiveModelDoesNotExist: <Model: ArchiveModel> instance matching query does not exist:
SQL: SELECT "t1"."id", "t1"."snapshot_id", "t1"."name", "t1"."repo_id", "t1"."time", "t1"."duration", "t1"."size", "t1"."trigger" FROM "archivemodel" AS "t1" WHERE ("t1"."name" = ?) LIMIT ? OFFSET ?
Params: ['archive@2024-08-31_23:07', 1, 0]

pal-2 avatar Nov 14 '24 15:11 pal-2

Possible duplicate of #2070 or at least related? The error msg differs slightly, maybe because higher py version here.

madeddy avatar Dec 05 '24 16:12 madeddy