Skip to content

[3.14] Parser stack overflow on musllinux x86_64 #137231

Closed

Description

@neutrinoceros

Bug report

Bug description:

When trying to build and test wheels for yt on 3.14.0rc1, we encounter a single error, only on the musllinux image from cibuildwheel, which crashes on import with

MemoryError: Parser stack overflowed - Python source too complex to parse

example logs:
https://github.com/yt-project/yt/actions/runs/16576917774/job/46883376625?pr=5185

To make things worse, this seems to only happen in the context of a pytest session: python -c "import yt" completes without raising.

A minimal reproducer would necessarily still include a significant amount of complexity, so before I try to reduce it, I'd like to ask:
is it expected that the threshold for triggering this exception may depend on the platform and/or the exact Python version ? is it expected that the threshold may be lower in Python 3.14 than it was in 3.13 ?

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Activity

  1. StanFromIreland commented on Jul 30, 2025

    @StanFromIreland
    Member

    this seems to only happen in the context of a pytest session: python -c "import yt"

    This may mean this is an issue with pytest, it is difficult to deduce without a specific minimal reproducer.

  2. kumaraditya303 commented on Jul 30, 2025

    @kumaraditya303
    Contributor

    This seems the same issue as #131338, can you check if the fix at #137175 fixes this?

  3. neutrinoceros commented on Jul 30, 2025

    @neutrinoceros
    ContributorAuthor

    Thanks for pointing this out !
    it might take some time before I can confirm the fix works for us, but it looks very promising. I'll do my best to actually run the check before 3.14.0rc2 . Does anyone mind if we keep this issue open until then ?

  4. kumaraditya303 commented on Jul 30, 2025

    @kumaraditya303
    Contributor

    it might take some time before I can confirm the fix works for us, but it looks very promising. I'll do my best to actually run the check before 3.14.0rc2 . Does anyone mind if we keep this issue open until then ?

    The fix is currently scheduled for inclusion in 3.14.0 but RM can include it in 3.14.rc2 as it affects yt and scipy on 3.14, leaving it for @hugovk to decide.

  5. neutrinoceros commented on Jul 31, 2025

    @neutrinoceros
    ContributorAuthor

    I've been trying to reproduce the crash with docker (using the same image cibuildwheel runs), but so far I haven't been sucessful: the test session completes without error, so I'm not yet ready to try out the patch, as I except no difference. I'll try to think of a more faithful approach if I can.

  6. AA-Turner commented on Jul 31, 2025

    @AA-Turner
    Member

    Adding the label so that we remember to consider this before 3.14.0 candidate 2.

    A

  7. changed the title [-][3.14] (Regression ?) Parser stack overflow on `musllinux` `x86_64`[/-] [+][3.14] Parser stack overflow on `musllinux` `x86_64`[/+] on Jul 31, 2025
  8. hugovk commented on Aug 13, 2025

    @hugovk
    Member

    This seems the same issue as #131338, can you check if the fix at #137175 fixes this?

    #137175 has been merged and will be in rc2 (tomorrow). Also musllinux is unsupported per PEP 11 so this doesn't need to block the release.

  9. neutrinoceros commented on Aug 13, 2025

    @neutrinoceros
    ContributorAuthor

    Thanks for the update ! I'll be testing with the early rc2 as soon as possible and report back here !

  10. mayeut commented on Aug 15, 2025

    @mayeut
    Contributor

    it seems that it fixed #133801

  11. neutrinoceros commented on Aug 16, 2025

    @neutrinoceros
    ContributorAuthor

    I can confirm this is fixed in 3.14.0rc2
    Thanks everyone, and godspeed for the release !

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions