You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2025/11/25 00:06:00 UTC

[jira] [Resolved] (SPARK-54456) Avoid fork after import dangerous libraries

     [ https://issues.apache.org/jira/browse/SPARK-54456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-54456.
----------------------------------
    Fix Version/s: 4.2.0
       Resolution: Fixed

Issue resolved by pull request 53166
[https://github.com/apache/spark/pull/53166]

> Avoid fork after import dangerous libraries
> -------------------------------------------
>
>                 Key: SPARK-54456
>                 URL: https://issues.apache.org/jira/browse/SPARK-54456
>             Project: Spark
>          Issue Type: Bug
>          Components: PySpark
>    Affects Versions: 4.2.0
>            Reporter: Tian Gao
>            Assignee: Tian Gao
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.2.0
>
>
> It's impossible to guarantee the safety of a fork after multiple threads are used.
> [https://discuss.python.org/t/switching-default-multiprocessing-context-to-spawn-on-posix-as-well/21868]
> That's why Python issues a warning in such cases after 3.12. However, our daemon is not designed to be safe. It could import an arbitrary library before fork and potentially cause a deadlock after fork.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org