Bug 293548 - Crash when compacting .kexi database
Summary: Crash when compacting .kexi database
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Applications
Component: Migration/Import/Export (show other bugs)
Version: 2.4 beta6 (Calligra 2.4 beta6)
Platform: Ubuntu Linux
: NOR major
Target Milestone: ---
Assignee: Jarosław Staniek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-07 16:52 UTC by Harry Hall
Modified: 2012-08-11 11:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.4 rc1 (Calligra 2.4 rc1)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harry Hall 2012-02-07 16:52:27 UTC
Application: kexi (2.4 Beta 6 (Calligra 2.4 Beta 6))
KDE Platform Version: 4.8.00 (4.8.0
Qt Version: 4.8.0
Operating System: Linux 3.2.0-14-generic-pae i686
Distribution: Ubuntu precise (development branch)

-- Information about the crash:
- What I was doing when the application crashed:
I was triying to compackt a data base then it kame up with an erro and my data was curupt

-- Backtrace:
Application: Kexi (kexi), signal: Segmentation fault
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0xb3ead720 (LWP 4740))]

Thread 3 (Thread 0xb12ffb70 (LWP 4761)):
#0  0xb775f424 in __kernel_vsyscall ()
#1  0xb65062ce in __GI___poll (fds=0x94f1ca8, nfds=3, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:87
#2  0xb54cd7eb in g_poll () from /lib/i386-linux-gnu/libglib-2.0.so.0
#3  0xb54bfdbe in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#4  0xb54c027b in g_main_loop_run () from /lib/i386-linux-gnu/libglib-2.0.so.0
#5  0xb2637d1a in ?? () from /usr/lib/i386-linux-gnu/libgio-2.0.so.0
#6  0xb54e30b3 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#7  0xb558fc87 in start_thread (arg=0xb12ffb70) at pthread_create.c:304
#8  0xb651468e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 2 (Thread 0xb1c9db70 (LWP 4946)):
#0  0xb4f6cd00 in __GI_clock_gettime (clock_id=1, tp=0xb1c9d008) at ../sysdeps/unix/clock_gettime.c:116
#1  0xb6684d55 in do_gettime (frac=0xb1c9d000, sec=0xb1c9cff8) at tools/qelapsedtimer_unix.cpp:123
#2  qt_gettime () at tools/qelapsedtimer_unix.cpp:140
#3  0xb676e856 in QTimerInfoList::updateCurrentTime (this=0x99a44bc) at kernel/qeventdispatcher_unix.cpp:343
#4  0xb676ebaa in QTimerInfoList::timerWait (this=0x99a44bc, tm=...) at kernel/qeventdispatcher_unix.cpp:450
#5  0xb676d453 in timerSourcePrepareHelper (src=<optimized out>, timeout=0xb1c9d10c) at kernel/qeventdispatcher_glib.cpp:136
#6  0xb676d4ed in timerSourcePrepare (source=0x99a4488, timeout=<optimized out>) at kernel/qeventdispatcher_glib.cpp:169
#7  0xb54bf4b2 in g_main_context_prepare () from /lib/i386-linux-gnu/libglib-2.0.so.0
#8  0xb54bfcbf in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
#9  0xb54bff11 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
#10 0xb676df17 in QEventDispatcherGlib::processEvents (this=0x99f8c40, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#11 0xb6739b3d in QEventLoop::processEvents (this=0xb1c9d290, flags=...) at kernel/qeventloop.cpp:149
#12 0xb6739dd9 in QEventLoop::exec (this=0xb1c9d290, flags=...) at kernel/qeventloop.cpp:204
#13 0xb66238fc in QThread::exec (this=0x99a11d0) at thread/qthread.cpp:501
#14 0xb67171dd in QInotifyFileSystemWatcherEngine::run (this=0x99a11d0) at io/qfilesystemwatcher_inotify.cpp:248
#15 0xb6626d90 in QThreadPrivate::start (arg=0x99a11d0) at thread/qthread_unix.cpp:298
#16 0xb558fc87 in start_thread (arg=0xb1c9db70) at pthread_create.c:304
#17 0xb651468e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:130

