teejee2008 / timeshift

System restore tool for Linux. Creates filesystem snapshots using rsync+hardlinks, or BTRFS snapshots. Supports scheduled snapshots, multiple backup levels, and exclude filters. Snapshots can be restored while system is running or from Live CD/USB.
GNU Lesser General Public License v3.0
4.68k stars 281 forks source link

Timeshift cli segfaults during grub reinstall #429

Open michaldybczak opened 5 years ago

michaldybczak commented 5 years ago

When I want to restore from cli (tty or chroot) timeshift always crashes during grub reinstall step, no matter if I choose yes or not. I get info about "memory access violation" and "segfault", nothing more. The same restore action done from GUI (if possible) works correctly.

I had this problem a few times and luckily, one time I could restore via GUI, the other times I was able to fix the system so the system restore wasn't needed (but I didn't have GUI access). So at this point, not even once cli restore action was successful. Always the same, always in the same place.

System: Operating System: Manjaro Linux KDE Plasma Version: 5.16.0 KDE Frameworks Version: 5.59.0 Qt Version: 5.12.4 Kernel Version: 5.1.11-1-MANJARO OS Type: 64-bit Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 7,7 GiB

Here are logs from the last restore attempt:

[11:00:04] Main: check_dependencies()
[11:00:04] Main: add_default_exclude_entries()
[11:00:04] Main: add_default_exclude_entries(): exit
[11:00:04] update_partitions()
[11:00:04] Device: get_disk_space_using_df(): 4
[11:00:04] Device: get_mounted_filesystems_using_mtab(): 4
[11:00:04] Device: get_filesystems(): 38
[11:00:04] partition list updated
[11:00:04] detect_system_devices()
[11:00:04] Searching subvolume for system at path: /
[11:00:04] Users: test root michaldybczak
[11:00:04] Encrypted home users: 
[11:00:04] Encrypted home dirs:

[11:00:04] Encrypted private dirs:

[11:00:04] Main: load_app_config()
[11:00:04] IconManager: init()
[11:00:04] bin_path: /usr/bin/timeshift
[11:00:04] found images directory: /usr/share/timeshift/images
[11:00:04] Main(): ok
[11:00:04] AppConsole: parse_arguments()
[11:00:04] Main: initialize_repo()
[11:00:04] backup_uuid=07faf2e3-04f6-46fc-9e12-6ae64dc944cf
[11:00:04] backup_parent_uuid=
[11:00:04] Setting snapshot device from config file
[11:00:04] repo: creating from uuid
[11:00:04] SnapshotRepo: from_uuid(): RSYNC
[11:00:04] uuid=07faf2e3-04f6-46fc-9e12-6ae64dc944cf
[11:00:04] SnapshotRepo: init_from_device()
[11:00:04] 
[11:00:04] SnapshotRepo: unlock_and_mount_devices()
[11:00:04] device=/dev/sdc1
[11:00:04] SnapshotRepo: unlock_and_mount_device()
[11:00:04] device=/dev/sdc1
[11:00:04] Device: get_mounted_filesystems_using_mtab(): 4
[11:00:04] SnapshotRepo: load_snapshots()
[11:00:05] loading snapshots from '/run/media/michaldybczak/Segate-ext4/timeshift/snapshots': 7 found
[11:00:05] SnapshotRepo: unlock_and_mount_device(): exit
[11:00:05] Selected snapshot device: /dev/sdc1
[11:00:05] Free space: 94.3 GB
[11:00:05] SnapshotRepo: check_status()
[11:00:05] SnapshotRepo: available()
[11:00:05] is_available: ok
[11:00:05] SnapshotRepo: has_snapshots()
[11:00:05] SnapshotRepo: has_space()
[11:00:05] Device: get_disk_space_using_df(): 1
[11:00:05] SnapshotRepo: check_status(): exit
[11:00:05] SnapshotRepo: init_from_device(): exit
[11:00:05] SnapshotRepo: from_uuid(): exit
[11:00:05] Main: initialize_repo(): exit
[11:00:05] AppConsole: start_application()
[11:00:05] AppConsole: select_snapshot()
[11:00:05] SnapshotRepo: has_snapshots()
[11:00:05] 
[11:00:05] Select snapshot:

[11:00:05] 
[11:00:08] 
[11:00:08] ******************************************************************************
[11:00:08] ******************************************************************************
[11:00:09] AppConsole: init_mounts()
[11:00:09] Main: init_mount_list()
[11:00:09] added: dev: /dev/sda2, path: /home, options: nosuid,nodev,nofail,noatime,x-gvfs-show
[11:00:09] added null entry: /
[11:00:09] added null entry: /boot
[11:00:09] Entry: /dev/sda2 -> /home
[11:00:09] Entry: null -> /
[11:00:09] Entry: null -> /boot
[11:00:09] Main: init_mount_list(): exit
[11:00:09] AppConsole: map_devices()
[11:00:09] selecting: /home
[11:00:09] 
[11:00:09] Select '/home' device (default = /dev/sda2):

[11:00:09] 
[11:00:13] 
[11:00:13] selected: 05f58c13-0021-44f7-abc9-05a091c4535b
[11:00:13] ******************************************************************************
[11:00:13] '/home' will be on 'sda4'
[11:00:13] ******************************************************************************
[11:00:13] 
[11:00:16] ******************************************************************************
[11:00:16] GRUB will NOT be reinstalled
[11:00:16] ******************************************************************************
[11:00:16] Main: get_restore_messages()
scamdotnet commented 3 years ago

Having the same issue.

michaldybczak commented 3 years ago

A lot of time has passed since the start of this case. I'll try to remember to do restore in cli when I will need it. GUI restores worked, so I have no recent data if this issue is still there or not for me.

@scamdotnet , what are your system stats and what version of timeshift are you using?

scamdotnet commented 3 years ago

Yes, this was in the CLI, and I ended up using the GUI and that worked. Since I restored on top of the partition that timeshift was on, I cannot get this data rn, but I do have to repeat the restore because I broke something with enabling grub.

nadrog commented 2 years ago

Having the same issue. timeshift v19.01 Linux version 5.10.63-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1496 SMP PREEMPT Wed Dec 1 15:59:46 GMT 2021