Skip to content

#138473 backports to 3.13 & 3.14 break running programs on Python version upgrade (multiprocessing) #142206

@mgorny

Description

@mgorny

Bug report

Bug description:

#138473 changed the format used to pass data between the parent process and subprocesses in multiprocessing. This change has been backported as-is to Python 3.14.1 and FWICS 3.13.10. Unfortunately, this means that if Python is upgraded to a newer patch version while applications are running using this Python version, newly started subprocesses suddenly start using the new data format that is incompatible with the parent process. I think such a change is acceptable for 3.15 now, but this is a major issue with 3.13 & 3.14, because it literally means we would have to tell our users "please restart all programs after upgrading Python, or things may silently break".

I'm sorry but I don't have a traceback handy, but it broke Gentoo's package manager for me mid-upgrade, with the parent process starting to throw JSONDecodeErrors at the non-JSON data provided by children.

Kudos to @thesamesam for finding the offending change.

CPython versions tested on:

3.13, 3.14

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13bugs and security fixes3.14bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-multiprocessingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions