Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7EA4B200CF8 for ; Thu, 14 Sep 2017 18:01:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7CC911609CD; Thu, 14 Sep 2017 16:01:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4D0DC1609CC for ; Thu, 14 Sep 2017 18:01:07 +0200 (CEST) Received: (qmail 2077 invoked by uid 500); 14 Sep 2017 16:01:06 -0000 Mailing-List: contact issues-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list issues@drill.apache.org Received: (qmail 2068 invoked by uid 99); 14 Sep 2017 16:01:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2017 16:01:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C9AFC1A5A41 for ; Thu, 14 Sep 2017 16:01:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id uwlgkHSmq9nv for ; Thu, 14 Sep 2017 16:01:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id D55135FCB9 for ; Thu, 14 Sep 2017 16:01:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CAFBFE0E22 for ; Thu, 14 Sep 2017 16:01:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7752825385 for ; Thu, 14 Sep 2017 16:01:00 +0000 (UTC) Date: Thu, 14 Sep 2017 16:01:00 +0000 (UTC) From: "Khurram Faraaz (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (DRILL-4273) If query is cancelled during external sort memory is leaked, merge join fragment is running forever on a forman node MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 14 Sep 2017 16:01:08 -0000 [ https://issues.apache.org/jira/browse/DRILL-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Khurram Faraaz closed DRILL-4273. --------------------------------- Resolution: Fixed Verified on 1.12.0-SNAPSHOT commit : aaff1b35b7339fb4e6ab480dd517994ff9f0a5c5 > If query is cancelled during external sort memory is leaked, merge join fragment is running forever on a forman node > -------------------------------------------------------------------------------------------------------------------- > > Key: DRILL-4273 > URL: https://issues.apache.org/jira/browse/DRILL-4273 > Project: Apache Drill > Issue Type: Bug > Components: Execution - Flow > Affects Versions: 1.5.0 > Reporter: Victoria Markman > Priority: Critical > Attachments: 2967b65e-ea42-a736-9f5d-3513914ada88.sys.drill, after_shutdown.log, drillbit.log.node_133, drillbit.log.node_134, drillbit.log.node_135, drillbit.log.node_136 > > > Query was cancelled during external sort. > Here is what happened: > 1. Query got stuck in CANCELLATION_REQUESTED mode: ( queryid = 2967b65e-ea42-a736-9f5d-3513914ada88 ) > 2. On a forman node 6:0 (executing merge join) fragment kept running forever (see stack below) > {code} > "2967b65e-ea42-a736-9f5d-3513914ada88:frag:6:0" daemon prio=10 tid=0x0000000001af5800 nid=0x769b runnable [0x00007fa82fc7c000] > java.lang.Thread.State: RUNNABLE > at java.lang.Throwable.getStackTraceElement(Native Method) > at java.lang.Throwable.getOurStackTrace(Throwable.java:827) > - locked <0x00000006eef95f80> (a java.lang.Exception) > at java.lang.Throwable.getStackTrace(Throwable.java:816) > at java.lang.Thread.getStackTrace(Thread.java:1589) > at org.apache.drill.common.StackTrace.(StackTrace.java:33) > at org.apache.drill.common.HistoricalLog$Event.(HistoricalLog.java:39) > at org.apache.drill.common.HistoricalLog.recordEvent(HistoricalLog.java:95) > - locked <0x00000006eef95870> (a org.apache.drill.common.HistoricalLog) > at io.netty.buffer.DrillBuf.(DrillBuf.java:84) > at org.apache.drill.exec.memory.AllocatorManager$BufferLedger.newDrillBuf(AllocatorManager.java:285) > at org.apache.drill.exec.memory.BaseAllocator.bufferWithoutReservation(BaseAllocator.java:222) > at org.apache.drill.exec.memory.BaseAllocator.buffer(BaseAllocator.java:204) > at org.apache.drill.exec.memory.BaseAllocator.buffer(BaseAllocator.java:177) > at org.apache.drill.exec.vector.IntVector.allocateBytes(IntVector.java:201) > at org.apache.drill.exec.vector.IntVector.allocateNew(IntVector.java:183) > at org.apache.drill.exec.vector.NullableIntVector.allocateNew(NullableIntVector.java:216) > at org.apache.drill.exec.vector.AllocationHelper.allocateNew(AllocationHelper.java:56) > at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.allocateBatch(MergeJoinBatch.java:429) > at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.innerNext(MergeJoinBatch.java:172) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.physical.impl.xsort.ExternalSortBatch.innerNext(ExternalSortBatch.java:295) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.RecordIterator.nextBatch(RecordIterator.java:97) > at org.apache.drill.exec.record.RecordIterator.next(RecordIterator.java:183) > at org.apache.drill.exec.record.RecordIterator.prepare(RecordIterator.java:167) > at org.apache.drill.exec.physical.impl.join.JoinStatus.prepare(JoinStatus.java:86) > at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.innerNext(MergeJoinBatch.java:162) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.physical.impl.xsort.ExternalSortBatch.innerNext(ExternalSortBatch.java:295) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.RecordIterator.nextBatch(RecordIterator.java:97) > at org.apache.drill.exec.record.RecordIterator.next(RecordIterator.java:183) > at org.apache.drill.exec.record.RecordIterator.prepare(RecordIterator.java:167) > at org.apache.drill.exec.physical.impl.join.JoinStatus.prepare(JoinStatus.java:86) > at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.innerNext(MergeJoinBatch.java:162) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.physical.impl.xsort.ExternalSortBatch.innerNext(ExternalSortBatch.java:295) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.svremover.RemovingRecordBatch.innerNext(RemovingRecordBatch.java:94) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.RecordIterator.nextBatch(RecordIterator.java:97) > at org.apache.drill.exec.record.RecordIterator.next(RecordIterator.java:183) > at org.apache.drill.exec.record.RecordIterator.prepare(RecordIterator.java:167) > at org.apache.drill.exec.physical.impl.join.JoinStatus.prepare(JoinStatus.java:86) > at org.apache.drill.exec.physical.impl.join.MergeJoinBatch.innerNext(MergeJoinBatch.java:162) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.test.generated.HashAggregatorGen53.doWork(HashAggTemplate.java:314) > at org.apache.drill.exec.physical.impl.aggregate.HashAggBatch.innerNext(HashAggBatch.java:133) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:119) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:109) > at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51) > at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132) > at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:162) > at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:215) > at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:104) > at org.apache.drill.exec.physical.impl.SingleSenderCreator$SingleSenderRootExec.innerNext(SingleSenderCreator.java:92) > at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:94) > at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:256) > at org.apache.drill.exec.work.fragment.FragmentExecutor$1.run(FragmentExecutor.java:250) > at java.security.AccessController.doPrivileged(Native Method) > at javax.security.auth.Subject.doAs(Subject.java:415) > at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1595) > at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:250) > 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} > drillbit.log.node_133 (forman node ) had message printed forever: > {code} > 2016-01-15 01:33:28,230 [2967b65e-ea42-a736-9f5d-3513914ada88:frag:6:0] WARN o.a.d.e.e.ExpressionTreeMaterializer - Unable to find value vector of path `ss_sold_date_sk`, returning null instance. > {code} > Log is flooded with this message (node 133): > {code} > [Thu Jan 14 18:00:15] # grep "WARN o.a.d.e.e.ExpressionTreeMaterializer" drillbit.log |wc -l > 409187 > {code} > After server was restarted: > 1. Query profile was never saved in profiles directory as if it never ran > 2. I saved JSON profile off the screen just before that, can be found here: 2967b65e-ea42-a736-9f5d-3513914ada88.sys.drill > 3. drillbit.log showed leak (?) : > This is just a sample, full printout can be found here: after_shutdown.log > {code} > 2016-01-15 01:52:41,938 [Drillbit-ShutdownHook#0] WARN o.apache.drill.exec.server.Drillbit - Failure on close() > java.lang.RuntimeException: Exception while closing > at org.apache.drill.common.DrillAutoCloseables.closeNoChecked(DrillAutoCloseables.java:46) ~[drill-common-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > at org.apache.drill.exec.server.BootStrapContext.close(BootStrapContext.java:127) ~[drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:76) ~[drill-common-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:64) ~[drill-common-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > at org.apache.drill.exec.server.Drillbit.close(Drillbit.java:149) ~[drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > at org.apache.drill.exec.server.Drillbit$ShutdownThread.run(Drillbit.java:243) [drill-java-exec-1.5.0-SNAPSHOT.jar:1.5.0-SNAPSHOT] > Caused by: java.lang.IllegalStateException: Allocator[ROOT] closed with outstanding child allocators. > Allocator(ROOT) 0/186835008/681513280/51539607552 (res/actual/peak/limit) > child allocators: 2 > Allocator(query:2967b65e-ea42-a736-9f5d-3513914ada88) 1048576/0/0/268435456 (res/actual/peak/limit) > child allocators: 0 > ledgers: 0 > reservations: 0 > Allocator(frag:6:0) 184000000/185786432/210798976/240311229512 (res/actual/peak/limit) > child allocators: 33 > Allocator(op:6:0:14:ExternalSort) 20000000/10000000/10073728/38903689 (res/actual/peak/limit) > child allocators: 1 > Allocator(op:6:0:14:ExternalSort:copier) 10000000/0/0/20000000 (res/actual/peak/limit) > child allocators: 0 > ledgers: 0 > reservations: 0 > ledgers: 0 > reservations: 0 > Allocator(op:6:0:28:ExternalSort) 20000000/10000640/10020480/38903689 (res/actual/peak/limit) > child allocators: 1 > Allocator(op:6:0:28:ExternalSort:copier) 10000000/0/0/20000000 (res/actual/peak/limit) > child allocators: 0 > ledgers: 0 > reservations: 0 > ledgers: 2 > ledger (allocator: op:6:0:28:ExternalSort), isOwning: true, size: 128, references: 1 > BufferLedger[438592] holds 1 buffers. > {DrillBuf[641717], udle identityHashCode == 1405213628, identityHashCode == 1547779737} > ledger (allocator: op:6:0:28:ExternalSort), isOwning: true, size: 512, references: 2 > BufferLedger[438590] holds 14 buffers. > {DrillBuf[620704], udle identityHashCode == 1455534019, identityHashCode == 1174034356} > {DrillBuf[641715], udle identityHashCode == 1455534019, identityHashCode == 1896324428} > {DrillBuf[641716], udle identityHashCode == 1455534019, identityHashCode == 1896324428} > {DrillBuf[641710], udle identityHashCode == 1455534019, identityHashCode == 1896324428} > {DrillBuf[641707], udle identityHashCode == 1455534019, identityHashCode == 496598622} > {DrillBuf[641711], udle identityHashCode == 1455534019, identityHashCode == 1896324428} > {DrillBuf[641714], udle identityHashCode == 1455534019, identityHashCode == 1896324428} > {DrillBuf[620708], udle identityHashCode == 1455534019, identityHashCode == 496598622} > {DrillBuf[620696], udle identityHashCode == 1455534019, identityHashCode == 1174034356} > {code} > * I was running with Amit's patch for fix DRILL-4190 : https://github.com/amithadke/drill/tree/DRILL-4190 > * Not sure if this is reproducible case, I will try. Hope there is enough information to give it a clue on what happened. -- This message was sent by Atlassian JIRA (v6.4.14#64029)