Backintime not launching because of python error

Bug #1970090 reported by Jan Morten Rausch
124
This bug affects 24 people
Affects Status Importance Assigned to Milestone
backintime (Ubuntu)
Fix Released
Undecided
Fantu

Bug Description

Expectation: App launches and create an application window.
What happens: App does not launch.

Terminal output:
backintime-qt
Traceback (most recent call last):
  File "/usr/share/backintime/qt/app.py", line 35, in <module>
    import qttools
  File "/usr/share/backintime/qt/qttools.py", line 47, in <module>
    import snapshots
  File "/usr/share/backintime/common/snapshots.py", line 34, in <module>
    import config
  File "/usr/share/backintime/common/config.py", line 32, in <module>
    import tools
  File "/usr/share/backintime/common/tools.py", line 1802, in <module>
    class OrderedSet(collections.MutableSet):
AttributeError: module 'collections' has no attribute 'MutableSet'

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: backintime-qt 1.2.1-3
ProcVersionSignature: Ubuntu 5.15.0-25.25-generic 5.15.30
Uname: Linux 5.15.0-25-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Sun Apr 24 11:54:26 2022
InstallationDate: Installed on 2022-04-23 (0 days ago)
InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Release amd64 (20220419)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: backintime
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Jan Morten Rausch (scytale89) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in backintime (Ubuntu):
status: New → Confirmed
description: updated
Revision history for this message
Fantu (fantonifabio) wrote :

