[
https://issues.apache.org/jira/browse/SPARK-61764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
L. C. Hsieh updated SPARK-61764:
--------------------------------
Summary: Limit the Python worker idle timeout to what fits in an Int of
milliseconds (was: Fix Int overflow in the socket read timeout for the Python
worker idle timeout in pipelined mode)
> Limit the Python worker idle timeout to what fits in an Int of milliseconds
> ---------------------------------------------------------------------------
>
> Key: SPARK-61764
> URL: https://issues.apache.org/jira/browse/SPARK-61764
> Project: Spark
> Issue Type: Bug
> Components: PySpark, Spark Core
> Affects Versions: 4.3.0, 4.4.0
> Reporter: L. C. Hsieh
> Priority: Major
> Labels: pull-request-available
>
> The pipelined Python UDF path (BasePythonRunner.createPipelinedDataIn,
> SPARK-56642) sets the socket read timeout used for the Python worker idle
> timeout as
> {code}
> worker.channel.socket().setSoTimeout(if (idleTimeoutSeconds > 0)
> idleTimeoutSeconds.toInt * 1000 else 0)
> {code}
> This is Int arithmetic, so it overflows when
> spark.python.worker.idleTimeoutSeconds (or
> spark.sql.execution.pyspark.udf.idleTimeoutSeconds) is above 2147483 seconds
> (about 24.8 days). Depending on the value, the result is:
> * negative (e.g. 2147484 gives -2147483296): Socket.setSoTimeout throws
> IllegalArgumentException and the task fails;
> * a much shorter timeout (e.g. 4294968 gives 704 ms): spurious idle timeouts
> are logged, and healthy workers are killed when killOnIdleTimeout is set;
> * 0 (e.g. 536870912 or 4294967296): the idle timeout is silently disabled.
> The synchronous path and PythonPlannerRunner convert with
> TimeUnit.SECONDS.toMillis on a Long and are not affected.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]