Skip to content

Occasional failure in installed 3.13.0 test_int #125076

Closed

Description

@terryjreedy

On Windows, on tests of 1 and about 14 of 16, so maybe 1 in 10: same failure.

0:00:10 load avg: 11.46 [223/478/1] test_int failed (1 failure)
test test_int failed -- Traceback (most recent call last):
  File "C:\Programs\Python313\Lib\test\test_int.py", line 738, in test_denial_of_service_prevented_str_to_int
    self.assertLessEqual(sw_fail_extra_huge.seconds, sw_convert.seconds/2)
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 0.015625 not less than or equal to 0.0078125

I expect not Windows specific

Activity

  1. added
    testsTests in the Lib/test dir
    interpreter-core(Objects, Python, Grammar, and Parser dirs)
    3.13only security fixes
    on Oct 7, 2024
  2. zware commented on Oct 7, 2024

    @zware
    Member

    I've seen this now and then on buildbots. I believe it is Windows-specific and due to clock resolution.

  3. terryjreedy commented on Oct 7, 2024

    @terryjreedy
    MemberAuthor

    If so, then the assertion value should be doubled on Windows.

  4. terryjreedy commented on Oct 7, 2024

    @terryjreedy
    MemberAuthor

    @encukou The failing line 738 is one you merged.

  5. gpshead commented on Oct 8, 2024

    @gpshead
    Member

    if it is only being flaky on a specific platform feel free to add a platform specific skip. we only need this to run in CI on at least one tier1 platform. 0.015625 not less than or equal to 0.0078125 suggests the timer resolution is 0.0078125 and thus it's easy to be skewed by interruptions or aliasing around timer tick boundaries. potentially more common on faster machines.

  6. gpshead commented on Oct 8, 2024

    @gpshead
    Member

    (this skip is worth backporting to all branches that contain this test)

  7. skirpichev commented on Oct 8, 2024

    @skirpichev
    Member

    (All supported branches have this test.)

  8. encukou commented on Oct 8, 2024

    @encukou
    Member

    For background: since this test was added, converting to str was optimized so much that it takes less than a Windows clock tick. But, I haven't been able to reproduce this reliably outside buildbots.

    @terryjreedy, do you see this on a machine where you could test a fix?

    The failing line 738 is one you merged.

    Yes, for #114911, I factored out similar logic from a couple of places in the tests. I didn't make the timeouts smaller. (Didn't mean to, anyway.)
    That issue is still open. I'll close this as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13only security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)testsTests in the Lib/test dir

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions