You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Sean Hsuan-Yi Chu (JIRA)" <ji...@apache.org> on 2015/01/16 03:07:35 UTC

[jira] [Created] (DRILL-2021) select a, *, a from ... gives memory leak and wrong result

Sean Hsuan-Yi Chu created DRILL-2021:
----------------------------------------

             Summary: select a, *, a from ... gives memory leak and wrong result
                 Key: DRILL-2021
                 URL: https://issues.apache.org/jira/browse/DRILL-2021
             Project: Apache Drill
          Issue Type: Bug
          Components: Execution - Flow, Execution - Operators
         Environment: IDE
            Reporter: Sean Hsuan-Yi Chu
            Assignee: Sean Hsuan-Yi Chu
            Priority: Critical
             Fix For: 0.8.0


select n_name, *, n_name from cp.`tpch/nation.parquet` limit 2

n_name	n_nationkey	n_name0	n_regionkey	n_comment
ALGERIA	0	ALGERIA	0	 haggle. carefully final deposits detect slyly agai
ARGENTINA	1	ARGENTINA	1	al foxes promise slyly according to the regular accounts. bold requests alon

org.apache.drill.exec.rpc.RpcException: Query failed: Failure while running fragment., Attempted to close accountor with 2 buffer(s) still allocatedfor QueryId: 2b478e2b-08b2-f679-f486-746ffb30f416, MajorFragmentId: 0, MinorFragmentId: 0.


	Total 1 allocation(s) of byte size(s): 16384, at stack location:
		org.apache.drill.exec.memory.TopLevelAllocator$ChildAllocator.buffer(TopLevelAllocator.java:212)
		org.apache.drill.exec.vector.UInt4Vector.allocateNewSafe(UInt4Vector.java:137)
		org.apache.drill.exec.vector.VarCharVector.allocateNewSafe(VarCharVector.java:320)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doAlloc(ProjectRecordBatch.java:229)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:167)
		org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132)
		org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
		org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
		org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67)
		org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97)
		org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57)
		org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:110)
		org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
		java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
		java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
		java.lang.Thread.run(Thread.java:745)


	Total 1 allocation(s) of byte size(s): 32768, at stack location:
		org.apache.drill.exec.memory.TopLevelAllocator$ChildAllocator.buffer(TopLevelAllocator.java:212)
		org.apache.drill.exec.vector.VarCharVector.allocateNewSafe(VarCharVector.java:314)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doAlloc(ProjectRecordBatch.java:229)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:167)
		org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
		org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:132)
		org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
		org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
		org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:67)
		org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:97)
		org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:57)
		org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:110)
		org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
		java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
		java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
		java.lang.Thread.run(Thread.java:745)
 [ 67e3ab9a-59ba-4a9d-933e-70a4558d2dfb on 10.250.0.23:31013 ]
[ 67e3ab9a-59ba-4a9d-933e-70a4558d2dfb on 10.250.0.23:31013 ]


	at org.apache.drill.exec.rpc.user.QueryResultHandler.batchArrived(QueryResultHandler.java:79)
	at org.apache.drill.exec.rpc.user.UserClient.handleReponse(UserClient.java:93)
	at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:52)
	at org.apache.drill.exec.rpc.BasicClientWithConnection.handle(BasicClientWithConnection.java:34)
	at org.apache.drill.exec.rpc.RpcBus.handle(RpcBus.java:58)
	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:194)
	at org.apache.drill.exec.rpc.RpcBus$InboundHandler.decode(RpcBus.java:173)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:89)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:161)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:333)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:319)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:787)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:130)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116)
	at java.lang.Thread.run(Thread.java:745)


java.lang.IllegalStateException: Failure while trying to close allocator: Child level allocators not closed. Stack trace: 
		java.lang.Thread.getStackTrace(Thread.java:1589)
		org.apache.drill.exec.memory.TopLevelAllocator.getChildAllocator(TopLevelAllocator.java:115)
		org.apache.drill.exec.ops.FragmentContext.<init>(FragmentContext.java:115)
		org.apache.drill.exec.work.foreman.Foreman.setupRootFragment(Foreman.java:537)
		org.apache.drill.exec.work.foreman.Foreman.runPhysicalPlan(Foreman.java:308)
		org.apache.drill.exec.work.foreman.Foreman.runSQL(Foreman.java:513)
		org.apache.drill.exec.work.foreman.Foreman.run(Foreman.java:187)
		org.apache.drill.exec.work.WorkManager$RunnableWrapper.run(WorkManager.java:254)
		java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
		java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
		java.lang.Thread.run(Thread.java:745)

	at org.apache.drill.exec.memory.TopLevelAllocator.close(TopLevelAllocator.java:148)
	at org.apache.drill.exec.server.BootStrapContext.close(BootStrapContext.java:73)
	at com.google.common.io.Closeables.close(Closeables.java:77)
	at com.google.common.io.Closeables.closeQuietly(Closeables.java:108)
	at org.apache.drill.exec.server.Drillbit.close(Drillbit.java:186)
	at org.apache.drill.BaseTestQuery.closeClient(BaseTestQuery.java:133)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)


Process finished with exit code 255





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