Skip to content

rustic-rs Crash Report - rustic snapshots -i crashes if attempting to remove delete protection and forget snapshot in a single w write operation #1252

@DianaNites

Description

@DianaNites

rustic snapshots -i crashes if attempting to remove delete protection and forget snapshot in a single w write operation for the same marked snapshots.

Repro:

  1. Have a snapshot that is delete protected
  2. rustic snapshots -i
  3. Mark this snapshot
  4. ctrl-p to queue removing delete protection
  5. f to queue forgetting the snapshot
    1. A snapshot with delete protection cannot be marked without first removing it
  6. w to write changes
  7. Crash

After the crash rustic consistently seems to be in the following state:

  1. received SIGABRT
  2. All? marked snapshots successfully had delete protection removed, can be seen on the next run
  3. Marked snapshots are NOT forgotten
  4. Terminal state is not returned to normal
    11. This could be done in a panic hook, even in combination with and without changing human-panic, by chaining with std::panic::take_hook. If I have time I may try and PR this.

Workaround:

It works correctly if I w write before f forgetting.

  1. Have a snapshot that is delete protected
  2. rustic snapshots -i
  3. Mark this snapshot
  4. ctrl-p to queue removing delete protection
  5. w to write changes
  6. f to queue forgetting the snapshot
  7. w to write changes
  8. Success, no crash

Crash report:

name = "rustic-rs"
operating_system = "Arch Linux Rolling Release [64-bit]"
crate_version = "0.8.1"
explanation = """
Panic occurred in file '/home/diana/.config/cargo/registry/src/index.crates.io-6f17d22bba15001f/rustic_core-0.3.1/src/backend/decrypt.rs' at line 324
"""
cause = 'called `Result::unwrap()` on an `Err` value: removing file failed: `Os { code: 2, kind: NotFound, message: "No such file or directory" }`'
method = "Panic"
backtrace = """

   0: 0x5b9dcba586d3 - <unresolved>
   1: 0x5b9dcba5801f - <unresolved>
   2: 0x5b9dcba5942b - <unresolved>
   3: 0x5b9dcb072ecf - <unresolved>
   4: 0x5b9dcb0753c8 - <unresolved>
   5: 0x5b9dcb074fe0 - <unresolved>
   6: 0x5b9dcbc5b0cb - <unresolved>
   7: 0x7affd9c9339d - <unresolved>
   8: 0x7affd9d1849c - <unresolved>
   9:        0x0 - <unresolved>"""

backtrace doesn't seem very useful, i assume because rustic disables debuginfo

The reported panic location is always the same, but the number of lines for the backtrace changes between runs, i've seen from 9 to 13.

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-triageStatus: Waiting for a maintainer to triage this issue/PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions