Skip to content

gh-155835: fix digest_size data race on BLAKE-2 objects - #155839

Merged
picnixz merged 5 commits into
python:mainfrom
picnixz:meta/crypto/c/36/blake2-hash-critical-sections-155835
Sep 6, 2026
Merged

gh-155835: fix digest_size data race on BLAKE-2 objects#155839
picnixz merged 5 commits into
python:mainfrom
picnixz:meta/crypto/c/36/blake2-hash-critical-sections-155835

Conversation

@picnixz

@picnixz picnixz commented Aug 15, 2026

Copy link
Copy Markdown
Member

@picnixz
picnixz requested a review from gpshead as a code owner August 15, 2026 11:20
@picnixz picnixz added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes awaiting core review and removed awaiting core review needs backport to 3.13 bugs and security fixes labels Aug 15, 2026
@picnixz

picnixz commented Aug 15, 2026

Copy link
Copy Markdown
Member Author

Note to myself: I should add tests. I forgot about that and will do it tomorrow probably.

Comment thread Lib/test/test_hashlib.py Outdated
@picnixz
picnixz merged commit 878b5e2 into python:main Sep 6, 2026
54 checks passed
@picnixz
picnixz deleted the meta/crypto/c/36/blake2-hash-critical-sections-155835 branch September 6, 2026 16:49
@miss-islington-app

Copy link
Copy Markdown

Thanks @picnixz for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Sorry, @picnixz, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 878b5e256aa40c45e12a0cd5c63f8a249f7c3704 3.15

@miss-islington-app

Copy link
Copy Markdown

Sorry, @picnixz, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 878b5e256aa40c45e12a0cd5c63f8a249f7c3704 3.14

@bedevere-bot

Copy link
Copy Markdown

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Windows PGO Tailcall 3.x (tier-1) has failed when building commit 878b5e2.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1870/builds/1300) and take a look at the build logs.
  4. Check if the failure is related to this commit (878b5e2) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1870/builds/1300

Failed tests:

  • test.test_asyncio.test_sslproto
  • test_regrtest

Failed subtests:

  • test_shutdown_corrupted_ssl_sends_close_notify - test.test_asyncio.test_sslproto.SelectorStartTLSTests.test_shutdown_corrupted_ssl_sends_close_notify
  • test_multiprocessing_timeout - test.test_regrtest.ArgsTestCase.test_multiprocessing_timeout

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\threading.py", line 1218, in _bootstrap_inner
    self._context.run(self.run)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\functional.py", line 227, in run
    self._run()
    ~~~~~~~~~^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\functional.py", line 261, in _run
    self._test._abort_socket_test(ex)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\functional.py", line 110, in _abort_socket_test
    self.fail(ex)
    ~~~~~~~~~^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\unittest\case.py", line 772, in fail
    raise self.failureException(msg)
AssertionError: [WinError 10054] An existing connection was forcibly closed by the remote host
ERROR


Traceback (most recent call last):
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_regrtest.py", line 1939, in test_multiprocessing_timeout
    self.assertRegex(output,
    ~~~~~~~~~~~~~~~~^^^^^^^^
                     re.compile('%s timed out' % testname, re.MULTILINE))
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: Regex didn't match: 'test_regrtest_noop21 timed out' not found in 'Using random seed: 2884225283\n0:00:00 mem: 23.7 MiB Run 1 test in parallel using 1 worker process (timeout: 1.0 sec, worker timeout: 1.5 sec)\n0:00:01 mem: 24.4 MiB [1/1/1] test_regrtest_noop21 worker non-zero exit code (Exit code 1)\nTimeout (0:00:01)!\nThread 0x00000e68 (most recent call first):\n  File "<frozen importlib._bootstrap_external>", line ??? in _path_stat\n  <invalid frame>\n\n== Tests result: FAILURE ==\n\n1 test failed:\n    test_regrtest_noop21\n\nTotal duration: 1.8 sec\nTotal tests: run=0\nTotal test files: run=1/1 failed=1\nResult: FAILURE\n'


Traceback (most recent call last):
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\test_sslproto.py", line 950, in test_shutdown_corrupted_ssl_sends_close_notify
    self.loop.run_until_complete(client(srv.addr))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\asyncio\base_events.py", line 723, in run_until_complete
    raise RuntimeError('Event loop stopped before Future completed.')
RuntimeError: Event loop stopped before Future completed.


Traceback (most recent call last):
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\functional.py", line 255, in _run
    self._handle_client(conn)
    ~~~~~~~~~~~~~~~~~~~^^^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\functional.py", line 264, in _handle_client
    self._prog(TestSocketWrapper(sock))
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\test\test_asyncio\test_sslproto.py", line 920, in server
    sock.unwrap()
    ~~~~~~~~~~~^^
  File "C:\bbarea\3.x.itamaro-win64-srv-22-aws.tailcall.pgo\build\Lib\ssl.py", line 1402, in unwrap
    s = self._sslobj.shutdown()
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

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

Labels

needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants