Bug 330215 - Crash in QPSQL driver when shutting down Akonadi
2015-02-10 14:34
274 查看
https://bugs.kde.org/show_bug.cgi?id=330215#c0
QPSQL driver crashes when destroying QSqlQueries
cached in QueryCache, because they are being destroyed after QSqlDatabase connection has been closed.I think this is a bug in Qt because, because it should check whether QSqlDriver has already been deleted before using it. I checked Qt5 code and it should
be fine there. Anyway we should workaround this in Akonadi. Program received signal SIGSEGV, Segmentation fault. parseInput (conn=conn@entry=0x40000000b) at fe-exec.c:1646 1646 if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3) (gdb) bt #0 parseInput (conn=conn@entry=0x40000000b)
at fe-exec.c:1646 #1 0x00007f5836497b08 in PQgetResult (conn=conn@entry=0x40000000b) at fe-exec.c:1722 #2 0x00007f5836497d8f in PQexecStart (conn=conn@entry=0x40000000b) at fe-exec.c:1895 #3 0x00007f5836497f41 in PQexec (conn=0x40000000b, query=0xd55a98 "DEALLOCATE
qpsqlpstmt_e4") at fe-exec.c:1804 #4 0x00007f58366bdd78 in QPSQLDriverPrivate::exec (this=0xda1870, stmt=<optimized out>) at ../../../sql/drivers/psql/qsql_psql.cpp:177 #5 0x00007f58366be324 in QPSQLDriverPrivate::exec (this=0xda1870, stmt="DEALLOCATE qpsqlpstmt_e4")
at ../../../sql/drivers/psql/qsql_psql.cpp:187 #6 0x00007f58366be45e in qDeallocatePreparedStmt (d=d@entry=0xda14c0) at ../../../sql/drivers/psql/qsql_psql.cpp:288 #7 0x00007f58366be877 in QPSQLResult::~QPSQLResult (this=0xf0fa90, __in_chrg=<optimized out>)
at ../../../sql/drivers/psql/qsql_psql.cpp:309 #8 0x00007f58366be8d9 in QPSQLResult::~QPSQLResult (this=0xf0fa90, __in_chrg=<optimized out>) at ../../../sql/drivers/psql/qsql_psql.cpp:312 #9 0x0000003a7421182e in QSqlQuery::~QSqlQuery (this=0x40000000b, __in_chrg=<optimized
out>) at kernel/qsqlquery.cpp:245 #10 0x000000000057e3d5 in QHashNode<QString, QSqlQuery>::~QHashNode (this=0xd705a0) at /usr/include/QtCore/qhash.h:216 #11 0x000000000057e3a5 in QHashNode<QString, QSqlQuery>::~QHashNode (this=0xd705a0) at /usr/include/QtCore/qhash.h:216
#12 0x000000000057e32d in QHash<QString, QSqlQuery>::deleteNode2 (node=0xd705a0) at /usr/include/QtCore/qhash.h:521 #13 0x0000003a6dc98799 in QHashData::free_helper (this=0xd77ff0, node_delete=0x57e310 <QHash<QString, QSqlQuery>::deleteNode2(QHashData::Node*)>)
at tools/qhash.cpp:275 #14 0x000000000057e364 in QHash<QString, QSqlQuery>::freeData (this=0xd70540, x=0xd77ff0) at /usr/include/QtCore/qhash.h:570 #15 0x000000000057e576 in QHash<QString, QSqlQuery>::~QHash (this=0xd70540) at /usr/include/QtCore/qhash.h:283
#16 0x000000000057e525 in QHash<QString, QSqlQuery>::~QHash (this=0xd70540) at /usr/include/QtCore/qhash.h:283 #17 0x000000000057e4f8 in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #18 0x000000000057de05
in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #19 0x000000000057de29 in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #20 0x000000000057e4a2
in qThreadStorage_deleteData<Cache> (d=0xd70530) at /usr/include/QtCore/qthreadstorage.h:97 #21 0x000000000057e45f in QThreadStorage<Cache*>::deleteData (x=0xd70530) at /usr/include/QtCore/qthreadstorage.h:140 #22 0x0000003a6dc7a44a in QThreadStorageData::finish
(p=0xd51d98) at thread/qthreadstorage.cpp:203 #23 0x0000003a6dd872d1 in QCoreApplicationPrivate::~QCoreApplicationPrivate (this=0xd51f90, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:473 #24 0x0000003a6dd874c9 in QCoreApplicationPrivate::~QCoreApplicationPrivate
(this=0xd51f90, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:490 #25 0x0000003a6dd9e065 in cleanup (pointer=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:62 #26 ~QScopedPointer (this=0xd51f78, __in_chrg=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:100
#27 QObject::~QObject (this=0xd51f70, __in_chrg=<optimized out>) at kernel/qobject.cpp:816 #28 0x0000003a6dd88249 in QCoreApplication::~QCoreApplication (this=0xd51f70, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:865 #29 0x00000000004a07fe in
QScopedPointerDeleter<QCoreApplication>::cleanup (pointer=0xd51f70) at /usr/include/QtCore/qscopedpointer.h:62 #30 0x00000000004a88bf in QScopedPointer<QCoreApplication, QScopedPointerDeleter<QCoreApplication> >::~QScopedPointer (this=0x7ffff65a2a70) at /usr/include/QtCore/qscopedpointer.h:100
#31 0x00000000004a29a5 in QScopedPointer<QCoreApplication, QScopedPointerDeleter<QCoreApplication> >::~QScopedPointer (this=0x7ffff65a2a70) at /usr/include/QtCore/qscopedpointer.h:98 #32 0x00000000004a1930 in AkApplication::~AkApplication (this=0x7ffff65a2a60)
at /home/progdan/projects/kde/akonadi/shared/akapplication.cpp:45 #33 0x00000000004a0825 in AkApplicationImpl<QCoreApplication>::~AkApplicationImpl (this=0x7ffff65a2a60) at /home/progdan/projects/kde/akonadi/shared/akapplication.h:84 #34 0x00000000004a0275
in AkApplicationImpl<QCoreApplication>::~AkApplicationImpl (this=0x7ffff65a2a60) at /home/progdan/projects/kde/akonadi/shared/akapplication.h:84 #35 0x000000000049ffac in main (argc=1, argv=0x7ffff65a2cb8) at /home/progdan/projects/kde/akonadi/server/src/main.cpp:83Reproducible:
AlwaysSteps to Reproduce:1. Use QPSQL backend with Akonadi2. Use Akonadi a little so that there are some queries in QueryCache3. akonadictl stopActual Results: CrashExpected Results: No crash
QPSQL driver crashes when destroying QSqlQueries
cached in QueryCache, because they are being destroyed after QSqlDatabase connection has been closed.I think this is a bug in Qt because, because it should check whether QSqlDriver has already been deleted before using it. I checked Qt5 code and it should
be fine there. Anyway we should workaround this in Akonadi. Program received signal SIGSEGV, Segmentation fault. parseInput (conn=conn@entry=0x40000000b) at fe-exec.c:1646 1646 if (PG_PROTOCOL_MAJOR(conn->pversion) >= 3) (gdb) bt #0 parseInput (conn=conn@entry=0x40000000b)
at fe-exec.c:1646 #1 0x00007f5836497b08 in PQgetResult (conn=conn@entry=0x40000000b) at fe-exec.c:1722 #2 0x00007f5836497d8f in PQexecStart (conn=conn@entry=0x40000000b) at fe-exec.c:1895 #3 0x00007f5836497f41 in PQexec (conn=0x40000000b, query=0xd55a98 "DEALLOCATE
qpsqlpstmt_e4") at fe-exec.c:1804 #4 0x00007f58366bdd78 in QPSQLDriverPrivate::exec (this=0xda1870, stmt=<optimized out>) at ../../../sql/drivers/psql/qsql_psql.cpp:177 #5 0x00007f58366be324 in QPSQLDriverPrivate::exec (this=0xda1870, stmt="DEALLOCATE qpsqlpstmt_e4")
at ../../../sql/drivers/psql/qsql_psql.cpp:187 #6 0x00007f58366be45e in qDeallocatePreparedStmt (d=d@entry=0xda14c0) at ../../../sql/drivers/psql/qsql_psql.cpp:288 #7 0x00007f58366be877 in QPSQLResult::~QPSQLResult (this=0xf0fa90, __in_chrg=<optimized out>)
at ../../../sql/drivers/psql/qsql_psql.cpp:309 #8 0x00007f58366be8d9 in QPSQLResult::~QPSQLResult (this=0xf0fa90, __in_chrg=<optimized out>) at ../../../sql/drivers/psql/qsql_psql.cpp:312 #9 0x0000003a7421182e in QSqlQuery::~QSqlQuery (this=0x40000000b, __in_chrg=<optimized
out>) at kernel/qsqlquery.cpp:245 #10 0x000000000057e3d5 in QHashNode<QString, QSqlQuery>::~QHashNode (this=0xd705a0) at /usr/include/QtCore/qhash.h:216 #11 0x000000000057e3a5 in QHashNode<QString, QSqlQuery>::~QHashNode (this=0xd705a0) at /usr/include/QtCore/qhash.h:216
#12 0x000000000057e32d in QHash<QString, QSqlQuery>::deleteNode2 (node=0xd705a0) at /usr/include/QtCore/qhash.h:521 #13 0x0000003a6dc98799 in QHashData::free_helper (this=0xd77ff0, node_delete=0x57e310 <QHash<QString, QSqlQuery>::deleteNode2(QHashData::Node*)>)
at tools/qhash.cpp:275 #14 0x000000000057e364 in QHash<QString, QSqlQuery>::freeData (this=0xd70540, x=0xd77ff0) at /usr/include/QtCore/qhash.h:570 #15 0x000000000057e576 in QHash<QString, QSqlQuery>::~QHash (this=0xd70540) at /usr/include/QtCore/qhash.h:283
#16 0x000000000057e525 in QHash<QString, QSqlQuery>::~QHash (this=0xd70540) at /usr/include/QtCore/qhash.h:283 #17 0x000000000057e4f8 in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #18 0x000000000057de05
in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #19 0x000000000057de29 in Cache::~Cache (this=0xd70530) at /home/progdan/projects/kde/akonadi/server/src/storage/querycache.cpp:34 #20 0x000000000057e4a2
in qThreadStorage_deleteData<Cache> (d=0xd70530) at /usr/include/QtCore/qthreadstorage.h:97 #21 0x000000000057e45f in QThreadStorage<Cache*>::deleteData (x=0xd70530) at /usr/include/QtCore/qthreadstorage.h:140 #22 0x0000003a6dc7a44a in QThreadStorageData::finish
(p=0xd51d98) at thread/qthreadstorage.cpp:203 #23 0x0000003a6dd872d1 in QCoreApplicationPrivate::~QCoreApplicationPrivate (this=0xd51f90, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:473 #24 0x0000003a6dd874c9 in QCoreApplicationPrivate::~QCoreApplicationPrivate
(this=0xd51f90, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:490 #25 0x0000003a6dd9e065 in cleanup (pointer=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:62 #26 ~QScopedPointer (this=0xd51f78, __in_chrg=<optimized out>) at ../../src/corelib/tools/qscopedpointer.h:100
#27 QObject::~QObject (this=0xd51f70, __in_chrg=<optimized out>) at kernel/qobject.cpp:816 #28 0x0000003a6dd88249 in QCoreApplication::~QCoreApplication (this=0xd51f70, __in_chrg=<optimized out>) at kernel/qcoreapplication.cpp:865 #29 0x00000000004a07fe in
QScopedPointerDeleter<QCoreApplication>::cleanup (pointer=0xd51f70) at /usr/include/QtCore/qscopedpointer.h:62 #30 0x00000000004a88bf in QScopedPointer<QCoreApplication, QScopedPointerDeleter<QCoreApplication> >::~QScopedPointer (this=0x7ffff65a2a70) at /usr/include/QtCore/qscopedpointer.h:100
#31 0x00000000004a29a5 in QScopedPointer<QCoreApplication, QScopedPointerDeleter<QCoreApplication> >::~QScopedPointer (this=0x7ffff65a2a70) at /usr/include/QtCore/qscopedpointer.h:98 #32 0x00000000004a1930 in AkApplication::~AkApplication (this=0x7ffff65a2a60)
at /home/progdan/projects/kde/akonadi/shared/akapplication.cpp:45 #33 0x00000000004a0825 in AkApplicationImpl<QCoreApplication>::~AkApplicationImpl (this=0x7ffff65a2a60) at /home/progdan/projects/kde/akonadi/shared/akapplication.h:84 #34 0x00000000004a0275
in AkApplicationImpl<QCoreApplication>::~AkApplicationImpl (this=0x7ffff65a2a60) at /home/progdan/projects/kde/akonadi/shared/akapplication.h:84 #35 0x000000000049ffac in main (argc=1, argv=0x7ffff65a2cb8) at /home/progdan/projects/kde/akonadi/server/src/main.cpp:83Reproducible:
AlwaysSteps to Reproduce:1. Use QPSQL backend with Akonadi2. Use Akonadi a little so that there are some queries in QueryCache3. akonadictl stopActual Results: CrashExpected Results: No crash
相关文章推荐
- trap or bug when using CONTINUE in Oracle 11g
- trap or bug when using CONTINUE in Oracle 11g
- The bug when Use Tomat in Eclipse
- trap or bug when using CONTINUE in Oracle 11g
- AutoScrollManager Class: Scroll scrollbar when mouse is moving in a specified area and mouse button is down
- [小e笔记]之翻译的翻&译文的译——Ora-600 [4193] WhenOpening Or Shutting Down A Database [ID 452662.1]
- bug解决:There is no getter for property named 'new_driver_id' in 'class com.bjw.entity.Driver'
- Appium:出现info: [debug] Didn't get a new command in 60 secs, shutting down...无法继续执行
- [CentOS Server] Bug when calling matlab in bash
- UITextField Chinese character moves down when editing in iOS 10
- SecurityException when using SQL Server 2005 JDBC driver in WebSphere 6
- Ora-12520 12516 Ora-12520 12516 Received When Listener on Node 1 is Down in RAC Setup
- What should we do when meet a crash in android
- Get "Server Down" when retrieve the channel list in sopcast, how to solve it?
- When many files was in deep directory of eMMC, Nozomi crash when connected to PC
- What should we do when meet a crash in android?
- What should we do when meet a crash in android?
- Exception: Python in worker has different version 2.7 than that in driver 3.5, PySpark cannot run wi
- 升级Firefox8后watir-webdriver出现错误“unable to obtain stable firefox connection in 60 seconds”
- registered the JDBC driver [oracle.jdbc.driver.OracleDriver] but failed to unregister it when the