unfortunately the 1.3.2-0.1 that fix it was uploaded on debian only now and therefore not in time for Jammy sync request :(

Revision history for this message
Ventusfahrer (ventusfahrer) wrote :

For those who can't wait for the official fix:

https://launchpad.net/~bit-team/+archive/ubuntu/stable

Revision history for this message
Michele Milano (michele-milano1956) wrote :

Thank you Ventusfahrer! Backintime has been my beloved backup tool for over a decade and after upgrading to 22.04 I had been left kind of "orphan", unable to create any new daily snapshots!
Fortunately this patch has made the trick, until the next Jammy sync!

Revision history for this message
Fantu (fantonifabio) wrote :

Kinetic Kudu have now 1.3.2-0.1 that fix it but I think is good have it also in 22.04, different from version are not many, upstream changes from previous version seems only few other fixes:
https://launchpadlibrarian.net/599163832/backintime_1.2.1-3_1.3.2-0.1.diff.gz

Changed in backintime (Ubuntu):
assignee: nobody → Fantu (fantonifabio)
Revision history for this message
Lastique (andysem) wrote :

I think, 22.04 being an LTS release, must have a working backup software.

Revision history for this message
Michele Milano (michele-milano1956) wrote :

I join fantu and lastique in urging fix 1.3.2-0.1 to be ported to Ubuntu 22.04:
- because 22.04 is an LTS, bound to include a serious, hassle-free, powerful and yet easy-to-use backup tool such as backintime-qt.
- because backintime-qt is far more feature-rich and flexible than the default Ubuntu “Backup” solution (for example it supports “backup as root” from the GUI out of the box) and it is a pity seeing it broken by this late-discovered bug.

By the way: because of the above, I wish that Canonical selected backintime-qt as Ubuntu’s default backup solution, instead of the current simple but poor “Backup” app.

Revision history for this message
Brian Murray (brian-murray) wrote :

From the SRU team's perspective backporting the version of backintime in Kinetic to Jammy would require a more thorough review as opposed to just updating the package with the specific fix for this bug report. If it'd be possible to cherry pick the specific fix, I'd recommend doing that.

Revision history for this message
Fantu (fantonifabio) wrote :

@brain-murray thanks for reply, as linked above the diff is not big and few other bugfix (of the upstream version released near one year ago but included only in package with my recent NMU on debian) may be useful

Revision history for this message
Lastique (andysem) wrote :
Revision history for this message
Tim Nolte (tim-nolte) wrote :

Thanks for providing this fix via the BIT PPA. I've had so many problems with my system since the upgrade to Ubuntu 22.04, this was just one more issue I had to spend time attempting to fix. Pretty disappointing that Ubuntu, and thus derivatives, are now shipping with a bunch of broken software and backup software is the worst thing to ship broken.

Revision history for this message
Ventusfahrer (ventusfahrer) wrote :

backintime-qt 1.2.1-3 fails because of an incompatibility to python 3.10.
python 3.10 is part of Ubuntu 22.04.

Therefore my assumption: the version of backintime-qt contained in Ubuntu 22.04 was never tested. It's simply not starting at all.

So I dont understand the statement, that in order to upgrade backintime to 1.3.2 one have to perform a more thorough review (compared to the one undertaken for the version launched with 22.04)?.

If I read the release comments in backintime's 1.2.1-3 (from 2019) successors 1.3.0, 1.3.1 (both july 2021) and 1.3.2 (march 2022) I can only bug fixes, no new functionality.

If you need a more thorough test: take my test: the version above is working fine on 22.04, much much better than the one distributed with 22.04.

So please update the installation media and/or roll out a fix for backintime using the standard apt update/upgrade procedure. The current situation can't be worse.

Revision history for this message
Fantu (fantonifabio) wrote :

as wrote in comment 6 I think use 1.3.2-0.1 is better for have also few other bugs less but I fear it would be difficult to have it accepted :(
So I prepared a build with only the minimal fix to make possible application start: https://launchpad.net/~fantonifabio/+archive/ubuntu/ubuntu-fixes
https://launchpadlibrarian.net/603033437/backintime_1.2.1-3_1.2.1-3ubuntu0.1.diff.gz
Someone can test it please?
I don't have a Jammy installation for now, if someone will test it I'll create the SRU on the bugtracker also tomorrow, instead I'll create a Jammy vm (also for other tests) and I'll test it probably in the weekend.

Revision history for this message
Ventusfahrer (ventusfahrer) wrote :

if you describe how to access the "patched" backintime version, I will give it a try this evening or tomorrow.

Peter

Revision history for this message
Fantu (fantonifabio) wrote :

is in the ppa in the linked in my previous message ( https://launchpad.net/~fantonifabio/+archive/ubuntu/ubuntu-fixes )

Revision history for this message
Michele Milano (michele-milano1956) wrote :

@fantonifabio: as a normal Ubuntu user, unaware of the official Ubuntu dev/test/release lifecycle but eager to have this bothering bug finally fixed, I have tested your fix at the best of my understanding as follows:

1. sudo add-apt-repository ppa:fantonifabio/ubuntu-fixes
2. sudo apt update
3. clicked on the "Back In Time" desktop launcher (non-root user): success -> Back In Time UI displayed
4. clicked on the "Back In Time (root) desktop launcher (root user): failure -> nothing visible happens
5. Issued command: sudo backintime-qt from the command shell: success -> Back In Time UI displayed, configured with my existing profile.

I think the difference is the scripts invoked by the two desktop launchers: /usr/bib/backintime-qt and /usr/bin/backintime-qt_polkit respectively. What is wrong with the latter, it's hard for me to tell. But I hope this can help your debugging.

However, I agree with @ventusfahrer's assumption that backintime-qt 1.2.1-3 was never tested for Ubuntu 22.04: if it had, the incompatibility with Python 3.10 would have been discovered immediately. So, having to test anyway, why not test Backintime 1.3.2 right away?

I think that, at this point, upgrading Backintime to 1.3.2 could not lead to a worse situation than we are facing now. So I urge Canonical team to go for it.

Overall, as an Ubuntu's fan since 2010, I feel depply disappointed in seeing Ubuntu 22.04, the latest LTS release, coming out with untested packages and undiscovered bugs, just to honor the announced deployment deadline: a delayed release of a fully-tested system is preferrable, in my opinion, to a timely release of a buggy one.

Revision history for this message
Fantu (fantonifabio) wrote :

thanks for testing, after point 2 have you also installed the updated package, right?
I tested 1.3.2-0.1 on debian unstable before upload on it and was working also as root, I suppose related to one of other fixes (but I not checked in code changed now if there are changes related to it), as wrote better porting it to Jammy but difficult that will be accepted.
Probably I prepare a fast build on another ppa with it if someone want test.

@ubuntu developers: can you take a look to this and tell if 1.3.2-0.1 (with some other fixes and some tests done in debian unstable near to jammy release) will be accepted or someone else want invest enough time on an SRU that will be uploaded/accepted shortly instead me.

I don't use Jammy in production for now, I use backintime in production on Focal and I used in Bionic, this is why I invested some time after saw the blocking bug in debian unstable and no activity from maintainers for months.

Unfortunately I saw that it is difficult and takes a long time SRU procedure in ubuntu, when I had spent enough time and waited months for example even for just a small nemo crash fixes that I had already tested extensively and used a lot in production. For this reason I am a bit reluctant to start something that would take me a long time for small results after a long time.
if there will be no one with the possibility of having a good SRU uploaded and accepted quickly, I will try to do myself anyway hoping not to waste too much time and that after having tested well it will be accepted within a few weeks.

Revision history for this message
Michele Milano (michele-milano1956) wrote :
Download full text (3.3 KiB)

@fantu, yes: if I didn't anyhting wrong, I currently have the fix package from
  https://launchpad.net/~fantonifabio/+archive/ubuntu/ubuntu-fixes
installed.

For your information: before your package, I had installed the fix package from
  https://launchpad.net/~bit-team/+archive/ubuntu/stable
mentioned by @ventusfahrer above in this thread.

Not sure what is the difference between these two packages but, as far as I can see, they apparently produce the same outcome: in both cases, backintime-qt only starts for root user if invoked using sudo from the command line, not from the .desktop launcher.

For clarity, Here's the full story of my attempts so far:

ATTEMPT 1
Eager to resume daily backups of my main home PC after the recent Ubuntu 22.04 fresh install:
1.1 I added https://launchpad.net/~bit-team/+archive/ubuntu/stable repository using the Ubuntu "Software and Updates" tool. As usual, repositories got updated when I hit the "Close" button.
1.2 Using the Synaptic tool, I "Completely remove"d backintime-qt, then I reinstalled it.
1.3 To test the fix, I clicked on the "Back In Time (root)" desktop launcher. Outcome: Backintime not launching.
1.4 In the command shell (Gnome Terminal), I issued commend "sudo backintime-qt". Outcome: Backintime launched normally.
Sorry that it didn't occur to me to test non-root backintime, since I do not normally use it.

Now, at least, I could access and use the Backintime's GUI as root again, almost as I did in Ubuntu 20.04, but only launching it from the command line. Not much satisfacory. But now I started getting a number of "WITH ERRORS" snapshots mixed with successful snapshots, which may or may not be related to the unofficial fix I had installed. Having no better options I decided to keep it, waiting for an official fix.

ATTEMPT 2
Hoping that your fix is brings some progress, I decided to remove the one from bit-team and install this one. My steps:
2.1 sudo add-apt-repository ppa:fantonifabio/ubuntu-fixes
2.2 sudo apt update
2.3 In the "Software and Updates" tool I unticked https://launchpad.net/~bit-team/+archive/ubuntu/stable repository. As usual, repositories got updated when I hit Close button.
2.4 Using the Synaptic tool, I "Completely remove"d backintime-qt, then reinstalled it.

If I'm not wrong, now the new fix has completely replaced the previous one.

2.5 To test the fix, I clicked on the "Back In Time" .desktop launcher (non-root user). Outcome: Backintime GUI launched normally
2.6 I clicked on the "Back In Time (root) .desktop launcher (root user). Outcome: Backintime not launching.
2.7 In the Gnome command shell I issued command: sudo backintime-qt. Outcome: Backintime GUI launched normally.

Now, if I may, I wish to share one general consideration: it is good for the @ubuntu change acceptance procedures ("SRU"s?) to be accurate, strict and therefore slow, provided that this guarantees consistent, bug-free distribution packages.

But if, for any reasons, the @ubuntu team cannot afford any more the resources to keep their commitment to high-quality standards, which seems to be the case with Ubuntu 22.04, I would expect that change acceptance procedures be also adapted c...

Read more...

Revision history for this message
Fantu (fantonifabio) wrote (last edit ):

Thanks for all details of your tests.
I did a very fast build for possible SRU of 1.3.2-0.1 in this another ppa: https://launchpad.net/~fantonifabio/+archive/ubuntu/ubuntu-fixes2
But don't have additional debian/patches so should be the same of upstream ppa (https://launchpad.net/~bit-team/+archive/ubuntu/stable) and I suppose you will have the same result launching as root from desktop icon.
From a very fast look on upstream (https://github.com/bit-team/backintime) commits after 1.3.2 and upstream PR I don't saw possible fix related to this.
I need to reproduce it when I'll create a Jammy vm to try to understand the cause, on my tests on debian unstable the start as root was working correctly.
The only thing that comes to my mind is recent pkexec split into a separate package but I didn't add in deps on my recent NMU on debian.

Can you check if you have pkexec package installed please? if not is the cause and I must add also its dep. in my SRU patch.

Revision history for this message
Michele Milano (michele-milano1956) wrote :

@fantu, yes: I do have pkexec installed:

michele@pc-michele:~$ apt list pkexec
Elencazione... Fatto
pkexec/jammy,now 0.105-33 amd64 [installato, automatico]
pkexec/jammy 0.105-33 i386
michele@pc-michele:~$

Revision history for this message
Fantu (fantonifabio) wrote (last edit ):

I saw that pkexec is dep. of policykit-1, a dep. of backintime so add a pkexec dep. is not needed in SRU.
I prepared a Jammy vm and did a fast test of backintime from my ppa.
I saw that launch from icon as root crash, I found that is a pkexec bug with wayland (now default), with xorg works correctly.
Is an "old" bug already reported here: https://bugs.launchpad.net/ubuntu/+source/backintime/+bug/1713313

Edit:
is not a "bug" but as copied from one comment:
This is a known limitation and design choice that Wayland doesn't allow
root privileged applications to work.

One workaround is to run this before the graphical program that need to run as root but don't seems good:
  xhost +si:localuser:root

I suppose that the best should be for backintime to changes to don't launch as root but as users and require root privilege only for execute some specific operations

Revision history for this message
Fantu (fantonifabio) wrote :
Fantu (fantonifabio)
Changed in backintime (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.