Bugs item #2538837, was opened at 2009-01-27 00:11
Message generated for change (Comment added) made by mlkersten
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2538837&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core
Group: MonetDB5 CVS Head
Status: Closed
Resolution: Fixed
Priority: 5
Private: No
Submitted By: Stefan Manegold (stmane)
Assigned to: Martin Kersten (mlkersten)
Summary: mserver5 segfault (double free) when quitting debugger

Initial Comment:
With a freshly stated ("virgin") M5/SQL server (`mserver5 --dbinit='include 
sql;'), the following simple `mclient -lsql` session results in an assertion or 
segfault in GDKfree, most probably due to an attemt to free already freed or 
not allocated memory:

$ mclient -lsql
sql>debug select * from tables;
mdb>#    mdb.start();
mdb>n
mdb>#    user.s0_1();
mdb>[Crtl-D]

gdb reveals the following:

$ gdb --args mserver5 --dbinit='include sql;'
[...]
(gdb) r
[...]
# MonetDB server v5.9.0, based on kernel v1.27.0
# Serving database 'demo', using 4 threads
# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked
# Copyright (c) 1993-July 2008 CWI.
# Copyright (c) August 2008- MonetDB B.V., all rights reserved
# Visit http://monetdb.cwi.nl/ for further information
#warning: please don't forget to set your vault key!
#(see .../etc/monetdb5.conf)
# Listening for connection requests on mapi:monetdb://127.0.0.1:50000/
# MonetDB/SQL module v2.27.0 loaded
>
mserver5: .../MonetDB/src/gdk/gdk_utils.mx:1110: GDKfree: Assertion `size != 0' 
failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffe1ca7950 (LWP 25596)]
0x0000003675232f05 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install 
bzip2-libs-1.0.5-3.fc10.x86_64 e2fsprogs-libs-1.41.3-2.fc10.x86_64 
glibc-2.9-3.x86_64 keyutils-libs-1.2-3.fc9.x86_64 
krb5-libs-1.6.3-16.fc10.x86_64 libselinux-2.0.73-1.fc10.x86_64 
ncurses-libs-5.6-20.20080927.fc10.x86_64 openssl-0.9.8g-12.fc10.x86_64 
pcre-7.8-1.fc10.x86_64 readline-5.2-13.fc9.x86_64 zlib-1.2.3-18.fc9.x86_64
(gdb) bt
#0  0x0000003675232f05 in raise () from /lib64/libc.so.6
#1  0x0000003675234a73 in abort () from /lib64/libc.so.6
#2  0x000000367522bef9 in __assert_fail () from /lib64/libc.so.6
#3  0x00007ffff7400b54 in GDKfree (blk=0x12ff8f8) at 
.../MonetDB/src/gdk/gdk_utils.mx:1110
#4  0x00007ffff7d34281 in runScenarioBody (c=0x6049f8) at 
.../MonetDB5/src/mal/mal_scenario.mx:613
#5  0x00007ffff7d34557 in runScenario (c=0x6049f8) at 
.../MonetDB5/src/mal/mal_scenario.mx:660
#6  0x00007ffff7cf844b in MSserveClient (dummy=0x6049f8) at 
.../MonetDB5/src/mal/mal_session.mx:461
#7  0x0000003675e073da in start_thread () from /lib64/libpthread.so.0
#8  0x00000036752e62bd in clone () from /lib64/libc.so.6
(gdb) up
#1  0x0000003675234a73 in abort () from /lib64/libc.so.6
(gdb) 
#2  0x000000367522bef9 in __assert_fail () from /lib64/libc.so.6
(gdb) 
#3  0x00007ffff7400b54 in GDKfree (blk=0x12ff8f8) at 
.../MonetDB/src/gdk/gdk_utils.mx:1110
1110            assert(size != 0);
(gdb) li
1105            size = GDK_MEM_BLKSIZE(s);
1106    
1107            /* check against duplicate free */
1108            assert((size & 2) == 0);
1109    
1110            assert(size != 0);
1111    
1112            if (size < 0) {
1113                    size_t maxsize = (size_t) s[-2];
1114    
(gdb) printf "%x\n",*s
dbdbdbdb
(gdb) 


----------------------------------------------------------------------

>Comment By: Martin Kersten (mlkersten)
Date: 2009-01-27 09:24

Message:
fixed by resetting the variable after GDKfree

----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2009-01-27 01:15

Message:
fixed by resetting the variable after GDKfree

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2538837&group_id=56967

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to