Thread 1 (Thread 0xb3ead720 (LWP 4740)):
[KCrash Handler]
#7  QWidget::releaseShortcut (this=0x9890370, id=-113) at kernel/qwidget.cpp:11329
#8  0xb711ce41 in QLabelPrivate::clearContents (this=0x9826e08) at widgets/qlabel.cpp:1389
#9  0xb711d198 in QLabel::~QLabel (this=0x9890370, __in_chrg=<optimized out>) at widgets/qlabel.cpp:277
#10 0xb711d202 in QLabel::~QLabel (this=0x9890370, __in_chrg=<optimized out>) at widgets/qlabel.cpp:278
#11 0xb6750341 in QObjectPrivate::deleteChildren (this=0x9a8ad50) at kernel/qobject.cpp:1908
#12 0xb6cf6f3c in QWidget::~QWidget (this=0x96343b0, __in_chrg=<optimized out>) at kernel/qwidget.cpp:1675
#13 0xb6252f00 in KexiPropertyPaneViewBase::~KexiPropertyPaneViewBase (this=0x96343b0, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/widget/properties/KexiPropertyPaneViewBase.cpp:59
#14 0xaedb572f in KexiLookupColumnPage::~KexiLookupColumnPage (this=0x96343b0, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/plugins/tables/kexilookupcolumnpage.cpp:238
#15 0xaedb5772 in KexiLookupColumnPage::~KexiLookupColumnPage (this=0x96343b0, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/plugins/tables/kexilookupcolumnpage.cpp:241
#16 0xaed9ce6b in ~Private (this=0x9af8580, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/plugins/tables/kexitablepart.cpp:50
#17 KexiTablePart::~KexiTablePart (this=0x9b476d8, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/plugins/tables/kexitablepart.cpp:71
#18 0xaed9cec2 in KexiTablePart::~KexiTablePart (this=0x9b476d8, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/plugins/tables/kexitablepart.cpp:72
#19 0xb6750341 in QObjectPrivate::deleteChildren (this=0x963cf48) at kernel/qobject.cpp:1908
#20 0xb6755ab1 in QObject::~QObject (this=0x9659ef4, __in_chrg=<optimized out>) at kernel/qobject.cpp:927
#21 0xb7675d45 in KexiPart::Manager::~Manager (this=0x9659ef4, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/core/kexipartmanager.cpp:47
#22 0xb765228d in ~KexiInternal (this=0x9659e50, __in_chrg=<optimized out>) at /build/buildd/calligra-2.3.86/kexi/core/kexi.cpp:54
#23 destroy () at /build/buildd/calligra-2.3.86/kexi/core/kexi.cpp:65
#24 0xb7655ba9 in KCleanUpGlobalStatic::~KCleanUpGlobalStatic (this=0xb76a074c, __in_chrg=<optimized out>) at /usr/include/kglobal.h:62
#25 0xb6472981 in __run_exit_handlers (status=0, listp=0xb65bb324, run_list_atexit=true) at exit.c:78
#26 0xb6472a0d in __GI_exit (status=0) at exit.c:100
#27 0xb645911b in __libc_start_main (main=0x8048690 <main(int, char**)>, argc=1, ubp_av=0xbf8d7144, init=0x80487c0 <__libc_csu_init>, fini=0x8048830 <__libc_csu_fini>, rtld_fini=0xb776eb90 <_dl_fini>, stack_end=0xbf8d713c) at libc-start.c:258
#28 0x08048725 in _start ()

Possible duplicates by query: bug 292201, bug 289612, bug 289226.

Reported using DrKonqi
Comment 1 Jarosław Staniek 2012-02-08 23:38:12 UTC
Hi, thanks for the report. Are you sure the data is corrupt also after you restart Kexi and reopen the file?
I am asking because in case of failure, compacting leaves the .kexi file untouched.

If there's corruption, could you create a simple .kexi file, corrupt it as you explained and attach here using 'the Add an attachment' link below?

