Skip to content

ci: PyPy 3.11 macOS TLS tests intermittently fail in _cffi_ssl #1077

Open

Description

@dkropachev

Problem

The macOS Intel wheel job intermittently fails in the final pp311-macosx_x86_64 test phase. All 23 TLS-resumption tests fail after PyPy's bundled _cffi_ssl interprets size_t[1] as a char array.

This blocks otherwise green pull requests. The same failure has reproduced on unrelated branches, while nearby runs with the same runner image, PyPy build, and dependency versions pass.

Environment

  • GitHub runner: macos-15-intel
  • Python: 3.11.15
  • PyPy: 7.3.23
  • cibuildwheel: 4.2.1
  • pip: 26.2.1
  • cryptography: 50.0.2
  • pytest: 9.1.1

Failure signature

tests/unit/test_tls_resumption.py:130:
    self._socket.sendall(b'ping')

.../lib/pypy3.11/_cffi_ssl/_stdssl/__init__.py:624:
    count = ffi.new("size_t[1]", [0])

TypeError: initializer for ctype 'char' must be a string of length 1, not int

The affected run finished with 23 failed, 1,287 passed, 90 skipped, and 12 deselected. The failures cover both TLS 1.2 and TLS 1.3 resumption tests. The six CPython macOS wheel phases in the same job passed.

Evidence

Failed runs:

Passing runs with the same PyPy, tool, dependency, and runner-image versions:

The failing driver call is exercised here:

def exchange(self):
self._socket.sendall(b'ping')
assert self._socket.recv(4) == b'ping'

Expected behavior

The macOS Intel PyPy wheel lane should run the TLS-resumption suite reliably, or apply a narrowly scoped runtime-specific workaround for a confirmed upstream defect.

Acceptance criteria

  • The source of the intermittent CFFI type mismatch is identified.
  • An upstream PyPy issue is linked if the defect is outside the driver.
  • The pp311-macosx_x86_64 wheel job no longer fails intermittently on the TLS-resumption suite.
  • TLS-resumption coverage remains enabled on unaffected runtimes and platforms.

Related

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions