Skip to content

Temporarily skip test_aead_aes_gcm for buildbots with Linux kernel between 6.16.0 and 6.17.x #139310

Closed

Description

@hroncok

Bug report

Bug description:

We have recently started to see the following test failure on Fedora CI with Python 3.14.0rc3 and 3.13.7 (possibly others as well, not tested yet):

======================================================================
ERROR: test_aead_aes_gcm (test.test_socket.LinuxKernelCryptoAPI.test_aead_aes_gcm)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.14/test/test_socket.py", line 7071, in test_aead_aes_gcm
    op.sendall(plain)
    ~~~~~~~~~~^^^^^^^
OSError: [Errno 22] Invalid argument
platform.architecture: 64bit ELF
platform.freedesktop_os_release[ID]: fedora
platform.freedesktop_os_release[NAME]: Fedora Linux
platform.freedesktop_os_release[VARIANT_ID]: cloud
platform.freedesktop_os_release[VERSION]: 44 (Cloud Edition Prerelease)
platform.freedesktop_os_release[VERSION_ID]: 44
platform.libc_ver: glibc 2.42.9000
platform.platform: Linux-6.17.0-0.rc7.56.fc44.x86_64-x86_64-with-glibc2.42.9000
platform.python_implementation: CPython

This is similar to #73510 and seems to have regressed again. Not sure if this is a kernel bug or CPython bug yet.

CPython versions tested on:

3.14, 3.13

Operating systems tested on:

Linux

Linked PRs

Activity

  1. deleted a comment from mowmanminer on Sep 24, 2025
  2. Zheaoli commented on Sep 25, 2025

    @Zheaoli
    Contributor

    confirm it on 3.15, seems kernel change some api. Working on it

  3. Zheaoli commented on Sep 25, 2025

    @Zheaoli
    Contributor

    Confirm the root cause. I think it's related with this commit in the kernel torvalds/linux@1b34cbb

    I'm not sure if this a bug. I'm sending a report to kernel mail group

  4. Zheaoli commented on Sep 25, 2025

    @Zheaoli
    Contributor
  5. picnixz commented on Sep 25, 2025

    @picnixz
    Member

    The previous regression was caused by how the data was actually sent. In addition, EINVAL (22) is returned by the kernel if the data is not correct (see https://docs.kernel.org/crypto/userspace-if.html#aead-cipher-api).

    The problem was fixed in torvalds/linux@d0ca0df because we use op.sendall(assoc, socket.MSG_MORE) just before, but socket.MSG_MORE is an even number. Because of this, af_alg_ctx.more which was previously marked as a uint32_t of 1 bit will be 0 instead because of mod 2 conversion. So the latest 6.17 kernel should not have this bug anymore.

  6. added
    pendingThe issue will be closed if no feedback is provided
    on Sep 25, 2025
  7. Zheaoli commented on Sep 25, 2025

    @Zheaoli
    Contributor

    @picnixz Yes, I think this is fixed in main branch of the kernel. I think the 6.17 will not be a issue anymore

  8. Zheaoli commented on Sep 30, 2025

    @Zheaoli
    Contributor

    This bug has been fixed in 6.17 release. I think this issue could be closed as resloved

  9. hroncok commented on Sep 30, 2025

    @hroncok
    ContributorAuthor

    Thanks.

  10. removed
    pendingThe issue will be closed if no feedback is provided
    on Oct 1, 2025
  11. 30 remaining items

  12. added a commit that references this issue on Oct 9, 2025
  13. removed their assignment
    on Apr 12, 2026
  14. picnixz commented on Apr 12, 2026

    @picnixz
    Member

    @hroncok Can we revert the skip or is there some reason to keep it (and maybe refine it for exact versions?)

  15. hroncok commented on Apr 12, 2026

    @hroncok
    ContributorAuthor

    I don't know if you can revert it. In Fedora, we are likely on newer kernel already everywhere.

  16. picnixz commented on Apr 12, 2026

    @picnixz
    Member

    Ok, I think we can keep the guard. I don't know the exact minor version but skipping between 6.16 and 6.17 should be ok. 6.18+ have the tests enabled.

    @encukou I'm going to keep the check because we are also skipping on v4.9 even if there shouldn't be lots of people on 4.9 anymore.

  17. encukou commented on Apr 13, 2026

    @encukou
    Member

    Let's revert this in 3.16 when the branch opens, to clean the code up.

  18. picnixz commented on Apr 13, 2026

    @picnixz
    Member

    Let's revert this in 3.16 when the branch opens, to clean the code up.

    But what if someone is using an old kernel because they did not update theirs? I'm ok with keeping this guard to avoid possibly annoying reports. We already have guards for 4.9 so...

  19. encukou commented on May 11, 2026

    @encukou
    Member

    But what if someone is using an old kernel because they did not update theirs?

    When they run the CPython test suite, they get notified that a feature is missing. They can either update or skip the test themselves.

    We already have guards for 4.9 so

    The alpha period is best for cleaning those up. (Assuming they're for bugs the kernel, not just features that didn't exist yet.)

  20. added a commit that references this issue on May 26, 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

    OS-linuxtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions