drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Rogers (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-5083) IteratorValidator does not handle RecordIterator cleanup call to next( )
Date Tue, 29 Nov 2016 01:18:58 GMT

    [ https://issues.apache.org/jira/browse/DRILL-5083?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15703787#comment-15703787
] 

Paul Rogers commented on DRILL-5083:
------------------------------------

We saw a similar issue in a production system that went into an infinite loop on cleanup.
Partial jstack trace below. Notice that a failure cleanup is in progress, but the MergeJoinBatch
has decided to generate code in its (final, clean-up) call to {{next()}}.

{code}
	at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.generateDoCompare(MergeJoinBatch.java:459)
	at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.generateNewWorker(MergeJoinBatch.java:321)
	at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.innerNext(MergeJoinBatch.java:195)
	at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162)
	at org.apache.drill.exec.record.RecordIterator.clearInflightBatches(RecordIterator.java:355)
	at org.apache.drill.exec.record.RecordIterator.close(RecordIterator.java:361)
	at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.close(MergeJoinBatch.java:258)
	at org.apache.drill.common.DeferredException.suppressingClose(DeferredException.java:159)
	- locked <0x00000005c9800130> (a org.apache.drill.common.DeferredException)
	at org.apache.drill.exec.physical.impl.BaseRootExec.close(BaseRootExec.java:149)
	at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.close(ScreenCreator.java:141)
	at org.apache.drill.exec.work.fragment.FragmentExecutor.closeOutResources(FragmentExecutor.java:311)
	at org.apache.drill.exec.work.fragment.FragmentExecutor.cleanup(FragmentExecutor.java:155)
	at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:262)
	at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
{code}

> IteratorValidator does not handle RecordIterator cleanup call to next( )
> ------------------------------------------------------------------------
>
>                 Key: DRILL-5083
>                 URL: https://issues.apache.org/jira/browse/DRILL-5083
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.8.0
>            Reporter: Paul Rogers
>            Priority: Minor
>
> This one is very confusing...
> In a test with a MergeJoin and external sort, operators are stacked something like this:
> {code}
> Screen
> - MergeJoin
> - - External Sort
> ...
> {code}
> Using the injector to force a OOM in spill, the external sort threw a UserException up
the stack. This was handed by:
> {code}
> IteratorValidatorBatchIterator.next( )
> RecordIterator.clearInflightBatches( )
> RecordIterator.close( )
> MergeJoinBatch.close( )
> {code}
> Which does the following:
> {code}
>       // Check whether next() should even have been called in current state.
>       if (null != exceptionState) {
>         throw new IllegalStateException(
> {code}
> But, the exceptionState is set, so we end up throwing an IllegalStateException during
cleanup.
> Seems the code should agree: if {{next( )}} will be called during cleanup, then {{next(
)}} should gracefully handle that case.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message