Bug 2097763 - python-threadpoolctl: FTBFS in Fedora Rawhide
Summary: python-threadpoolctl: FTBFS in Fedora Rawhide
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-threadpoolctl
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Sergio Pascual
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Whiteboard:
Depends On:
Blocks: 2099130
TreeView+ depends on / blocked
 
Reported: 2022-06-16 13:32 UTC by Tomáš Hrnčiar
Modified: 2023-07-09 08:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2023-07-09 08:39:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github joblib threadpoolctl issues 128 0 None open test_command_line_command_flag and test_command_line_import_flag: Different num_threads values 2022-06-20 17:27:16 UTC

Description Tomáš Hrnčiar 2022-06-16 13:32:02 UTC
Description of problem:
Package python-threadpoolctl fails to build from source in Fedora Rawhide.

Version-Release number of selected component (if applicable):
3.1.0-2.fc37

Steps to Reproduce:
koji build --scratch f37 python-threadpoolctl-3.1.0-2.fc37.src.rpm

Additional info:
This package is tracked by Koschei. See:
https://koschei.fedoraproject.org/package/python-threadpoolctl

The package is also failing when built with Python 3.11 in side tag[0]. It blocks quite a lot packages so I am setting severity to high.

[0] https://koji.fedoraproject.org/koji/buildinfo?buildID=1984970

Comment 1 Ben Beasley 2022-06-20 12:49:48 UTC
There are two problems here.

----

One is test_architecture, which has an explicit list of very specific microarchitectures, e.g. "SkylakeX", and this comment:

> # XXX: add more as needed by CI or developer laptops

There is a patch, threadpoolctl-koji-arches.patch, that adds "POWER9" and "Z14", but in my opinion this is still too brittle, and the test should be skipped:

> %pytest -v -k 'not test_architecture'

so that the package can be rebuilt on any machine without having to keep whitelisting every new architecture encountered on a Koji builder or Fedora packager machine.

In the linked Koji scratch build, this test failed because "Nehalem" was not in the listed architectures.

----

The other problem is failures in test_command_line_command_flag and test_command_line_import_flag due to disagreement about what “num_threads” should be. In Koji, that looked like:

> E           AssertionError: assert {'filepath': '/usr/lib/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 6, 'prefix': 'libgomp', ...} in [{'architecture': 'Nehalem', 'filepath': '/usr/lib/libopenblaso-r0.3.20.so', 'internal_api': 'openblas', 'num_threads': 30, ...}, {'filepath': '/usr/lib/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 30, 'prefix': 'libgomp', ...}]

On my workstation (16 physical cores, SMT disabled), that looks like:

> E           AssertionError: assert {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 16, 'prefix': 'libgomp', ...} in [{'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.20.so', 'internal_api': 'openblas', 'num_threads': 32, ...}, {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 32, 'prefix': 'libgomp', ...}]

Comment 2 Ben Beasley 2022-06-20 12:56:16 UTC
This is not a Python 3.11 problem. These same tests (and one more) fail—but with different “num_threads” values—when building the current Rawhide version for Fedora 36. On my workstation:

> E           AssertionError: assert {'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.19.so', 'internal_api': 'openblas', 'num_threads': 0, ...} in [{'architecture': 'Zen', 'filepath': '/usr/lib64/libopenblaso-r0.3.19.so', 'internal_api': 'openblas', 'num_threads': .....}, {'filepath': '/usr/lib64/libgomp.so.1.0.0', 'internal_api': 'openmp', 'num_threads': 1, 'prefix': 'libgomp', ...}]

Comment 3 Miro Hrončok 2022-06-20 17:12:07 UTC
I agree about skipping test_architecture.

About the num_threads thing, I have no idea why is this asserted, where is it coming from, or whether it is OK to skip :/

Let's ask upstream?

Comment 4 Miro Hrončok 2022-06-20 17:22:44 UTC
With %pytest -v -k 'not test_architecture'

I got it passing on aarch64 in Koji. So if we want we at least know how to build this, but I am a bit afraid that this is masking an issue.

Comment 5 Miro Hrončok 2022-06-20 17:27:17 UTC
https://github.com/joblib/threadpoolctl/issues/128

Comment 6 Miro Hrončok 2022-06-20 21:09:26 UTC
Built on aarch64 to unblock Python 3.11 rebuilds. Leaving open for other architectures.

Comment 7 Ben Cotton 2022-08-09 13:39:10 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.


Note You need to log in before you can comment on or make changes to this bug.