Return-Path: X-Original-To: apmail-drill-issues-archive@minotaur.apache.org Delivered-To: apmail-drill-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9457910FD1 for ; Thu, 4 Dec 2014 01:35:12 +0000 (UTC) Received: (qmail 10970 invoked by uid 500); 4 Dec 2014 01:35:12 -0000 Delivered-To: apmail-drill-issues-archive@drill.apache.org Received: (qmail 10942 invoked by uid 500); 4 Dec 2014 01:35:12 -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 10932 invoked by uid 99); 4 Dec 2014 01:35:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Dec 2014 01:35:12 +0000 Date: Thu, 4 Dec 2014 01:35:12 +0000 (UTC) From: "Daniel Barclay (Drill/MapR) (JIRA)" To: issues@drill.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DRILL-1735) JDBC driver's close() leaks resources in local mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DRILL-1735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Barclay (Drill/MapR) updated DRILL-1735: ----------------------------------------------- Attachment: DRILL-1735.1.patch > JDBC driver's close() leaks resources in local mode > --------------------------------------------------- > > Key: DRILL-1735 > URL: https://issues.apache.org/jira/browse/DRILL-1735 > Project: Apache Drill > Issue Type: Bug > Reporter: Daniel Barclay (Drill/MapR) > Assignee: Daniel Barclay (Drill/MapR) > Fix For: 0.8.0 > > Attachments: Bug1735CloseDoesntCloseTest.java, DRILL-1735.1.patch > > > When the Drill JDBC driver is used in local mode (as DriverManager.getConnection("jdbc:drill:zk=local", ... ), the close() method doesn't free resources: Calling getConnection() and then close() and then repeating that pair of calls enough times results in an exception, the root cause exeception of which is an IOException saying "Too many open files": > java.sql.SQLException: Failure while attempting to start Drillbit in embedded mode. > at org.apache.drill.jdbc.DrillConnectionImpl.(DrillConnectionImpl.java:81) > at org.apache.drill.jdbc.DrillJdbc41Factory$DrillJdbc41Connection.(DrillJdbc41Factory.java:88) > at org.apache.drill.jdbc.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:57) > at org.apache.drill.jdbc.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:1) > at org.apache.drill.jdbc.DrillFactory.newConnection(DrillFactory.java:51) > at net.hydromatic.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:126) > at java.sql.DriverManager.getConnection(DriverManager.java:571) > at java.sql.DriverManager.getConnection(DriverManager.java:187) > at temp.Bug1735CloseDoesntCloseTest.testBug(Bug1735CloseDoesntCloseTest.java:26) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.lang.reflect.Method.invoke(Method.java:606) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at java.lang.reflect.Method.invoke(Method.java:606) > at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) > at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) > at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) > Caused by: java.lang.IllegalStateException: failed to create a child event loop > at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:68) > at io.netty.channel.MultithreadEventLoopGroup.(MultithreadEventLoopGroup.java:49) > at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:61) > at io.netty.channel.nio.NioEventLoopGroup.(NioEventLoopGroup.java:52) > at org.apache.drill.exec.rpc.TransportCheck.createEventLoopGroup(TransportCheck.java:75) > at org.apache.drill.exec.server.BootStrapContext.(BootStrapContext.java:45) > at org.apache.drill.exec.server.Drillbit.(Drillbit.java:95) > at org.apache.drill.jdbc.DrillConnectionImpl.(DrillConnectionImpl.java:78) > ... 18 more > Caused by: io.netty.channel.ChannelException: failed to open a new selector > at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:128) > at io.netty.channel.nio.NioEventLoop.(NioEventLoop.java:120) > at io.netty.channel.nio.NioEventLoopGroup.newChild(NioEventLoopGroup.java:87) > at io.netty.util.concurrent.MultithreadEventExecutorGroup.(MultithreadEventExecutorGroup.java:64) > ... 25 more > Caused by: java.io.IOException: Too many open files > at sun.nio.ch.IOUtil.makePipe(Native Method) > at io.netty.channel.nio.NioEventLoop.openSelector(NioEventLoop.java:126) > ... 28 more -- This message was sent by Atlassian JIRA (v6.3.4#6332)