Thanks.
Comment 2 Jarosław Staniek 2012-02-09 00:11:33 UTC
I can confirm that compacting fails (but no corruption).
Comment 3 Jarosław Staniek 2012-03-02 00:52:31 UTC
Git commit 983553232e2d7976abf709a5208f37da42d74013 by Jaroslaw Staniek.
Committed on 02/03/2012 at 01:41.
Pushed by staniek into branch 'master'.

kexi_sqlite3_dump will go there, based on fragments from SQLite's shell.c

(from SQLite 3.7.10)

A  +2988 -0    kexi/kexidb/drivers/sqlite/dump/shell.c     [License: Public Domain]

http://commits.kde.org/calligra/983553232e2d7976abf709a5208f37da42d74013
Comment 4 Jarosław Staniek 2012-03-02 00:52:31 UTC
Git commit 42ffb1c08d74b7776c3dba6990e154571aad6e44 by Jaroslaw Staniek.
Committed on 02/03/2012 at 01:45.
Pushed by staniek into branch 'master'.

Ported database compacting code to the new Kexi that uses system SQLite

KexiDB
*SQLite Driver
*Ported database compacting code to the new Kexi that uses system SQLite version

DIGEST:Kexi switched to a new optimized SQLite database compacting tool

M  +4    -0    kexi/kexidb/drivers/sqlite/CMakeLists.txt
A  +9    -0    kexi/kexidb/drivers/sqlite/dump/CMakeLists.txt
A  +4    -0    kexi/kexidb/drivers/sqlite/dump/README
A  +50   -0    kexi/kexidb/drivers/sqlite/dump/main.cpp     [License: LGPL (v2+)]
M  +160  -1    kexi/kexidb/drivers/sqlite/dump/shell.c
M  +1    -1    kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
M  +92   -43   kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
M  +7    -4    kexi/kexidb/drivers/sqlite/sqlitevacuum.h

http://commits.kde.org/calligra/42ffb1c08d74b7776c3dba6990e154571aad6e44
Comment 5 Jarosław Staniek 2012-06-25 22:35:22 UTC
Git commit 15bbd11d16a4ff989a177324a405fb954809beb6 by Jaroslaw Staniek.
Committed on 20/06/2012 at 22:35.
Pushed by staniek into branch 'master'.

predicate_sqlite3_dump, based on fragments from SQLite's shell.c

(from SQLite 3.7.10)

*(2012-03-02 calligra master commit 983553232e)

A  +2988 -0    Drivers/sqlite/dump/shell.c     [License: Public Domain]

http://commits.kde.org/predicate/15bbd11d16a4ff989a177324a405fb954809beb6
Comment 6 Jarosław Staniek 2012-06-27 11:28:24 UTC
Git commit c3be35fea65e0a1b02c673805b8211ce39972b9c by Jaroslaw Staniek.
Committed on 27/06/2012 at 00:16.
Pushed by staniek into branch 'master'.

Ported database compacting code to Predicate that uses system SQLite

*(2012-02-02 calligra master commit 42ffb1c08d74b)

M  +18   -3    Drivers/sqlite/CMakeLists.txt
M  +10   -9    Drivers/sqlite/SqliteAdmin.cpp
M  +2    -1    Drivers/sqlite/SqliteAdmin.h
A  +28   -0    Drivers/sqlite/SqliteGlobal.h.cmake
M  +102  -51   Drivers/sqlite/SqliteVacuum.cpp
M  +10   -7    Drivers/sqlite/SqliteVacuum.h
A  +7    -0    Drivers/sqlite/dump/CMakeLists.txt
A  +4    -0    Drivers/sqlite/dump/README
C  +29   -16   Drivers/sqlite/dump/main.cpp [from: Drivers/sqlite/SqliteAdmin.h - 053% similarity]
M  +200  -39   Drivers/sqlite/dump/shell.c

http://commits.kde.org/predicate/c3be35fea65e0a1b02c673805b8211ce39972b9c