从池中获取连接时发生核心转储

时间:2016-06-22 18:42:12

标签: java sqlite weblogic datasource coredump

我们在WebLogic 12c和Red Hat OS上运行了一个Web应用程序,可访问单个SQLite数据库文件。对于此数据库,我们使用com.mchange.v2.c3p0.ComboPooledDataSource配置了连接池。在Web应用程序的客户端执行非特定的操作时,突然发生WebLogic崩溃,并且JVM会生成核心转储文件。

进行一些研究,我想这可能是SQLite使用本机库并尝试加载它们然后发生错误。这可以在JVM生成的日志文件中看到。

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  java.lang.ClassLoader$NativeLibrary.load(Ljava/lang/String;Z)V+0
j  java.lang.ClassLoader.loadLibrary0(Ljava/lang/Class;Ljava/io/File;)Z+328
j  java.lang.ClassLoader.loadLibrary(Ljava/lang/Class;Ljava/lang/String;Z)V+48
j  java.lang.Runtime.load0(Ljava/lang/Class;Ljava/lang/String;)V+57
j  java.lang.System.load(Ljava/lang/String;)V+7
j  org.sqlite.SQLiteJDBCLoader.loadNativeLibrary(Ljava/lang/String;Ljava/lang/String;)Z+29
j  org.sqlite.SQLiteJDBCLoader.extractAndLoadLibraryFile(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z+308
j  org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary()V+224
j  org.sqlite.SQLiteJDBCLoader.initialize()Z+0
j  org.sqlite.core.NativeDB.load()Z+19
j  org.sqlite.core.CoreConnection.open(II)V+355
j  org.sqlite.core.CoreConnection.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V+138
j  org.sqlite.jdbc3.JDBC3Connection.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V+4
j  org.sqlite.jdbc4.JDBC4Connection.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V+4
j  org.sqlite.SQLiteConnection.<init>(Ljava/lang/String;Ljava/lang/String;Ljava/util/Properties;)V+4
j  org.sqlite.JDBC.createConnection(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+24
j  org.sqlite.JDBC.connect(Ljava/lang/String;Ljava/util/Properties;)Ljava/sql/Connection;+2
j  com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(Ljava/lang/String;Ljava/lang/String;)Ljava/sql/Connection;+18
j  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(Ljava/lang/String;Ljava/lang/String;Lcom/mchange/v2/c3p0/ConnectionCustomizer;Ljava/lang/String;)Ljavax/sql/PooledConnection;+25
j  com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(Ljava/lang/String;Ljava/lang/String;)Ljavax/sql/PooledConnection;+5
j  com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource()Ljava/lang/Object;+50
j  com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(I)V+25
j  com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess()V+2
j  com.mchange.v2.resourcepool.BasicResourcePool.access$800(Lcom/mchange/v2/resourcepool/BasicResourcePool;)V+1
j  com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run()V+18
j  com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run()V+138
v  ~StubRoutines::call_stub

我想这也有帮助:

#  SIGSEGV (0xb) at pc=0x00007fc88369fb32, pid=15075, tid=0x00007fc6679ff700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_92-b31) (build 1.8.0_92-b31)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.92-b31 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [ld-linux-x86-64.so.2+0x18b32]  strcmp+0x2

以下是日志文件中指定的线程:

Current thread (0x00007fc6240f5000):  JavaThread "C3P0PooledConnectionPoolManager[identityToken->1bqyqw79hrvpgj518gc0n4|4f77bcba]-HelperThread-#0" daemon [_thread_in_native, id=47441, stack(0x00007fc6678ff000,0x00007fc667a00000)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000064a8b

我不确定这是否是问题,如果是,我不知道如何修复它。可能导致这种情况的任何想法?

此外,我们正在使用JDK 1.8.0-77以及这些依赖于pom.xml

    <dependency>
        <groupId>org.xerial</groupId>
        <artifactId>sqlite-jdbc</artifactId>
        <version>3.8.11.2</version>
    </dependency>
    <dependency>
        <groupId>com.mchange</groupId>
        <artifactId>c3p0</artifactId>
        <version>0.9.2.1</version>
    </dependency>

0 个答案:

没有答案