dynamobi/dynamobi — Issue #172: [LDB-150] LucidDbServer !kill hungs when there is an in-flight insert statement 
Author: dynamobi-build
Created: 2011-12-30 02:18:27+00:00
State: open
Labels: LDB

[reporter="kvu", created="Fri, 2 Feb 2007 18:02:53 -0500 (GMT-05:00)"]
To reproduce:

+ Data for TPCH-1G should be in place

+ start lucidDbServer in one console

+ start sqllineClient in another console and run sql statements below

+ from server console try !kill

CREATE SCHEMA TPCH;

CREATE ROLE TPCHROLE;

create server ff_tpch_server

foreign data wrapper "FLAT FILE"

options(

directory '/home/kvu/open/luciddb/test/sql/tpch/ff-copy/1G', <<<<< your directory here >>>>>

file_extension '.tbl',

ctrl_file_extension '.bcp',

field_delimiter '|',

line_delimiter '\n',

quote_char '"',

escape_char '',

with_header 'no',

num_rows_scan '1',

log_directory '/home/kvu/open/luciddb/test/sql/tpch/gen/1G' <<<<< your directory here >>>>>

);

CREATE TABLE TPCH.LINEITEM (

L_ORDERKEY INTEGER,

L_PARTKEY INTEGER NOT NULL,

L_SUPPKEY INTEGER NOT NULL,

L_LINENUMBER INTEGER,

L_QUANTITY DECIMAL(15,2) NOT NULL,

L_EXTENDEDPRICE DECIMAL(15,2) NOT NULL,

L_DISCOUNT DECIMAL(15,2) NOT NULL,

L_TAX DECIMAL(15,2) NOT NULL,

L_RETURNFLAG VARCHAR(1) NOT NULL,

L_LINESTATUS VARCHAR(1) NOT NULL,

L_SHIPDATE DATE NOT NULL,

L_COMMITDATE DATE NOT NULL,

L_RECEIPTDATE DATE NOT NULL,

L_SHIPINSTRUCT VARCHAR(25) NOT NULL,

L_SHIPMODE VARCHAR(10) NOT NULL,

L_COMMENT VARCHAR(44) NOT NULL,

PRIMARY KEY(L_ORDERKEY, L_LINENUMBER)

);

import foreign schema "BCP" from server ff_tpch_server into tpch;

insert into tpch.lineitem select * from tpch."lineitem";

----------------------------------------------------------------------------------------------------------------------------------------

thread dump:

Full thread dump Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode):

"RMI TCP Connection(4)-10.17.33.70" daemon prio=1 tid=0x085d6ca8 nid=0x1ab waiting for monitor entry [0x7871a000..0x7871b130]

at de.simplicit.vjdbc.server.command.CommandProcessor.process(CommandProcessor.java:163)

- waiting to lock <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at de.simplicit.vjdbc.server.rmi.CommandSinkRmiImpl.process(CommandSinkRmiImpl.java:36)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)

at sun.rmi.transport.Transport$1.run(Transport.java:153)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:149)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

at java.lang.Thread.run(Thread.java:595)

"Timer-1" daemon prio=1 tid=0x8124bc10 nid=0x1a6 waiting for monitor entry [0x78b66000..0x78b66fb0]

at de.simplicit.vjdbc.server.command.CommandProcessor$OrphanedConnectionCollectorTask.run(CommandProcessor.java:227)

- waiting to lock <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at java.util.TimerThread.mainLoop(Timer.java:512)

at java.util.TimerThread.run(Timer.java:462)

"RMI LeaseChecker" daemon prio=1 tid=0x081d3110 nid=0x1a3 waiting on condition [0x78be7000..0x78be7f30]

at java.lang.Thread.sleep(Native Method)

at sun.rmi.transport.DGCImpl$LeaseChecker.run(DGCImpl.java:310)

at java.lang.Thread.run(Thread.java:595)

"RMI TCP Connection(2)-10.17.33.70" daemon prio=1 tid=0x08573918 nid=0x1a2 waiting for monitor entry [0x78c68000..0x78c690b0]

at net.sf.farrago.db.FarragoDbSession.newStmtValidator(FarragoDbSession.java:377)

- waiting to lock <0x9339deb8> (a net.sf.farrago.db.FarragoDbSession)

at com.lucidera.farrago.LucidDbSessionPersonality.updateRowCounts(LucidDbSessionPersonality.java:732)

