This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author izbyshev
Recipients gregory.p.smith, izbyshev, socketpair
Date 2022-04-08.10:59:58
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1649415598.8.0.480988377567.issue47245@roundup.psfhosted.org>
In-reply-to
Content
> 3. We have to fix error-path in order not to change heap state (contents and allocations), possibly do not touch locks. During vfork() child execution - the only parent THREAD (not the process) is blocked. For example, it's not allowed to touch GIL. Child process may die unexpectedly and leave GIL locked. Is it possible to rewrite children path for vfork() case without any Py* calls ? As an idea, we can prepare all low-level things (all the pointers to strings and plain values) before vfork(), so child code will use only that data.

What specifically do you propose to fix? There is no problem with GIL if the child dies because the GIL is locked and unlocked only by the parent and the child never touches it. Similarly, only Py_* calls known to be safe are used. As for "pointers to strings", it's not clear to me what you mean, but if you mean allocations, they are already done before (v)fork(), since the child code is required to be async-signal-safe even if plain fork() is used.
History
Date User Action Args
2022-04-08 10:59:58izbyshevsetrecipients: + izbyshev, gregory.p.smith, socketpair
2022-04-08 10:59:58izbyshevsetmessageid: <1649415598.8.0.480988377567.issue47245@roundup.psfhosted.org>
2022-04-08 10:59:58izbyshevlinkissue47245 messages
2022-04-08 10:59:58izbyshevcreate