Bug 1838161

Summary: borgbackup fails to build with Python 3.9: AssertionError: assert 0 < (0 * 0.1)
Product: [Fedora] Fedora Reporter: Miro Hrončok <mhroncok>
Component: borgbackupAssignee: Felix Schwarz <fschwarz>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, fschwarz, mhroncok, mplch, nobody+366555
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-22 10:11:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1785415    

Description Miro Hrončok 2020-05-20 14:47:50 UTC
borgbackup fails to build with Python 3.9.0b1.

__________ RemoteArchiverTestCase.test_compression_auto_compressible ___________

self = <borg.testsuite.archiver.RemoteArchiverTestCase testMethod=test_compression_auto_compressible>

    def test_compression_auto_compressible(self):
        size, csize = self._get_sizes('auto,zlib', compressible=True)
>       assert csize < size * 0.1
E       AssertionError: assert 0 < (0 * 0.1)

build/lib.linux-x86_64-3.9/borg/testsuite/archiver.py:2094: AssertionError


For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01395815-borgbackup/

For all our attempts to build borgbackup with Python 3.9, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/borgbackup/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.9:
https://copr.fedorainfracloud.org/coprs/g/python/python3.9/

Let us know here if you have any questions.

Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Felix Schwarz 2020-05-20 14:50:53 UTC
Just a quick note: This bug was auto-assigned to a former packager of borgbackup. Any idea how this happened? pagure lists "fschwarz" as default assignee.

Comment 2 Miro Hrončok 2020-05-20 15:00:39 UTC
(In reply to Felix Schwarz from comment #1)
> Just a quick note: This bug was auto-assigned to a former packager of
> borgbackup. Any idea how this happened? pagure lists "fschwarz" as default
> assignee.

No idea. How long are you the main admin?

Comment 3 Felix Schwarz 2020-05-20 15:04:11 UTC
about 7 months now: https://pagure.io/fesco/issue/2242

Comment 4 Miro Hrončok 2020-05-20 15:10:13 UTC
In that case, please open an infra ticket: https://pagure.io/fedora-infrastructure/issues

Comment 5 Felix Schwarz 2020-05-22 08:42:36 UTC
I started to debug this issue but the test failure is really strange as I can not reproduce this in a rawhide VM with all packages installed from the Python 3.9 COPR.

I suspect there might be a package which was not fully rebuilt (or borg somewhere ships a C/Cython file which needs to be updated for Python 3.9) as indicated by the output of the failing test:

  Remote: <frozen importlib._bootstrap>:228: RuntimeWarning: builtins.type size changed, may indicate binary incompatibility. Expected 872 from C header, got 880 from PyObject

I hope debugging will be easier once the Python 3.9 mass rebuild is done and the side tag is merged into rawhide. I created an upstream issue - maybe it helps also coordinating with other distros just in case they experience a similar issue: https://github.com/borgbackup/borg/issues/5195

Comment 6 Miro Hrončok 2020-05-22 09:55:10 UTC
  Remote: <frozen importlib._bootstrap>:228: RuntimeWarning: builtins.type size
changed, may indicate binary incompatibility. Expected 872 from C header, got
880 from PyObject


This means at least one of the depndencies was build with pre 3.9.0b1 version. That's my fault, sorry about it. Hold on.

Comment 7 Miro Hrončok 2020-05-22 09:58:58 UTC
Running a new build.

Comment 8 Miro Hrončok 2020-05-22 10:11:02 UTC
Sorry for the noise.

Comment 9 Felix Schwarz 2020-05-22 10:14:43 UTC
I just noticed that build 1401712 was successful (https://copr.fedorainfracloud.org/coprs/g/python/python3.9/build/1401712/) so I guess this issue can be closed?

What's strange is that I ran a few builds with the COPR repo enabled just this morning (maybe ~10:00 UTC) and got the same failure consistently while you could just trigger a new build an it works. I tried the "--scrub" parameter and cleared /var/lib/mock of course...

Anyway - thanks for looking into this so quickly. :-)