at net.sf.farrago.db.FarragoDbStmtContext.updateRowCounts(FarragoDbStmtContext.java:405)

at net.sf.farrago.db.FarragoDbStmtContext.execute(FarragoDbStmtContext.java:286)

- locked <0x93431468> (a net.sf.farrago.db.FarragoDbStmtContext)

at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:115)

at de.simplicit.vjdbc.command.StatementExecuteCommand.execute(StatementExecuteCommand.java:34)

at de.simplicit.vjdbc.server.command.ConnectionEntry.executeCommand(ConnectionEntry.java:161)

- locked <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at de.simplicit.vjdbc.server.command.CommandProcessor.process(CommandProcessor.java:163)

- locked <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at de.simplicit.vjdbc.server.rmi.CommandSinkRmiImpl.process(CommandSinkRmiImpl.java:36)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)

at sun.rmi.transport.Transport$1.run(Transport.java:153)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:149)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

at java.lang.Thread.run(Thread.java:595)

"GC Daemon" daemon prio=1 tid=0x8124b630 nid=0x179 in Object.wait() [0x78d6d000..0x78d6d1b0]

at java.lang.Object.wait(Native Method)

- waiting on <0x930ac050> (a sun.misc.GC$LatencyLock)

at sun.misc.GC$Daemon.run(GC.java:100)

- locked <0x930ac050> (a sun.misc.GC$LatencyLock)

"RMI Reaper" prio=1 tid=0x8123f330 nid=0x178 in Object.wait() [0x78ded000..0x78dee130]

at java.lang.Object.wait(Native Method)

- waiting on <0x930ac058> (a java.lang.ref.ReferenceQueue$Lock)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)

- locked <0x930ac058> (a java.lang.ref.ReferenceQueue$Lock)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)

at sun.rmi.transport.ObjectTable$Reaper.run(ObjectTable.java:336)

at java.lang.Thread.run(Thread.java:595)

"RMI TCP Accept-0" daemon prio=1 tid=0x8123edf0 nid=0x177 runnable [0x78e6e000..0x78e6eeb0]

at java.net.PlainSocketImpl.socketAccept(Native Method)

at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)

- locked <0x92d6abf0> (a java.net.SocksSocketImpl)

at java.net.ServerSocket.implAccept(ServerSocket.java:450)

at java.net.ServerSocket.accept(ServerSocket.java:421)

at sun.rmi.transport.tcp.TCPTransport.run(TCPTransport.java:334)

at java.lang.Thread.run(Thread.java:595)

"RMI TCP Accept-5434" daemon prio=1 tid=0x81241410 nid=0x176 runnable [0x78eef000..0x78eefe30]

at java.net.PlainSocketImpl.socketAccept(Native Method)

at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)

- locked <0x92d6ae88> (a java.net.SocksSocketImpl)

at java.net.ServerSocket.implAccept(ServerSocket.java:450)

at java.net.ServerSocket.accept(ServerSocket.java:421)

at sun.rmi.transport.tcp.TCPTransport.run(TCPTransport.java:334)

at java.lang.Thread.run(Thread.java:595)

"Timer-0" daemon prio=1 tid=0x8124b3f8 nid=0x175 in Object.wait() [0x78f70000..0x78f70fb0]

at java.lang.Object.wait(Native Method)

- waiting on <0x92d68628> (a java.util.TaskQueue)

at java.lang.Object.wait(Object.java:474)

at java.util.TimerThread.mainLoop(Timer.java:483)

- locked <0x92d68628> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

"Farrago Watchdog Timer" prio=1 tid=0x812386b0 nid=0x174 in Object.wait() [0x78ff1000..0x78ff1f30]

at java.lang.Object.wait(Native Method)

- waiting on <0x92d68710> (a java.util.TaskQueue)

at java.util.TimerThread.mainLoop(Timer.java:509)

- locked <0x92d68710> (a java.util.TaskQueue)

at java.util.TimerThread.run(Timer.java:462)

"Thread-2" prio=1 tid=0x0856da38 nid=0x172 runnable [0x00000000..0x7a3f3f28]

"MDR event dispatcher" daemon prio=1 tid=0x8c75daa0 nid=0x166 in Object.wait() [0x8c67d000..0x8c67e0b0]

at java.lang.Object.wait(Native Method)

- waiting on <0x92d69108> (a java.util.LinkedList)

at java.lang.Object.wait(Object.java:474)

at org.netbeans.mdr.util.EventNotifier$EventsDelivery.run(EventNotifier.java:257)

