Bug 2173469 - python-xbout: FTBFS on s390x (two tests fail)
Summary: python-xbout: FTBFS on s390x (two tests fail)
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-xbout
Version: 42
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: david08741
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1998838 2179857
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-27 01:55 UTC by Ben Beasley
Modified: 2025-02-26 12:53 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Complete build log from scratch build on s390x (103.41 KB, text/plain)
2023-02-27 01:55 UTC, Ben Beasley
no flags Details

Description Ben Beasley 2023-02-27 01:55:18 UTC
Created attachment 1946650 [details]
Complete build log from scratch build on s390x

Description of problem:

On s390x, python-xbout FTBFS because two tests fail. Since the package is noarch, this means it will FTBFS occasionally whenever it happens to hit an s390x builder.

Version-Release number of selected component (if applicable): 0.3.4-2.fc38


How reproducible:


Steps to Reproduce:
1. fedpkg co python-xbout
2. cd python-xbout
3. fedpkg switch-branch rawhide
4. fedpkg scratch-build --arches s390x

Actual results:

=================================== FAILURES ===================================
_________________ TestSaveRestart.test_from_restart_to_restart _________________
self = CachingFileManager(<class 'netCDF4._netCDF4.Dataset'>, '/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOU...r': True, 'diskless': False, 'persist': False, 'format': 'NETCDF4'}, manager_id='c94ee74d-09df-4fc5-9969-c0b1b9d0f910')
needs_lock = True
    def _acquire_with_cache_info(self, needs_lock=True):
        """Acquire a file, returning the file and whether it was cached."""
        with self._optional_lock(needs_lock):
            try:
>               file = self._cache[self._key]
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:209: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <xarray.backends.lru_cache.LRUCache object at 0x3fea23b4cc0>
key = [<class 'netCDF4._netCDF4.Dataset'>, ('/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOUT.restart.0.nc',)...obber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), 'c94ee74d-09df-4fc5-9969-c0b1b9d0f910']
    def __getitem__(self, key: K) -> V:
        # record recent use of the key by moving it to the front of the list
        with self._lock:
>           value = self._cache[key]
E           KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOUT.restart.0.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), 'c94ee74d-09df-4fc5-9969-c0b1b9d0f910']
/usr/lib/python3.11/site-packages/xarray/backends/lru_cache.py:55: KeyError
During handling of the above exception, another exception occurred:
self = <xbout.tests.test_boutdataset.TestSaveRestart object at 0x3fe9af71910>
tmp_path = PosixPath('/tmp/pytest-of-mockbuild/pytest-0/test_from_restart_to_restart0')
    def test_from_restart_to_restart(self, tmp_path):
        datapath = Path(__file__).parent.joinpath(
            "data", "restart", "BOUT.restart.*.nc"
        )
>       ds = open_boutdataset(datapath, keep_xboundaries=True, keep_yboundaries=True)
xbout/tests/test_boutdataset.py:2446: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
xbout/load.py:181: in open_boutdataset
    input_type = _check_dataset_type(datapath)
xbout/load.py:588: in _check_dataset_type
    ds = xr.open_dataset(filepaths[0], engine=filetype)
