#21 deadlock when connect oracle

closed
nobody
None
5
2014-12-28
2005-12-14
Anonymous
No

2005 18:46:58,220 INFO:C3P0Registry-Initializing c3p0-
0.9.0.2 [built 26-September-2005 12:55:26 -0400;
debug? true; trace: 10]
jdbc driver: ojdbc14.jar
jdk:j2re1.4.2_10

2005 11:28:31,529 WARN:ThreadPoolAsynchronousRunner-
com.mchange.v2.async.ThreadPoolAsynchronousRunner$Deadl
ockDetector@14d25c6 -- APPARENT DEADLOCK!!! Creating
emergency threads for unassigned pending tasks!
2005 11:28:31,529 WARN:ThreadPoolAsynchronousRunner-
com.mchange.v2.async.ThreadPoolAsynchronousRunner$Deadl
ockDetector@14d25c6 -- APPARENT DEADLOCK!!! Complete
Status: [num_managed_threads: 3, num_active: 3;
activeTasks:
com.mchange.v2.c3p0.stmt.GooGooStatementCache$1@1eaf203

(com.mchange.v2.async.ThreadPoolAsynchronousRunner$Pool
Thread-#2),
com.mchange.v2.c3p0.stmt.GooGooStatementCache$1@1b6ac25

(com.mchange.v2.async.ThreadPoolAsynchronousRunner$Pool
Thread-#1),
com.mchange.v2.c3p0.stmt.GooGooStatementCache$1@1dfde20

(com.mchange.v2.async.ThreadPoolAsynchronousRunner$Pool
Thread-#0); pendingTasks:
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@701425,

com.mchange.v2.resourcepool.BasicResourcePool$6@3aa615,

com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@6dd0b8,

com.mchange.v2.resourcepool.BasicResourcePool$6@1a1faec
,
com.mchange.v2.resourcepool.BasicResourcePool$6@160a70c
,
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@77244f,

com.mchange.v2.resourcepool.BasicResourcePool$6@1f0c908
,
com.mchange.v2.resourcepool.BasicResourcePool$6@11e3986
,
com.mchange.v2.resourcepool.BasicResourcePool$6@152942b
,
com.mchange.v2.resourcepool.BasicResourcePool$6@7d97d5,

com.mchange.v2.resourcepool.BasicResourcePool$6@17b275b
,
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@54cc39,

com.mchange.v2.resourcepool.BasicResourcePool$6@12bedd9
,
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@10c7887
,
com.mchange.v2.resourcepool.BasicResourcePool$6@1bcefcf
,
com.mchange.v2.resourcepool.BasicResourcePool$6@12424db
,
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@1efafae
,
com.mchange.v2.c3p0.stmt.GooGooStatementCache$3@f6de04,

com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@169f4cd,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@146c38f,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@d0e711,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@f23791,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@1e1948,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@dcd35,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@1b80c3,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@1a2a316,
com.mchange.v2.resourcepool.BasicResourcePool$AcquireTa
sk@81212b]

Discussion

  • Logged In: NO

    2005 18:46:58,541 INFO:PoolBackedDataSource-Initializing
    c3p0 pool...
    com.mchange.v2.c3p0.PoolBackedDataSource@4a6cbf [
    connectionPoolDataSource ->
    com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@172e449
    [ acquireIncrement -> 3, acquireRetryAttempts -> 30,
    acquireRetryDelay -> 1000, autoCommitOnClose -> false,
    automaticTestTable -> null, breakAfterAcquireFailure ->
    false, checkoutTimeout -> 0, connectionTesterClassName ->
    com.mchange.v2.c3p0.impl.DefaultConnectionTester,
    factoryClassLocation -> null,
    forceIgnoreUnresolvedTransactions -> false, identityToken -
    > 172e449, idleConnectionTestPeriod -> -1, initialPoolSize -
    > 3, maxIdleTime -> 0, maxPoolSize -> 100, maxStatements ->
    2500, maxStatementsPerConnection -> 25, minPoolSize -> 20,
    nestedDataSource ->
    com.mchange.v2.c3p0.DriverManagerDataSource@5f8172 [
    description -> null, driverClass -> null,
    factoryClassLocation -> null, identityToken -> 5f8172,
    jdbcUrl -> jdbc:oracle:thin:@172.16.66.167:1521:gedbx,
    properties -> {user=******, password=******} ],
    preferredTestQuery -> null, propertyCycle -> 300,
    testConnectionOnCheckin -> false, testConnectionOnCheckout -
    > false, usesTraditionalReflectiveProxies -> false ],
    factoryClassLocation -> null, identityToken -> 4a6cbf,
    numHelperThreads -> 10 ]

     
  • Logged In: YES
    user_id=877396

    I am facing the same problem while connecting to mysql.
    any clues?

    generally this happens and the process hangs for a few
    seconds, but once in a while, the process hangs forever!

     
  • Logged In: NO

    One of my collegues said that if there is no connections to
    the database aquired through c3p0 over a long time, no
    connection could be aquired through c3p0 any more
    thereafter. That is, if it's "free" for a long time and it
    forgets to work thereafter :D
    I don't quite understand why, but indeed I came across this
    problem not only once.

     
  • Steve Waldman
    Steve Waldman
    2005-12-21

    Logged In: YES
    user_id=175530

    Hi. I think there may be a mix of different issues in this thread. The above
    issues is one of the most nagging c3p0-related issues: The tasks that are
    hanging ae attempts to close a PreparedStatement that has been in the
    Statement cache. That's all c3p0 is trying to do, but the Statement.close()
    methods are hanging, deadlocked somehow. c3p0 may be manipulating the
    parent Connection at the same time it is close()ing a cached Statement. This
    is theoretically legal, but freaks out some drivers, and I've tried to prevent
    this where I can. I'd love information on the Thread that is at the other side of
    this deadlock -- If anyone can submit a Thread dump after this as occurred,
    I'd appreciate it very much. Thanks.

     
  • Steve Waldman
    Steve Waldman
    2006-01-25

    Logged In: YES
    user_id=175530

    So, this issue may or may not be fixed as of c3p0-0.9.0.3 -- I can't reproduce it,
    so I can't be sure, but the issue is addressed. Please let me know if things are
    better (or not) with c3p0-0.9.0.3 or c3p0-0.9.0.4.

    If the problem is not fixed (I do hope it is), turning statement pooling off is the
    workaround. But statement pooling is an important feature, so please do let me
    know if recent changes haven't fixed this.

     
  • Steve Waldman
    Steve Waldman
    2006-01-25

    • status: open --> closed
     
  • Logged In: YES
    user_id=877396

    This is not happening when there is plenty of memory
    available. I guess it was because of memory contention.

    I used to get a OutOfMemory somewhere around the exception,
    which was because of some other leak. So I guess this
    problem is solved for me

    Thanks a lot,
    Jeetu