If I create a table with a couple of fields in it, then save the table, then add at least two more fields to it and then click save again, Kexi locks up completely (using .kexi file as the database backend). Attaching gdb to the locked up process shows that it is stuck in the same function with the backtrace below: #0 0x00007fb919d75ac1 in ?? () from /usr/lib/libGL.so.1 #1 0x00007fb919d765c2 in ?? () from /usr/lib/libGL.so.1 #2 0x00007fb927e93b1b in ?? () from /usr/lib/tls/libnvidia-tls.so.1 #3 0x00007fb9272d4543 in ~QByteArray (this=0x7fffea464cf0, __in_chrg=<value optimized out>) at /usr/include/qt4/QtCore/qbytearray.h:382 #4 0x00007fb92735ea10 in KexiDB::AlterTableHandler::InsertFieldAction::simplifyActions (this=0x2cf7d40, fieldActions=...) at /home/gberg/development/src/other/kde/koffice/kexi/kexidb/alter.cpp:628 #5 0x00007fb92735f8a2 in KexiDB::AlterTableHandler::execute (this=0x2c8a180, tableName=..., args=...) at /home/gberg/development/src/other/kde/koffice/kexi/kexidb/alter.cpp:851 #6 0x00007fb90dcddca2 in KexiTableDesignerView::storeData (this=0x2b70520, dontAsk=false) at /home/gberg/development/src/other/kde/koffice/kexi/plugins/tables/kexitabledesignerview.cpp:1450 #7 0x00007fb9204ed0dd in KexiWindow::storeData (this=0x2b6e530, dontAsk=false) at /home/gberg/development/src/other/kde/koffice/kexi/core/KexiWindow.cpp:945 #8 0x00007fb927048f6a in KexiMainWindow::saveObject (this=0x1fe1d30, window=0x2b6e530, messageWhenAskingForName=..., dontAsk=false) at /home/gberg/development/src/other/kde/koffice/kexi/main/KexiMainWindow.cpp:3642 #9 0x00007fb9270474ec in KexiMainWindow::slotProjectSave (this=0x1fe1d30) at /home/gberg/development/src/other/kde/koffice/kexi/main/KexiMainWindow.cpp:3303 #10 0x00007fb92704f479 in KexiMainWindow::qt_metacall (this=0x1fe1d30, _c=QMetaObject::InvokeMetaMethod, _id=56, _a=0x7fffea465d90) at /home/gberg/development/build/other/kde/koffice/kexi/main/KexiMainWindow.moc:470 #11 0x00007fb92446a647 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #12 0x00007fb9250daf32 in QAction::triggered(bool) () from /usr/lib/libQtGui.so.4 #13 0x00007fb9250dcf20 in QAction::activate(QAction::ActionEvent) () from /usr/lib/libQtGui.so.4 #14 0x00007fb9250deb72 in QAction::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4 #15 0x00007fb925142225 in QWidgetAction::qt_metacall(QMetaObject::Call, int, void**) () from /usr/lib/libQtGui.so.4 #16 0x00007fb925f8d874 in KAction::qt_metacall (this=0x29ce450, _c=QMetaObject::InvokeMetaMethod, _id=12, _a=0x7fffea466090) at /home/gberg/development/build/other/kde/KDE/kdelibs/kdeui/kaction.moc:95 #17 0x00007fb92446a647 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/libQtCore.so.4 #18 0x00007fb92577dda2 in QAbstractButton::clicked(bool) () from /usr/lib/libQtGui.so.4 #19 0x00007fb92549a73b in ?? () from /usr/lib/libQtGui.so.4 #20 0x00007fb92549b59b in ?? () from /usr/lib/libQtGui.so.4 #21 0x00007fb92549b815 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4 #22 0x00007fb9255671fa in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/libQtGui.so.4 #23 0x00007fb925137705 in QWidget::event(QEvent*) () from /usr/lib/libQtGui.so.4 #24 0x00007fb9250e108d in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #25 0x00007fb9250e7fad in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQtGui.so.4 #26 0x00007fb9260825d7 in KApplication::notify (this=0x1e40430, receiver=0x2b73f20, event=0x7fffea466b90) at /home/gberg/development/src/other/kde/KDE/kdelibs/kdeui/kernel/kapplication.cpp:302 ---Type <return> to continue, or q <return> to quit--- #27 0x00007fb924456bdc in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/libQtCore.so.4 #28 0x00007fb9250e98eb in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/libQtGui.so.4 #29 0x00007fb9251685b0 in ?? () from /usr/lib/libQtGui.so.4 #30 0x00007fb92516775c in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/libQtGui.so.4 #31 0x00007fb9251919a2 in ?? () from /usr/lib/libQtGui.so.4 #32 0x00007fb91ea868fe in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #33 0x00007fb91ea8a2b8 in ?? () from /lib/libglib-2.0.so.0 #34 0x00007fb91ea8a3e0 in g_main_context_iteration () from /lib/libglib-2.0.so.0 #35 0x00007fb92448068c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #36 0x00007fb92519153f in ?? () from /usr/lib/libQtGui.so.4 #37 0x00007fb9244554c2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #38 0x00007fb924455894 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQtCore.so.4 #39 0x00007fb924457d46 in QCoreApplication::exec() () from /usr/lib/libQtCore.so.4 #40 0x00000000004009ea in main (argc=2, argv=0x7fffea4677f8) at /home/gberg/development/src/other/kde/koffice/kexi/main.cpp:34
A couple of additional comments: - the system is at 100% CPU usage during this lockup - I am using Debian unstable distribution on amd64 arch with libsqlite3-0 version: 3.6.23.1-1 I haven't looked at the code where the problem occurs in Kexi, but I can't help suspecting that this is one of those "sqlite deadlocks if you try to do two things concurrently" bugs.
Thanks for the info! As for concurent deadlock, I tend to doubt because we do not use multithreaded sqlite engine yet.
I investigated this a bit further and have a couple more clues: - It doesn't always happen. It only seems to happen if I have modified an already existing row in the table as well as adding 2 or more new ones, but I'm not certain of this as the bug is a little tricky to trigger consistently. - I stepped through the code after a lock up in gdb. It seems that it is getting stuck in kexidb/alter.cpp in the loop at line 619. Not sure why though.
More information: looks like line 630 of kexidb/alter.cpp is to blame: actionsForThisField->remove(changePropertyAction->propertyName().toLatin1()); I think this should become: it = actionsForThisField->erase(blah); The reason for this: http://doc.trolltech.com/4.7-snapshot/qhash.html#erase
SVN commit 1116241 by staniek: KexiDB *fix possible crash when adding two or more new columns to a table at once BUG:234194 *rename typedefs to use Const when needed M +28 -9 alter.cpp M +4 -2 alter.h M +1 -1 drivermanager.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1116241
George thanks for the hint (but for unknown reason erase() wasn't the solution). OK, now?
SVN commit 1118481 by staniek: *fix crash when testing database connection and debug gui is enabled (related to using gui in different thread) CCBUG:234194 M +7 -0 debuggui.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1118481
SVN commit 1118810 by staniek: meged with trunk fixes KexiDB *fix crash or freeze for testing database connection on error or timeout CCBUG:124959 CCBUG:234536 KexiDB *fixed crash in connection data handling CCBUG:234536 *fix crash when testing database connection and debug gui is enabled (related to using gui in different thread) CCBUG:234194 KexiDB *fix possible crash when adding two or more new columns to a table at once CCBUG:234194 _M . (directory) M +2 -1 connectiondata.cpp M +55 -54 utils.cpp M +1 -1 utils.h M +24 -5 utils_p.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1118810
SVN commit 1119238 by staniek: port r1118481 to 2.2 *fix crash when testing database connection and debug gui is enabled (related to using gui in different thread) CCBUG:234194 M +7 -0 debuggui.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1119238
You need to log in before you can comment on or make changes to this bug.