Bug 2109120 - Tarfile test failure on ppc64le
Summary: Tarfile test failure on ppc64le
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python3.6
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Charalampos Stratakis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PPCTracker F36FTBFS F37FTBFS
TreeView+ depends on / blocked
 
Reported: 2022-07-20 12:52 UTC by Petr Viktorin (pviktori)
Modified: 2022-08-03 12:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-08-03 12:11:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Python 35772 0 None None None 2022-07-20 13:00:12 UTC

Description Petr Viktorin (pviktori) 2022-07-20 12:52:34 UTC
A test for unpacking tarballs with sparse files fails on ppc64le on Koschei (Rawhide & f36):

FAIL: test_sparse_file_00 (test.test_tarfile.GNUReadTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.15/Lib/test/test_tarfile.py", line 971, in test_sparse_file_00
    self._test_sparse_file("gnu/sparse-0.0")
  File "/builddir/build/BUILD/Python-3.6.15/Lib/test/test_tarfile.py", line 965, in _test_sparse_file
    self.assertLess(s.st_blocks * 512, s.st_size)
AssertionError: 131072 not less than 86016


Note that 131072 is 256*512.
The issue might be in *reporting* allocated blocks, anywhere along the path:
- Python's assumption that st_block is measured in 512b units (AFAICS it should cuse DEV_BSIZE to be portable)
- converting stat.st_block to the Python stat result object
- libc stat()
- kernel/filesystem
- the test logic using some other wrong assumption

Or the issue might be in the actual tarball unpacking.

Comment 2 Dan Horák 2022-07-20 14:08:49 UTC
yeah, different kernel page size or different filesystem look as plausible reasons for the failure to me

Comment 4 Victor Stinner 2022-08-02 10:14:46 UTC
> This was fixed in RHEL 8 but not in Fedora :(

Oh sorry, I only fixed the issue in Python upstream and in RHEL. The issue is very specific to test_tarfile on ppc64 with tmpfs filesystem. It's good to backport the fix, it's simple and should repair Koschei :-)


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