spark-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Digby <>
Subject IllegalArgumentException: is already set
Date Wed, 28 Sep 2016 08:46:04 GMT

We've received the following error a handful of times and once it's occurred
all subsequent queries fail with the same exception until we bounce the

IllegalArgumentException: is already set

ForkJoinWorkerThreads call into SQLExecution#withNewExecutionId, are
assigned an execution Id into their InheritableThreadLocal and this is later
cleared in the finally block.
I've noted that these ForkJoinWorkerThreads can create additional
ForkJoinWorkerThreads and (as of SPARK-10563) the child threads receive a
copy of the parent's properties.
It seems that Prior to SPARK-10563, clearing the parent's executionId would
have cleared the child's, but now it's a copy of the properties the child's
executionId is never cleared leading to the above exception. 
I'm yet to recreate the issue locally, whilst I've seen
ForkJoinWorkerThreads creating others and the properties being copied across
I've not seen this from within the body of withNewExecutionId.

Does this all sound reasonable? 
Our plan for a short term work around is to allow the condition to arise but
remove the from the thread local before throwing the
IllegalArgumentException so it succeeds on re-try.

View this message in context:
Sent from the Apache Spark Developers List mailing list archive at

To unsubscribe e-mail:

View raw message