You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Tian Gao (Jira)" <ji...@apache.org> on 2026/10/01 19:03:00 UTC
[jira] [Updated] (SPARK-59912) Fix flaky WorkerReuseTest and WorkerPoolCrashTest by pinning spark.python.use.daemon
[ https://issues.apache.org/jira/browse/SPARK-59912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tian Gao updated SPARK-59912:
-----------------------------
Affects Version/s: 4.4.0
(was: 5.0.0)
> Fix flaky WorkerReuseTest and WorkerPoolCrashTest by pinning spark.python.use.daemon
> ------------------------------------------------------------------------------------
>
> Key: SPARK-59912
> URL: https://issues.apache.org/jira/browse/SPARK-59912
> Project: Spark
> Issue Type: Test
> Components: PySpark, Tests
> Affects Versions: 4.4.0
> Reporter: Tian Gao
> Assignee: Tian Gao
> Priority: Major
> Labels: pull-request-available
>
> WorkerReuseTest.test_reuse_worker_of_parallelize_range and WorkerPoolCrashTest.test_worker_crash assert that Python worker PIDs are reused across consecutive jobs. Worker reuse (stable PIDs) only happens on the daemon path; the simple-worker path (spark.python.use.daemon=false) spawns a fresh process per task. Sibling suites in the same file (SimpleWorkerTests, WorkerSegfaultNonDaemonTest) set spark.python.use.daemon=false, and because all suites in a test module share one gateway JVM, whichever SparkContext launches it first leaks its conf into the JVM system properties (same mechanism as SPARK-59885). When a non-daemon suite launches first, the reuse tests inherit use.daemon=false, run in simple-worker mode, and the PID-reuse assertions fail. Because test ordering is not deterministic, the failure is flaky. Fix: pin spark.python.use.daemon=true in the two reuse suites so the assertions no longer depend on the ambient JVM default or test ordering.
--
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