Repository navigation
test_unicodedata: test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots #99892
Copy link
Copy link
Closed
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
For a few weeks, test_unicodedata.test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots.
IMO the test should be skipped on download error, rather than treating a download error as a test failure.
Example: https://buildbot.python.org/all/#/builders/33/builds/3031
FAIL: test_normalization (test.test_unicodedata.NormalizationTest.test_normalization)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 591, in _read_chunked
value.append(self._safe_read(chunk_left))
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 632, in _safe_read
raise IncompleteRead(data, amt-len(data))
http.client.IncompleteRead: IncompleteRead(8113 bytes read, 2337 more expected)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/test_unicodedata.py", line 362, in test_normalization
testdata = open_urlresource(TESTDATAURL, encoding="utf-8",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/support/__init__.py", line 671, in open_urlresource
s = f.read()
^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 295, in read
return self._buffer.read(size)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/_compression.py", line 118, in readall
while data := self.read(sys.maxsize):
^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 500, in read
buf = self._fp.read(READ_BUFFER_SIZE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/gzip.py", line 90, in read
return self.file.read(size)
^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 459, in read
return self._read_chunked(amt)
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/http/client.py", line 597, in _read_chunked
raise IncompleteRead(b''.join(value)) from exc
http.client.IncompleteRead: IncompleteRead(106486 bytes read)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-rawhide-ppc64le.clang/build/Lib/test/test_unicodedata.py", line 368, in test_normalization
self.fail(f"Could not retrieve {TESTDATAURL}")
AssertionError: Could not retrieve http://www.pythontest.net/unicode/15.0.0/NormalizationTest.txt
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
vstinner commentedon Dec 5, 2022
Local patch to trigger the bug:
Command to reproduce the bug using the patch:
gh-99892: test_unicodedata: skip test on download failure (#100011)
pythongh-99892: test_unicodedata: skip test on download failure (pythâĶ
pythongh-99892: test_unicodedata: skip test on download failure (pythâĶ
gh-99892: test_unicodedata: skip test on download failure (GH-100011)
gh-99892: test_unicodedata: skip test on download failure (GH-100011)
zware commentedon Dec 5, 2022
I've started wondering lately if we'd be better served to migrate those test files into the repository.
vstinner commentedon Dec 5, 2022
How many files are we talking about? NormalizationTest.txt takes 2.6 MB.
My notes on these files: https://pythondev.readthedocs.io/infra.html#services-used-by-unit-tests
Another example: Lib/test/test_codecmaps_cn.py downloads http://www.pythontest.net/unicode/EUC-CN.TXT which takes 104 KB.
vstinner commentedon Dec 5, 2022
Files containing
pythontest.net/unicode/pattern:I don't know who manages http://www.pythontest.net/unicode/ nor how it is updated to a new Unicode version.
@benjaminp wrote:
vstinner commentedon Dec 6, 2022
Issue fixed by: 2488c1e
Please open a new issue if you want to include these Unicode TXT files directly into Python Git repository.