You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/04/01 09:26:00 UTC
[jira] [Assigned] (SPARK-34934) Race condition while registering
source in MetricsSystem
[ https://issues.apache.org/jira/browse/SPARK-34934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-34934:
------------------------------------
Assignee: Apache Spark
> Race condition while registering source in MetricsSystem
> ---------------------------------------------------------
>
> Key: SPARK-34934
> URL: https://issues.apache.org/jira/browse/SPARK-34934
> Project: Spark
> Issue Type: Bug
> Components: Spark Core
> Affects Versions: 2.3.2, 3.1.1
> Reporter: Harsh Panchal
> Assignee: Apache Spark
> Priority: Minor
>
> {{MetricsSystem}} manages {{mutable.ArrayBuffer}} of metric sources. {{registerSource}} and {{removeSource}} methods are provided to add/remove new source from Metric system. Both these methods are not synchronised. Also, underlying {{mutable.ArrayBuffer}} not being thread safe, unexpected behaviours are possible if called concurrently (in our case, multiple executors registering custom source).
> For ex, we got below exception due to race condition
> {noformat}
> java.lang.ArrayIndexOutOfBoundsException
> at scala.collection.mutable.ResizableArray$class.ensureSize(ResizableArray.scala:104)
> at scala.collection.mutable.ArrayBuffer.ensureSize(ArrayBuffer.scala:48)
> at scala.collection.mutable.ArrayBuffer.$plus$eq(ArrayBuffer.scala:84)
> at org.apache.spark.metrics.MetricsSystem.registerSource(MetricsSystem.scala:157)
> {noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org