ricardomv / snapper-gui

GUI for snapper, a tool for Linux filesystem snapshot management, works with btrfs, ext4 and thin-provisioned LVM volumes
GNU General Public License v2.0
219 stars 32 forks source link

dbus.exceptions.DBusException when trying to find file difference #39

Open MasterCATZ opened 4 years ago

MasterCATZ commented 4 years ago

Ubuntu 18.04

Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/snappergui/changesWindow.py", line 138, in on_idle_init_paths_tree snapper.CreateComparison(self.config,self.snapshot_begin,self.snapshot_end) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in call **keywords) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking message, timeout) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

when I first installed snapper it all seemed to work 1 week later when I needed it .. it started doing this

still unsure what happened some time after snapshot 10 a folder was wiped issue being folders contents spanned across 20 disks would be nice using a gui instead of doing

snapper -c SRD9NA1B8 -v undochange 1..161 /mnt/SnapRaidArray/SRD9NA1B8/ ... for each and every file / mounted disk

possibly a python related issue ?

their are 7201 changes for that disk alone that should be showing according to snapper -c SRD7NA1B8 status 1..34

aio@aio:/etc/snapper/configs$ sudo apt install python3 [sudo] password for aio: Reading package lists... Done Building dependency tree
Reading state information... Done python3 is already the newest version (3.6.7-1~18.04). 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade. aio@aio:/etc/snapper/configs$ sudo apt install libgtksourceview-3.0-1 Reading package lists... Done Building dependency tree
Reading state information... Done libgtksourceview-3.0-1 is already the newest version (3.24.7-1). libgtksourceview-3.0-1 set to manually installed. 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade. aio@aio:/etc/snapper/configs$ sudo apt install gir1.2-gtksource-3.0 Reading package lists... Done Building dependency tree
Reading state information... Done gir1.2-gtksource-3.0 is already the newest version (3.24.7-1). 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade. aio@aio:/etc/snapper/configs$ sudo apt install python3-dbus Reading package lists... Done Building dependency tree
Reading state information... Done python3-dbus is already the newest version (1.2.6-1). 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade. aio@aio:/etc/snapper/configs$ sudo apt install python3-setuptools Reading package lists... Done Building dependency tree
Reading state information... Done python3-setuptools is already the newest version (39.0.1-2). 0 to upgrade, 0 to newly install, 0 to remove and 78 not to upgrade. RROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(*args, kwargs) File "/usr/local/lib/python3.6/dist-packages/snappergui/mainWindow.py", line 186, in on_dbus_snapshots_deleted self.configView[config].remove_snapshot_from_tree(deleted) File "/usr/local/lib/python3.6/dist-packages/snappergui/snapshotsView.py", line 80, in remove_snapshot_from_tree for aux, row in enumerate(treemodel): TypeError: 'NoneType' object is not iterable ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(*args, *kwargs) File "/usr/local/lib/python3.6/dist-packages/snappergui/mainWindow.py", line 186, in on_dbus_snapshots_deleted self.configView[config].remove_snapshot_from_tree(deleted) File "/usr/local/lib/python3.6/dist-packages/snappergui/snapshotsView.py", line 80, in remove_snapshot_from_tree for aux, row in enumerate(treemodel): TypeError: 'NoneType' object is not iterable ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(args, kwargs) File "/usr/local/lib/python3.6/dist-packages/snappergui/mainWindow.py", line 186, in on_dbus_snapshots_deleted self.configView[config].remove_snapshot_from_tree(deleted) File "/usr/local/lib/python3.6/dist-packages/snappergui/snapshotsView.py", line 80, in remove_snapshot_from_tree for aux, row in enumerate(treemodel): TypeError: 'NoneType' object is not iterable ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(*args, *kwargs) File "/usr/local/lib/python3.6/dist-packages/snappergui/mainWindow.py", line 186, in on_dbus_snapshots_deleted self.configView[config].remove_snapshot_from_tree(deleted) File "/usr/local/lib/python3.6/dist-packages/snappergui/snapshotsView.py", line 80, in remove_snapshot_from_tree for aux, row in enumerate(treemodel): TypeError: 'NoneType' object is not iterable ERROR:dbus.connection:Exception in handler for D-Bus signal: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message self._handler(args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/snappergui/mainWindow.py", line 186, in on_dbus_snapshots_deleted self.configView[config].remove_snapshot_from_tree(deleted) File "/usr/local/lib/python3.6/dist-packages/snappergui/snapshotsView.py", line 80, in remove_snapshot_from_tree for aux, row in enumerate(treemodel):

Screenshot from 2019-12-02 08-24-14

philipp-classen commented 3 years ago

Comparing two snapshots can take a while. If it exceeds the default timeout of dbus (25 seconds in my case), the call times out. That is why the difference window shows no changes.

This is where the call takes place (it proxies to dbus): https://github.com/ricardomv/snapper-gui/blob/f0c67abe0e10cc9e2ebed400cf80ecdf763fb1d1/snappergui/changesWindow.py#L142

This is the exception

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/snappergui/changesWindow.py", line 142, in on_idle_init_paths_tree
    snapper.CreateComparison(self.config, self.snapshot_begin, self.snapshot_end)
  File "/usr/lib/python3.9/site-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3.9/site-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Unfortunately, I'm not familiar with dbus and the Python wrappers, but I assume a quickfix could be to increase the timeout of the blocking dbus call to a huge number (15 minutes). Or switch to async APIs, but that would require more changes.