- locked <0x92d69108> (a java.util.LinkedList)

at java.lang.Thread.run(Thread.java:595)

"HSQLDB Timer @1bd7848" daemon prio=1 tid=0x8c73bed0 nid=0x165 in Object.wait() [0x8c6fe000..0x8c6ff030]

at java.lang.Object.wait(Native Method)

- waiting on <0x92d69450> (a org.hsqldb.lib.HsqlTimer)

at org.hsqldb.lib.HsqlTimer.nextTask(Unknown Source)

- locked <0x92d69450> (a org.hsqldb.lib.HsqlTimer)

at org.hsqldb.lib.HsqlTimer$TaskRunner.run(Unknown Source)

at java.lang.Thread.run(Thread.java:595)

"Active Reference Queue Daemon" daemon prio=1 tid=0x8c70a808 nid=0x164 in Object.wait() [0x8caba000..0x8caba1b0]

at java.lang.Object.wait(Native Method)

- waiting on <0x92d59130> (a java.lang.ref.ReferenceQueue$Lock)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)

- locked <0x92d59130> (a java.lang.ref.ReferenceQueue$Lock)

at org.openide.util.Utilities$ActiveQueue.run(Utilities.java:2442)

at java.lang.Thread.run(Thread.java:595)

"Low Memory Detector" daemon prio=1 tid=0x8df00af0 nid=0x162 runnable [0x00000000..0x00000000]

"CompilerThread1" daemon prio=1 tid=0x08144080 nid=0x161 waiting on condition [0x00000000..0x8d9f8058]

"CompilerThread0" daemon prio=1 tid=0x08143010 nid=0x160 waiting on condition [0x00000000..0x8da791d8]

"AdapterThread" daemon prio=1 tid=0x08141f38 nid=0x15f waiting on condition [0x00000000..0x00000000]

"Signal Dispatcher" daemon prio=1 tid=0x08140fc8 nid=0x15e waiting on condition [0x00000000..0x00000000]

"Finalizer" daemon prio=1 tid=0x08137928 nid=0x15d in Object.wait() [0x8ddfc000..0x8ddfd030]

at java.lang.Object.wait(Native Method)

- waiting on <0x930ac390> (a java.lang.ref.ReferenceQueue$Lock)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)

- locked <0x930ac390> (a java.lang.ref.ReferenceQueue$Lock)

at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)

at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

"Reference Handler" daemon prio=1 tid=0x08136280 nid=0x15c in Object.wait() [0x8de7e000..0x8de7e1b0]

at java.lang.Object.wait(Native Method)

- waiting on <0x92fbb1e0> (a java.lang.ref.Reference$Lock)

at java.lang.Object.wait(Object.java:474)

at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)

- locked <0x92fbb1e0> (a java.lang.ref.Reference$Lock)

"main" prio=1 tid=0x0805e020 nid=0x151 waiting for monitor entry [0xbfffc000..0xbfffccd8]

at net.sf.farrago.db.FarragoDbStmtContextBase.closeAllocation(FarragoDbStmtContextBase.java:118)

- waiting to lock <0x93431468> (a net.sf.farrago.db.FarragoDbStmtContext)

at org.eigenbase.util.CompoundClosableAllocation.closeAllocation(CompoundClosableAllocation.java:75)

at net.sf.farrago.db.FarragoDbSession.closeAllocation(FarragoDbSession.java:573)

- locked <0x9339deb8> (a net.sf.farrago.db.FarragoDbSession)

- locked <0x8e8985b8> (a java.lang.Class)

at org.eigenbase.util.CompoundClosableAllocation.closeAllocation(CompoundClosableAllocation.java:75)

at net.sf.farrago.db.FarragoDatabase.close(FarragoDatabase.java:381)

at net.sf.farrago.db.FarragoDbSingleton.shutdown(FarragoDbSingleton.java:204)

- locked <0x8e8985b8> (a java.lang.Class)

at net.sf.farrago.server.FarragoAbstractServer.stopHard(FarragoAbstractServer.java:253)

at net.sf.farrago.server.FarragoAbstractServer.runConsole(FarragoAbstractServer.java:293)

at com.lucidera.farrago.LucidDbServer.main(LucidDbServer.java:61)

"VM Thread" prio=1 tid=0x08133db0 nid=0x15b runnable

"GC task thread#0 (ParallelGC)" prio=1 tid=0x08077d80 nid=0x152 runnable

