Skip to content

[v8] fix: do not eagerly read Connection.serverPostConnectionCheck - #8786

Merged
aldbr merged 1 commit into
DIRACGrid:rel-v8r0from
chrisburr:fix/m2crypto-post-connection-check-rel-v8r0
Sep 11, 2026
Merged

[v8] fix: do not eagerly read Connection.serverPostConnectionCheck#8786
aldbr merged 1 commit into
DIRACGrid:rel-v8r0from
chrisburr:fix/m2crypto-post-connection-check-rel-v8r0

Conversation

@chrisburr

Copy link
Copy Markdown
Member

Independent of the m2crypto version bump. m2crypto 0.46.0 removed the
serverPostConnectionCheck class attribute from SSL.Connection; DIRAC used it
as the default argument of a getattr() lookup, and Python evaluates that
default eagerly, so every server-side handshake raised AttributeError. The
current <0.46 pin is the only reason this has not been hit in production.

Verified against Test_SSLTransport.py: 4 passed with m2crypto 0.45.1 (no-op)
and 4 passed with 0.50.0, where each M2 test previously hung for
BaseTransport.iReadTimeout (600s) and cancelled the job.

Refs DIRACGrid/DIRACOS2#192

BEGINRELEASENOTES

*Core
FIX: server-side DISET handshakes no longer raise AttributeError with m2crypto >=0.46

ENDRELEASENOTES

m2crypto 0.46.0 removed the serverPostConnectionCheck class attribute from
SSL.Connection. It was used as the default argument of a getattr() lookup,
and Python evaluates that default eagerly, so every server-side handshake
raised AttributeError regardless of whether postConnectionCheck was set.

Look the fallback up with getattr() too, matching what M2Crypto's own
Connection.accept() now does.

BEGINRELEASENOTES

*Core
FIX: server-side DISET handshakes no longer raise AttributeError with m2crypto >=0.46

ENDRELEASENOTES
@aldbr
aldbr merged commit c1c91eb into DIRACGrid:rel-v8r0 Sep 11, 2026
22 checks passed
@DIRACGridBot DIRACGridBot added the sweep:ignore Prevent sweeping from being ran for this PR label Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sweep:ignore Prevent sweeping from being ran for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants