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:
- Have a snapshot that is delete protected
rustic snapshots -i
- Mark this snapshot
ctrl-p to queue removing delete protection
f to queue forgetting the snapshot
- A snapshot with delete protection cannot be marked without first removing it
w to write changes
- Crash
After the crash rustic consistently seems to be in the following state:
- received SIGABRT
- All? marked snapshots successfully had delete protection removed, can be seen on the next run
- Marked snapshots are NOT forgotten
- 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.
- Have a snapshot that is delete protected
rustic snapshots -i
- Mark this snapshot
ctrl-p to queue removing delete protection
w to write changes
f to queue forgetting the snapshot
w to write changes
- 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.
rustic snapshots -icrashes if attempting to remove delete protection and forget snapshot in a singlewwrite operation for the same marked snapshots.Repro:
rustic snapshots -ictrl-pto queue removing delete protectionfto queue forgetting the snapshotwto write changesAfter the crash rustic consistently seems to be in the following state:
11. This could be done in a panic hook, even in combination with and without changing
human-panic, by chaining withstd::panic::take_hook. If I have time I may try and PR this.Workaround:
It works correctly if I
wwrite beforefforgetting.rustic snapshots -ictrl-pto queue removing delete protectionwto write changesfto queue forgetting the snapshotwto write changesCrash report:
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.