/usr/lib/python3.11/site-packages/xarray/backends/api.py:541: in open_dataset
    backend_ds = backend.open_dataset(
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:578: in open_dataset
    store = NetCDF4DataStore.open(
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:382: in open
    return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:329: in __init__
    self.format = self.ds.data_model
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:391: in ds
    return self._acquire()
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:385: in _acquire
    with self._manager.acquire_context(needs_lock) as root:
/usr/lib64/python3.11/contextlib.py:137: in __enter__
    return next(self.gen)
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:197: in acquire_context
    file, cached = self._acquire_with_cache_info(needs_lock)
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:215: in _acquire_with_cache_info
    file = self._opener(*self._args, **kwargs)
src/netCDF4/_netCDF4.pyx:2486: in netCDF4._netCDF4.Dataset.__init__
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
>   ???
E   AttributeError: 'NoneType' object has no attribute 'dimensions'
src/netCDF4/_netCDF4.pyx:2003: AttributeError
____________________________ TestOpen.test_restarts ____________________________
self = CachingFileManager(<class 'netCDF4._netCDF4.Dataset'>, '/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOU...r': True, 'diskless': False, 'persist': False, 'format': 'NETCDF4'}, manager_id='950bd094-f5af-4060-a98b-71a1ce89b242')
needs_lock = True
    def _acquire_with_cache_info(self, needs_lock=True):
        """Acquire a file, returning the file and whether it was cached."""
        with self._optional_lock(needs_lock):
            try:
>               file = self._cache[self._key]
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:209: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <xarray.backends.lru_cache.LRUCache object at 0x3fea23b4cc0>
key = [<class 'netCDF4._netCDF4.Dataset'>, ('/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOUT.restart.0.nc',)...obber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), '950bd094-f5af-4060-a98b-71a1ce89b242']
    def __getitem__(self, key: K) -> V:
        # record recent use of the key by moving it to the front of the list
        with self._lock:
>           value = self._cache[key]
E           KeyError: [<class 'netCDF4._netCDF4.Dataset'>, ('/builddir/build/BUILD/xbout-0.3.4/xbout/tests/data/restart/BOUT.restart.0.nc',), 'r', (('clobber', True), ('diskless', False), ('format', 'NETCDF4'), ('persist', False)), '950bd094-f5af-4060-a98b-71a1ce89b242']
/usr/lib/python3.11/site-packages/xarray/backends/lru_cache.py:55: KeyError
During handling of the above exception, another exception occurred:
self = <xbout.tests.test_load.TestOpen object at 0x3fe9b5f0c10>
    def test_restarts(self):
        datapath = Path(__file__).parent.joinpath(
            "data", "restart", "BOUT.restart.*.nc"
        )
>       ds = open_boutdataset(datapath, keep_xboundaries=True, keep_yboundaries=True)
xbout/tests/test_load.py:1190: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
xbout/load.py:181: in open_boutdataset
    input_type = _check_dataset_type(datapath)
xbout/load.py:588: in _check_dataset_type
    ds = xr.open_dataset(filepaths[0], engine=filetype)
/usr/lib/python3.11/site-packages/xarray/backends/api.py:541: in open_dataset
    backend_ds = backend.open_dataset(
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:578: in open_dataset
    store = NetCDF4DataStore.open(
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:382: in open
    return cls(manager, group=group, mode=mode, lock=lock, autoclose=autoclose)
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:329: in __init__
    self.format = self.ds.data_model
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:391: in ds
    return self._acquire()
/usr/lib/python3.11/site-packages/xarray/backends/netCDF4_.py:385: in _acquire
    with self._manager.acquire_context(needs_lock) as root:
/usr/lib64/python3.11/contextlib.py:137: in __enter__
    return next(self.gen)
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:197: in acquire_context
    file, cached = self._acquire_with_cache_info(needs_lock)
/usr/lib/python3.11/site-packages/xarray/backends/file_manager.py:215: in _acquire_with_cache_info
    file = self._opener(*self._args, **kwargs)
src/netCDF4/_netCDF4.pyx:2486: in netCDF4._netCDF4.Dataset.__init__
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
>   ???
E   AttributeError: 'NoneType' object has no attribute 'dimensions'
src/netCDF4/_netCDF4.pyx:2003: AttributeError
=============================== warnings summary ===============================

Expected results:

Build succeeds.

Additional info:

Perhaps it is sufficient to (1) make the base package arched, so that you can use %ifarch and the package is built on all architectures, (2) make the binary subpackage python3-xbout noarch, and (3) skip the two affected tests on s390x.

Comment 1 Fedora Release Engineering 2023-08-16 07:10:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 2 Aoife Moloney 2024-11-08 10:48:27 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 3 Aoife Moloney 2025-02-26 12:53:20 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


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