"GC task thread#1 (ParallelGC)" prio=1 tid=0x080789d0 nid=0x153 runnable

"GC task thread#2 (ParallelGC)" prio=1 tid=0x08079608 nid=0x155 runnable

"GC task thread#3 (ParallelGC)" prio=1 tid=0x0807a240 nid=0x156 runnable

"GC task thread#4 (ParallelGC)" prio=1 tid=0x0807ae78 nid=0x157 runnable

"GC task thread#5 (ParallelGC)" prio=1 tid=0x0807bab0 nid=0x158 runnable

"GC task thread#6 (ParallelGC)" prio=1 tid=0x0807c6e8 nid=0x159 runnable

"GC task thread#7 (ParallelGC)" prio=1 tid=0x0807d320 nid=0x15a runnable

"VM Periodic Task Thread" prio=1 tid=0x8df020a0 nid=0x163 waiting on condition

Found one Java-level deadlock:

=============================

"RMI TCP Connection(2)-10.17.33.70":

waiting to lock monitor 0x08136f24 (object 0x9339deb8, a net.sf.farrago.db.FarragoDbSession),

which is held by "main"

"main":

waiting to lock monitor 0x08136a64 (object 0x93431468, a net.sf.farrago.db.FarragoDbStmtContext),

which is held by "RMI TCP Connection(2)-10.17.33.70"

Java stack information for the threads listed above:

===================================================

"RMI TCP Connection(2)-10.17.33.70":

at net.sf.farrago.db.FarragoDbSession.newStmtValidator(FarragoDbSession.java:377)

- waiting to lock <0x9339deb8> (a net.sf.farrago.db.FarragoDbSession)

at com.lucidera.farrago.LucidDbSessionPersonality.updateRowCounts(LucidDbSessionPersonality.java:732)

at net.sf.farrago.db.FarragoDbStmtContext.updateRowCounts(FarragoDbStmtContext.java:405)

at net.sf.farrago.db.FarragoDbStmtContext.execute(FarragoDbStmtContext.java:286)

- locked <0x93431468> (a net.sf.farrago.db.FarragoDbStmtContext)

at net.sf.farrago.jdbc.engine.FarragoJdbcEngineStatement.execute(FarragoJdbcEngineStatement.java:115)

at de.simplicit.vjdbc.command.StatementExecuteCommand.execute(StatementExecuteCommand.java:34)

at de.simplicit.vjdbc.server.command.ConnectionEntry.executeCommand(ConnectionEntry.java:161)

- locked <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at de.simplicit.vjdbc.server.command.CommandProcessor.process(CommandProcessor.java:163)

- locked <0x933aafb8> (a de.simplicit.vjdbc.server.command.ConnectionEntry)

at de.simplicit.vjdbc.server.rmi.CommandSinkRmiImpl.process(CommandSinkRmiImpl.java:36)

at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)

at sun.rmi.transport.Transport$1.run(Transport.java:153)

at java.security.AccessController.doPrivileged(Native Method)

at sun.rmi.transport.Transport.serviceCall(Transport.java:149)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)

at java.lang.Thread.run(Thread.java:595)

"main":

at net.sf.farrago.db.FarragoDbStmtContextBase.closeAllocation(FarragoDbStmtContextBase.java:118)

- waiting to lock <0x93431468> (a net.sf.farrago.db.FarragoDbStmtContext)

at org.eigenbase.util.CompoundClosableAllocation.closeAllocation(CompoundClosableAllocation.java:75)

at net.sf.farrago.db.FarragoDbSession.closeAllocation(FarragoDbSession.java:573)

- locked <0x9339deb8> (a net.sf.farrago.db.FarragoDbSession)

- locked <0x8e8985b8> (a java.lang.Class)

at org.eigenbase.util.CompoundClosableAllocation.closeAllocation(CompoundClosableAllocation.java:75)

at net.sf.farrago.db.FarragoDatabase.close(FarragoDatabase.java:381)

at net.sf.farrago.db.FarragoDbSingleton.shutdown(FarragoDbSingleton.java:204)

- locked <0x8e8985b8> (a java.lang.Class)

at net.sf.farrago.server.FarragoAbstractServer.stopHard(FarragoAbstractServer.java:253)

at net.sf.farrago.server.FarragoAbstractServer.runConsole(FarragoAbstractServer.java:293)

at com.lucidera.farrago.LucidDbServer.main(LucidDbServer.java:61)

Found 1 deadlock.