
My mistake, I assumed assertions would be enabled in debug mode, but now that I look closely at the configure script, I see an explicit enable_assert option. Couldn't a memory bug overwrite the contents of tp? -----Original Message----- From: users-list [mailto:users-list-bounces+david.b.anderson=citi.com@monetdb.org] On Behalf Of Sjoerd Mullender Sent: Tuesday, July 19, 2016 10:58 AM To: users-list@monetdb.org Subject: Re: MERGE TABLE ERROR -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 19/07/16 15:29, Anderson, David B wrote:
(Re-submitting/formatting to get under the 40K message size limit)
The coredump @565 is due to tp being NULL. Since it just got past the assertion @563, the problem has to be down in cs_add().
563 assert(tp); 564 cs_add(&t->tables, tp, TR_OLD); 565 tp->p = t;
I've dug down into cs_add(), but it isn't obvious to me where tp is getting set to NULL. Since it looks like you have a fairly straightforward test case, I would submit a bug report.
Since this is C (not C++) and since cs_add is a function (not a macro), cs_add cannot possibly change the value of tp in the calling function. The only alternative here is that assertions are disabled during configure. In other words, find_sql_table() must return a NULL pointer for whatever reason.
From: users-list [mailto:users-list-bounces+david.b.anderson=citi.com@monetdb.org] On Behalf Of Ariel Abadi Sent: Monday, July 18, 2016 1:25 PM To: Communication channel for MonetDB users Subject: Re: MERGE TABLE ERROR
Finally I make it to start it on debugger...
Here is the trace... Can someone help us ? Thks in advance!
gdb --args /usr/local/bin/mserver5 --dbpath=/opt/monetdb/db_error/sb_traf --set merovingian_uri=mapi:monetdb://monetbd-test:54321/sb_traf --set mapi_open=false --set mapi_port=0 --set mapi_usock=/opt/monetdb/db_error/sb_traf/.mapi.sock --set monet_vault_key=/opt/monetdb/db_error/sb_traf/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes --dbinit="sql.start();" GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-80.el7 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/local/bin/mserver5...done. (gdb) r Starting program: /usr/local/bin/mserver5 --dbpath=/opt/monetdb/db_error/sb_traf --set merovingian_uri=mapi:monetdb://monetbd-test:54321/sb_traf --set mapi_open=false --set mapi_port=0 --set mapi_usock=/opt/monetdb/db_error/sb_traf/.mapi.sock --set monet_vault_key=/opt/monetdb/db_error/sb_traf/.vaultkey --set gdk_nr_threads=8 --set max_clients=64 --set sql_optimizer=default_pipe --set monet_daemon=yes --dbinit=sql.start\(\)\; [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". # MonetDB 5 server v11.23.3 "Jun2016" # Serving database 'sb_traf', using 8 threads # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked # Found 30.000 GiB available main-memory. # Copyright (c) 1993-July 2008 CWI. # Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved # Visit http://www.monetdb.org/ for further information [New Thread 0x7fffeb66b700 (LWP 23533)] [New Thread 0x7fffea7eb700 (LWP 23534)] # Listening for UNIX domain connection requests on mapi:monetdb:///opt/monetdb/db_error/sb_traf/.mapi.sock
Program received signal SIGSEGV, Segmentation fault. 0x00007fffeb155e97 in load_table_parts (tr=0x4e59780, t=0x4ff02c0, rid=44) at ../../../MonetDB-11.23.3/sql/storage/store.c:565 565 tp->p = t; (gdb) where #0 0x00007fffeb155e97 in load_table_parts (tr=0x4e59780, t=0x4ff02c0, rid=44) at ../../../MonetDB-11.23.3/sql/storage/store.c:565 #1 0x00007fffeb155ffa in load_tables_of_tables (tr=0x4e59780, s=0x4fd1790) at ../../../MonetDB-11.23.3/sql/storage/store.c:587 #2 0x00007fffeb158088 in load_schema (tr=0x4e59780, id=2155, rid=9223372036854775808) at ../../../MonetDB-11.23.3/sql/storage/store.c:934 #3 0x00007fffeb15863f in load_trans (tr=0x4e59780, id=2155) at ../../../MonetDB-11.23.3/sql/storage/store.c:1003 #4 0x00007fffeb15acd0 in store_load () at ../../../MonetDB-11.23.3/sql/storage/store.c:1552 #5 0x00007fffeb15af07 in store_init (debug=0, store=store_bat, readonly=0, singleuser=0, log_settings=0x7fffffffd300, stk=0) at ../../../MonetDB-11.23.3/sql/storage/store.c:1615 #6 0x00007fffeb0d7a24 in mvc_init (debug=0, store=store_bat, ro=0, su=0, stk=0) at ../../../MonetDB-11.23.3/sql/server/sql_mvc.c:60 #7 0x00007fffeb04cdce in SQLinit () at ../../../../MonetDB-11.23.3/sql/backends/monet5/sql_scenario.c:252 #8 0x00007fffeb04cb0e in SQLprelude (ret=0x4cf6840) at ../../../../MonetDB-11.23.3/sql/backends/monet5/sql_scenario.c:178 #9 0x00007ffff79d1403 in malCommandCall (stk=0x4cf6630, pci=0x4bca750) at ../../../MonetDB-11.23.3/monetdb5/mal/mal_interpreter.c:77 #10 0x00007ffff79d3a29 in runMALsequence (cntxt=0x7fffeb66c020, mb=0x609660, startpc=1, stoppc=0, stk=0x4cf6630, env=0x0, pcicaller=0x0) at ../../../MonetDB-11.23.3/monetdb5/mal/mal_interpreter.c:658 #11 0x00007ffff79d2c3c in runMAL (cntxt=0x7fffeb66c020, mb=0x609660, mbcaller=0x0, env=0x0) at ../../../MonetDB-11.23.3/monetdb5/mal/mal_interpreter.c:354 #12 0x00007ffff79f23cb in MALengine (c=0x7fffeb66c020) at ../../../MonetDB-11.23.3/monetdb5/mal/mal_session.c:650 #13 0x00007ffff79f0a8c in malBootstrap () at ../../../MonetDB-11.23.3/monetdb5/mal/mal_session.c:62 #14 0x00007ffff79b7ff9 in mal_init () at ../../../MonetDB-11.23.3/monetdb5/mal/mal.c:103 #15 0x00000000004036c8 in main (argc=21, av=0x7fffffffe478) at ../../../MonetDB-11.23.3/tools/mserver/mserver5.c:658
(gdb) l 560 void *v = table_funcs.column_find_value(tr, find_sql_column(objects, "name"), rid); 561 sql_table *tp = find_sql_table(t->s, v); _DELETE(v); 562 563 assert(tp); 564 cs_add(&t->tables, tp, TR_OLD); 565 tp->p = t; 566 } 567 568 static void 569 load_tables_of_tables(sql_trans *tr, sql_schema *s)
(gdb) p tp $1 = (sql_table *) 0x0 (gdb) p &t $2 = (sql_table **) 0x7fffffffcfd0
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
- -- Sjoerd Mullender -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXjj/8AAoJEISMxT6LrWYgimEIAKPrGIR4E8OVbUFPQwUascz0 mu26TxDe3ogU3lYl1uBMWDb5FEd8vmaH1vEKe/jLFjBJZV4KUtmqS3+7hv2V3UT1 D3xP/VapeEnt5DZjBkJrXUocmYVl3PndBL4oEVbjpz74/V2yhF15mIcPFJfDbfEj ixWOWT2ZIuC/zkzzfxeg24Qn4ru546n4PRwkUuh1NvUZUMqY3nivFP7vyYP++LE5 Hiihcr/Kcj3HfycHB3Jj38TOdNyRZ17eMlMnSP4wvDVelpTpK+xDHf3zNfgumjew tsi2yzOliOSEALxRZN8Z2JKfwyPSY5zJEdS3gSHeBTu8Ap56MxiXlV59e+9hctQ= =BmVr -----END PGP SIGNATURE----- _______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list