Re: [gnome-db] libgda and threads on different connections
- From: Massimo Cora' <maxcvs email it>
- To: Vivien Malerba <vmalerba gmail com>
- Cc: gnome-db list <gnome-db-list gnome org>
- Subject: Re: [gnome-db] libgda and threads on different connections
- Date: Sat, 05 Jul 2008 21:01:26 +0200
Hi Vivien,
Vivien Malerba wrote:
> 2008/6/23 Massimo Cora' <maxcvs email it>:
>> Hi Vivien,
>
> I've just made some corrections, and now using connections in threads
> should work as long as the same object is not used by 2 different
> threads. Could you test that it works for you?
>
I tried with your last patch. Unfortunately Anjuta is stil crashing.
Here they are some backtraces:
--- snip ---
from /home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4
#8 0x09a82ee8 in ?? ()
#9 0xb5a9b371 in gda_value_free (value=0xb6ea0120) at gda-value.c:1217
#10 0xb5a795e0 in real_gda_holder_set_value (holder=0x8b94ac0,
value=0x9a82ee8, do_copy=1) at gda-holder.c:843
#11 0xb5b578a7 in sdb_engine_add_new_symbol (dbe=0x8a11e80,
tag_entry=0xb06ff2fc, file_defined_id=11, sym_update=0)
at symbol-db-engine.c:3673
--- snip ---
or a better one
--- snip ---
** Message: elapsed: 1.142388 for (20) [0.057119 per symbol]
** Message: sdb_engine_populate_db_by_tags ()
[Thread 0xaa813b90 (LWP 24033) exited]
[Thread 0xb1dffb90 (LWP 24003) exited]
*** glibc detected *** /home/pescio/svnroot/svninstalled/usr/bin/anjuta:
corrupted double-linked list: 0xb2ee4488 ***
======= Backtrace: =========
/lib/libc.so.6[0xb6e29eda]
/lib/libc.so.6[0xb6e2bd3a]
/lib/libc.so.6(__libc_malloc+0x8d)[0xb6e2db2d]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4(sqlite3_malloc+0x9c)[0xb5b3cedc]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5b71dc0]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5b72442]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5b2a083]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5ab9cf9]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4(gda_connection_statement_execute_select+0xc4)[0xb5abf424]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5b2afcb]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4[0xb5ab9cf9]
/home/pescio/svnroot/svninstalled/usr//lib/libgda-4.0.so.4(gda_connection_statement_execute_non_select+0x174)[0xb5abfd64]
/home/pescio/svnroot/svninstalled/usr//lib/anjuta/libanjuta-symbol-db.so[0xb5bbff71]
/home/pescio/svnroot/svninstalled/usr//lib/anjuta/libanjuta-symbol-db.so[0xb5bc11a6]
/home/pescio/svnroot/svninstalled/usr//lib/anjuta/libanjuta-symbol-db.so[0xb5bc2054]
/usr//lib/libglib-2.0.so.0[0xb6f6e524]
/lib/libpthread.so.0(pthread_mutex_lock+0x0)[0xb789d330]
[0x81ffffef]
======= Memory map: ========
08048000-08056000 r-xp 00000000 03:49 524432
/home/pescio/svnroot/svninstalled/usr/bin/anjuta
08056000-08057000 rw-p 0000e000 03:49 524432
/home/pescio/svnroot/svninstalled/usr/bin/anjuta
08057000-09b3c000 rw-p 08057000 00:00 0 [heap]
a8014000-a8015000 ---p a8014000 00:00 0
a8015000-a8814000 rwxp a8015000 00:00 0
a8814000-a8815000 ---p a8814000 00:00 0
a8815000-a9014000 rwxp a8815000 00:00 0
a9014000-a9015000 ---p a9014000 00:00 0
a9015000-a9814000 rwxp a9015000 00:00 0
a9814000-a9815000 ---p a9814000 00:00 0
a9815000-aa014000 rwxp a9815000 00:00 0
aa014000-aa015000 ---p aa014000 00:00 0
aa015000-aa814000 rwxp aa015000 00:00 0
aa814000-aa815000 ---p aa814000 00:00 0
aa815000-ab014000 rwxp aa815000 00:00 0
ab014000-ab015000 ---p ab014000 00:00 0
ab015000-ab814000 rwxp ab015000 00:00 0
ab814000-ab815000 ---p ab814000 00:00 0
ab815000-ac014000 rwxp ab815000 00:00 0
ac014000-ac015000 ---p ac014000 00:00 0
ac015000-ac814000 rwxp ac015000 00:00 0
ac814000-ac815000 ---p ac814000 00:00 0
ac815000-ad014000 rwxp ac815000 00:00 0
ad014000-ad015000 ---p ad014000 00:00 0
ad015000-ad814000 rwxp ad015000 00:00 0
ad814000-ad815000 ---p ad814000 00:00 0
ad815000-ae014000 rwxp ad815000 00:00 0
ae014000-ae015000 ---p ae014000 00:00 0
ae015000-ae814000 rwxp ae015000 00:00 0
ae814000-ae815000 ---p ae814000 00:00 0
ae815000-af014000 rwxp ae815000 00:00 0
af014000-af015000 ---p af014000 00:00 0
af015000-af814000 rwxp af015000 00:00 0
af814000-af815000 ---p af814000 00:00 0
af815000-b0014000 rwxp af815000 00:00 0
b0014000-b0015000 ---p b0014000 00:00 0
b0015000-b0814000 rwxp b0015000 00:00 0
b0814000-b0815000 ---p b0814000 00:00 0
b0815000-b1014000 rwxp b0815000 00:00 0
b1600000-b1601000 ---p b1600000 00:00 0
b1601000-b1e00000 rwxp b1601000 00:00 0
b1e00000-b1e01000 ---p b1e00000 00:00 0
b1e01000-b2600000 rwxp b1e01000 00:00 0
b2600000-b2601000 ---p b2600000 00:00 0
b2601000-b2e00000 rwxp b2601000 00:00 0
b2e00000-b2f00000 rw-p b2e00000 00:00 0
b2fb4000-b3014000 rw-s 00000000 00:08 46137366 /SYSV00000000 (deleted)
b3014000-b301d000 r-xp 00000000 03:49 619405
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-language-cpp-java.so
b301d000-b301e000 rw-p 00008000 03:49 619405
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-language-cpp-java.so
b301e000-b3065000 r--p 00000000 03:49 198319
/usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf
b3065000-b30b1000 r--p 00000000 03:49 198320
/usr/share/fonts/TTF/DejaVuSansMono.ttf
b30b1000-b311c000 r-xp 00000000 03:49 44828
/usr/lib/libgnomeprint-2-2.so.0.1.0
b311c000-b311e000 rw-p 0006b000 03:49 44828
/usr/lib/libgnomeprint-2-2.so.0.1.0
b311e000-b315e000 r-xp 00000000 03:49 44837
/usr/lib/libgnomeprintui-2-2.so.0.1.0
b315e000-b3160000 rw-p 00040000 03:49 44837
/usr/lib/libgnomeprintui-2-2.so.0.1.0
b3160000-b3277000 r-xp 00000000 03:49 619231
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-editor.so
b3277000-b327b000 rw-p 00116000 03:49 619231
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-editor.so
b327b000-b367e000 rw-p b327b000 00:00 0
b367e000-b3690000 r--s 00000000 03:49 200306 /usr/share/mime/mime.cache
b3690000-b36a3000 r-xp 00000000 03:49 27929
/usr/lib/gnome-build-1.0/backends/libgbf-am.so
b36a3000-b36a4000 rw-p 00013000 03:49 27929
/usr/lib/gnome-build-1.0/backends/libgbf-am.so
b36a4000-b36a5000 ---p b36a4000 00:00 0
b36a5000-b3ea4000 rwxp b36a5000 00:00 0
b3ea4000-b3ea5000 ---p b3ea4000 00:00 0
b3ea5000-b46a4000 rwxp b3ea5000 00:00 0
b46a4000-b46b6000 r--s 00000000 03:49 200306 /usr/share/mime/mime.cache
b46b6000-b46be000 r-xp 00000000 03:49 62205
/usr/lib/libtrackerclient.so.0.0.0
b46be000-b46bf000 rw-p 00007000 03:49 62205
/usr/lib/libtrackerclient.so.0.0.0
b46bf000-b4767000 r-xp 00000000 03:49 981986
/usr/lib/libbfd-2.17.50.0.17.20070615.so
b4767000-b4770000 rw-p 000a8000 03:49 981986
/usr/lib/libbfd-2.17.50.0.17.20070615.so
b4770000-b4774000 rw-p b4770000 00:00 0
b4774000-b478d000 r-xp 00000000 03:49 619326
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-valgrind.so
b478d000-b478e000 rw-p 00019000 03:49 619326
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-valgrind.so
b478e000-b47c0000 r-xp 00000000 03:49 43648 /usr/lib/libxslt.so.1.1.22
b47c0000-b47c1000 rw-p 00032000 03:49 43648 /usr/lib/libxslt.so.1.1.22
b47c1000-b47e0000 r-xp 00000000 03:49 619221
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-gtodo.so
b47e0000-b47e1000 rw-p 0001f000 03:49 619221
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-gtodo.so
b4a00000-b4a21000 rw-p b4a00000 00:00 0
b4a21000-b4b00000 ---p b4a21000 00:00 0
b4bde000-b4fe1000 rw-p b4bde000 00:00 0
b4fe1000-b4fe2000 ---p b4fe1000 00:00 0
b4fe2000-b57e1000 rwxp b4fe2000 00:00 0
b57e1000-b57ea000 r-xp 00000000 03:49 910408 /lib/libcrypt-2.7.so
b57ea000-b57ec000 rw-p 00008000 03:49 910408 /lib/libcrypt-2.7.so
b57ec000-b5813000 rw-p b57ec000 00:00 0
b5813000-b5814000 r--s 00000000 03:49 651917
/home/pescio/.local/share/mime/mime.cache
b5814000-b581e000 r-xp 00000000 03:49 431605
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
b581e000-b581f000 rw-p 00009000 03:49 431605
/usr/lib/gtk-2.0/2.10.0/filesystems/libgnome-vfs.so
b581f000-b582b000 r-xp 00000000 03:49 619263
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-build-basic-autotools.so
b582b000-b582c000 rw-p 0000b000 03:49 619263
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/libanjuta-build-basic-autotools.so
b582c000-b582e000 r-xp 00000000 03:49 619454
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/liblanguage-manager.so
b582e000-b582f000 rw-p 00001000 03:49 619454
/home/pescio/svnroot/svninstalled/usr/lib/anjuta/liblanguage-manager.so
b582f000-b5830000 r-xp 00000000 03:49 562588
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0/providers/libgda-sqlite.so
b5830000-b5831000 rw-p 00000000 03:49 562588
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0/providers/libgda-sqlite.so
b5831000-b5944000 r-xp 00000000 03:49 75176
/usr/lib/mysql/libmysqlclient.so.15.0.0
b5944000-b5973000 rw-p 00113000 03:49 75176
/usr/lib/mysql/libmysqlclient.so.15.0.0
b5973000-b5974000 rw-p b5973000 00:00 0
b5974000-b5991000 r-xp 00000000 03:49 562593
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0/providers/libgda-mysql.so
b5991000-b5993000 rw-p 0001c000 03:49 562593
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0/providers/libgda-mysql.so
b5993000-b5a8a000 r-xp 00000000 03:49 910343 /lib/libdb-4.4.so
b5a8a000-b5a8d000 rw-p 000f6000 03:49 910343 /lib/libdb-4.4.so
b5a8d000-b5a93000 r-xp 00000000 03:49 982801
/usr/lib/libgamin-1.so.0.1.9
b5a93000-b5a94000 rw-p 00006000 03:49 982801
/usr/lib/libgamin-1.so.0.1.9
b5a94000-b5ba6000 r-xp 00000000 03:49 562581
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0.so.4.0.0
b5ba6000-b5bac000 rw-p 00111000 03:49 562581
/home/pescio/svnroot/svninstalled/usr/lib/libgda-4.0.so.4.0.0
b5bac000-b5ba
Program received signal SIGABRT, Aborted.
[Switching to Thread 0xae013b90 (LWP 24002)]
0xb6deac66 in raise () from /lib/libc.so.6
(gdb) bt
#0 0xb6deac66 in raise () from /lib/libc.so.6
#1 0xb6dec571 in abort () from /lib/libc.so.6
#2 0xb6e2396b in __libc_message () from /lib/libc.so.6
#3 0xb6e29eda in malloc_consolidate () from /lib/libc.so.6
#4 0xb6e2bd3a in _int_malloc () from /lib/libc.so.6
#5 0xb6e2db2d in malloc () from /lib/libc.so.6
#6 0xb5b3cedc in sqlite3_malloc (nBytes=0) at sqlite3.c:11101
#7 0xb5b71dc0 in sqlite3RunParser (pParse=0xae012c0c,
zSql=0xb5b9c4f8 "SELECT 1 FROM sqlite_master LIMIT 1",
pzErrMsg=0xae012db8)
at sqlite3.c:74161
#8 0xb5b72442 in sqlite3LockAndPrepare (db=0x8b508f8,
zSql=0xb5b9c4f8 "SELECT 1 FROM sqlite_master LIMIT 1", nBytes=-1,
saveSqlFlag=1, ppStmt=0xae012e94, pzTail=0x0) at sqlite3.c:63241
#9 0xb5b2a083 in gda_sqlite_provider_statement_execute
(provider=0x8a786d0,
cnc=0x8a21690, stmt=0xb2ee5290, params=0x0,
model_usage=GDA_STATEMENT_MODEL_RANDOM_ACCESS, col_types=0xb2e9a720,
last_inserted_row=0x0, task_id=0x0, async_cb=0, cb_data=0x0,
error=0xae01300c) at gda-sqlite-provider.c:1834
#10 0xb5ab9cf9 in gda_connection_statement_execute_v (cnc=0x8a21690,
stmt=0xb2ee5290, params=0x0,
model_usage=GDA_STATEMENT_MODEL_RANDOM_ACCESS, last_inserted_row=0x0,
error=0xae01300c) at gda-connection.c:1380
#11 0xb5abf424 in gda_connection_statement_execute_select (cnc=0x8a21690,
---Type <return> to continue, or q <return> to quit---
stmt=0xb2ee5290, params=0x0, error=0xae01300c) at gda-connection.c:1550
#12 0xb5b2afcb in gda_sqlite_provider_statement_execute
(provider=0x8a786d0,
cnc=0x8a21690, stmt=0x897eb30, params=0x8e7c980,
model_usage=GDA_STATEMENT_MODEL_RANDOM_ACCESS, col_types=0xb2e2d930,
last_inserted_row=0xae0132a4, task_id=0x0, async_cb=0, cb_data=0x0,
error=0x0) at gda-sqlite-provider.c:1749
#13 0xb5ab9cf9 in gda_connection_statement_execute_v (cnc=0x8a21690,
stmt=0x897eb30, params=0x8e7c980,
model_usage=GDA_STATEMENT_MODEL_RANDOM_ACCESS,
last_inserted_row=0xae0132a4, error=0x0) at gda-connection.c:1380
#14 0xb5abfd64 in gda_connection_statement_execute_non_select
(cnc=0x8a21690,
stmt=0x897eb30, params=0x8e7c980, last_insert_row=0xae0132a4, error=0x0)
at gda-connection.c:1488
#15 0xb5bbff71 in sdb_engine_add_new_symbol (dbe=0x81b2370,
tag_entry=0xae0132fc, file_defined_id=3, sym_update=0)
at symbol-db-engine.c:3109
#16 0xb5bc11a6 in sdb_engine_populate_db_by_tags (dbe=0x81b2370,
fd=<value optimized out>, fake_file_on_db=0x0, force_sym_update=0)
at symbol-db-engine.c:1520
#17 0xb5bc2054 in sdb_engine_ctags_output_thread (data=0x8c7b568)
at symbol-db-engine.c:1603
#18 0xb6f6e524 in ?? () from /usr//lib/libglib-2.0.so.0
#19 0x08c7b568 in ?? ()
---Type <return> to continue, or q <return> to quit---
#20 0xb2e4c9e0 in ?? ()
#21 0x00000000 in ?? ()
--- snip ---
We've committed on svn the latest changes so that, if you want, you can
test what's going wrong.
To let the program crash you should edit
anjuta/plugins/symbol-db/plugin.c and remove the '#if 0' at line 1155.
Then open an Anjuta's project, no matter which one but better if it has
some .c files. You should see the population of 1. the project you
opened, 2. the system global tags required by the project.
The db created will be on /home/user/foo_project/.anjuta_sym_db.db [the
project's one] and /home/user/.anjuta/.anjuta_sym_db.db [the system's one].
I'll continue investigating this bug and I'll let you know some more
infos as soon as I get some.
thanks and regards,
Massimo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]