Skip to content

Intermittent "unrecognized configuration name" failure on iOS and Android #118201

Description

@freakboy3742

Bug report

Bug description:

The iOS buildbot is seeing an intermittent testing failure in `test_posix.PosixTester.test_confstr:

======================================================================
ERROR: test_confstr (test.test_posix.PosixTester.test_confstr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/buildbot/Library/Developer/XCTestDevices/4FED991E-7280-4D2F-B63A-C7FECDE66EAD/data/Containers/Bundle/Application/0809D9E4-34B6-4223-A3AD-079D76671D9D/iOSTestbed.app/python/lib/python3.13/test/test_posix.py", line 569, in test_confstr
    self.assertEqual(len(posix.confstr("CS_PATH")) > 0, True)
                         ~~~~~~~~~~~~~^^^^^^^^^^^
ValueError: unrecognized configuration name
----------------------------------------------------------------------

See this PR for the buildbot report; this build is the resulting failure.

The failure appears to be completely transient, affecting ~1 in 10 builds; the next buildbot run almost always passes, with no changes addressing this issue.

I've been unsuccessful reproducing the test locally.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Other

Linked PRs

Activity

  1. self-assigned this
    on Apr 23, 2024
  2. mhsmith commented on Apr 30, 2024

    @mhsmith
    Member

    Until we have time to work out why this is happening, should we skip this test? It's posting iOS buildbot failures on GitHub about once a day, and we don't want to train everyone to ignore them.

  3. freakboy3742 commented on Apr 30, 2024

    @freakboy3742
    ContributorAuthor

    I've pushed up #118452 to skip the test on iOS (for now, at least).

  4. added a commit that references this issue on Apr 30, 2024
  5. changed the title [-]Intermittent test failure on iOS in `test_posix.PosixTester.test_confstr`[/-] [+]Intermittent test failure on iOS when accessing system config variables[/+] on May 1, 2024
  6. freakboy3742 commented on May 1, 2024

    @freakboy3742
    ContributorAuthor

    Doing a full audit of the failures the buildbot has seen, it appears there's another cluster of tests that fail intermittently for a reason that appears similar to the test_posix test.

    Out of 118 builds to date, we've seen:

    • 4 instances of:
    ======================================================================
    ERROR: test_fpathconf (test.test_os.TestInvalidFD.test_fpathconf)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/buildbot/Library/Developer/XCTestDevices/85DA13F3-B7FB-4094-B3E2-5936BFB3D984/data/Containers/Bundle/Application/B95FE44D-AA6C-427B-B3B5-68EB2D062669/iOSTestbed.app/python/lib/python3.13/test/test_os.py", line 2369, in test_fpathconf
        self.check(os.pathconf, "PC_NAME_MAX")
        ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/Users/buildbot/Library/Developer/XCTestDevices/85DA13F3-B7FB-4094-B3E2-5936BFB3D984/data/Containers/Bundle/Application/B95FE44D-AA6C-427B-B3B5-68EB2D062669/iOSTestbed.app/python/lib/python3.13/test/test_os.py", line 2293, in check
        f(os_helper.make_bad_fd(), *args, **kwargs)
        ~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ValueError: unrecognized configuration name
    
    • 2 instances of:
    ======================================================================
    ERROR: test_fd_count (test.test_support.TestSupport.test_fd_count)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/buildbot/Library/Developer/XCTestDevices/4A852A8A-CCCB-441C-8D72-E2EEA20B0EDD/data/Containers/Bundle/Application/9A737A54-B46D-42BE-AACA-F5780789C07E/iOSTestbed.app/python/lib/python3.13/test/test_support.py", line 558, in test_fd_count
        start = os_helper.fd_count()
                ~~~~~~~~~~~~~~~~~~^^
      File "/Users/buildbot/Library/Developer/XCTestDevices/4A852A8A-CCCB-441C-8D72-E2EEA20B0EDD/data/Containers/Bundle/Application/9A737A54-B46D-42BE-AACA-F5780789C07E/iOSTestbed.app/python/lib/python3.13/test/support/os_helper.py", line 634, in fd_count
        MAXFD = os.sysconf("SC_OPEN_MAX")
                ~~~~~~~~~~^^^^^^^^^^^^^^^
    ValueError: unrecognized configuration name
    
    • 2 instances of:
    ======================================================================
    ERROR: test_many_opens (test.test_zipfile.test_core.TestsWithMultipleOpens.test_many_opens)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/Users/buildbot/Library/Developer/XCTestDevices/82B8EC8A-A9A7-4E96-9E26-0D22DE1C6647/data/Containers/Bundle/Application/2BF4ED76-6DB4-44F1-931E-A2CC4F6603B5/iOSTestbed.app/python/lib/python3.13/test/test_zipfile/test_core.py", line 2901, in test_many_opens
        startcount = fd_count()
                     ~~~~~~~~^^
      File "/Users/buildbot/Library/Developer/XCTestDevices/82B8EC8A-A9A7-4E96-9E26-0D22DE1C6647/data/Containers/Bundle/Application/2BF4ED76-6DB4-44F1-931E-A2CC4F6603B5/iOSTestbed.app/python/lib/python3.13/test/support/os_helper.py", line 634, in fd_count
        MAXFD = os.sysconf("SC_OPEN_MAX")
                ~~~~~~~~~~^^^^^^^^^^^^^^^
    ValueError: unrecognized configuration name
    

    The common thread here is the call in os_helper.fd_count() to os.sysconf(); it is raising ValueError rather than OSError; however, as with the test_posix failure, the issue appears to be that a POSIX-specific system configuration variable isn't (reliably) available at runtime.

  7. added a commit that references this issue on May 1, 2024
  8. added 2 commits that reference this issue on May 8, 2024
  9. hugovk commented on Jun 15, 2024

    @hugovk
    Member

    Triage: the linked PRs are merged, is this ready to be closed or is there more to do?

  10. freakboy3742 commented on Jun 16, 2024

    @freakboy3742
    ContributorAuthor

    Yes - this is fully resolved.

  11. added a commit that references this issue on Aug 5, 2024
  12. 40 remaining items

  13. added a commit that references this issue on Mar 18, 2025
  14. added 6 commits that reference this issue on Feb 3, 2026
  15. added 4 commits that reference this issue on Jun 12, 2026
  16. added 4 commits that reference this issue on Oct 2, 2026
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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions