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.
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle. Changing version to 39.