[Monetdb-developers] Nov2009 segmentation fault (invalid read)

Isidor Zeuner monetdb at quidecco.de
Thu Apr 22 10:21:00 CEST 2010

Dear MonetDB developers,

I am currently experiencing segmentation faults on SQL-based data
processing using the MonetDB Nov2009 branch. As the processing is
rather complex, I don't know when I will be able to isolate a test
case. Based on the clues I gathered (see below), could you give me
some pointers on how to investigate further?

It always crashes on this query:

    FROM progress
        SELECT true
            FROM finalization
            WHERE finalization.id=progress.id
            AND finalization.category=active

The related tables are defined like this:

CREATE TABLE progress (
    id VARCHAR(32),
    attempt INTEGER,
    clearance INTEGER,
    PRIMARY KEY (id)

CREATE TABLE finalization ( 
    category VARCHAR(32),
    id VARCHAR(32),
    governing VARCHAR(64),
    sub_governing VARCHAR(64),
    domain VARCHAR(64),
    reason VARCHAR(16),
    epoch INTEGER,
    size INTEGER,
    PRIMARY KEY (category,id,governing,sub_governing,domain,reason,epoch)

On the crash, the stack backtrace always looks like this:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x42006940 (LWP 17625)]
0x00002b8e691fdad8 in strCmp (l=0x2aaab97c6a20 "06EED104D173", 
    r=0xdbdbdbdbe98848f3 <Address 0xdbdbdbdbe98848f3 out of bounds>)
    at gdk_atoms.mx:1855
1855	return GDK_STRCMP(l, r);
(gdb) bt
#0  0x00002b8e691fdad8 in strCmp (l=0x2aaab97c6a20 "06EED104D173", 
    r=0xdbdbdbdbe98848f3 <Address 0xdbdbdbdbe98848f3 out of bounds>)
    at gdk_atoms.mx:1855
#1  0x00002b8e693d7322 in BAThashjoin (l=0x2aaab9417188, r=0xd614ba0, 
    estimate=9223372036854775807) at gdk_relop.mx:452
#2  0x00002b8e6940e151 in batjoin (l=0x2aaab9417188, r=0xd614ba0, 
    estimate=9223372036854775807, swap=1 '\001') at gdk_relop.mx:1244
#3  0x00002b8e6940e193 in BATjoin (l=0x2aaab9417188, r=0xd614ba0, 
    estimate=9223372036854775807) at gdk_relop.mx:1251
#4  0x00002aaaaafd105e in CMDjoin ()
   from /opt/monetdb-nov2009/lib64/MonetDB5/lib/lib_algebra.so.5
#5  0x00002aaaaaffcef5 in ALGjoinestimate ()
   from /opt/monetdb-nov2009/lib64/MonetDB5/lib/lib_algebra.so.5
#6  0x00002aaaaaffcfc1 in ALGjoin ()
   from /opt/monetdb-nov2009/lib64/MonetDB5/lib/lib_algebra.so.5
#7  0x00002b8e6868b106 in DFLOWstep ()
   from /opt/monetdb-nov2009/lib64/libmonetdb5.so.5
#8  0x00002b8e6868ed7d in runDFLOWworker ()
   from /opt/monetdb-nov2009/lib64/libmonetdb5.so.5
#9  0x00000039d04064a7 in start_thread () from /lib64/libpthread.so.0
#10 0x00000039cf8d3c2d in clone () from /lib64/libc.so.6

The second argument's address to the comparison at the top has
always one or more 0xdb memory deletion markers, so it looks like it
is at least overlapping with deleted space.

Please note that I could not create a backtrace with full symbols as
the error does not occur with the MonetDB5 module being compiled with
debugging enabled.

Best regards,


More information about the developers-list mailing list