Hi,

I'm a new user of Fastbit (i'm currently evaluating wether it could help us in 
our application) and i systematically get the following error when running ibis 
with multiple thread (i'm running a large file containing ~1200 queries with 
ibis -f). If i mute ibis, i dont get the error, if i run it with -t1, i dont 
get the error either (which makes me think it is a concurrency issue)

*** glibc detected *** ibis: double free or corruption (fasttop): 
0x00007fc61800f060 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75df5)[0x7fc621115df5]
/lib64/libc.so.6(cfree+0x6c)[0x7fc62111ad2c]
/home/dom/usr/lib/libfastbit.so.0(_ZNK4ibis4part8readRIDsEv+0x95)[0x7fc621f68405]
/home/dom/usr/lib/libfastbit.so.0(_ZNK4ibis4part7getRIDsERKNS_9bitvectorE+0x30e)[0x7fc621f8a7ce]
/home/dom/usr/lib/libfastbit.so.0(_ZNK4ibis5query7getRIDsERKNS_9bitvectorE+0xf4)[0x7fc6229ac624]
/home/dom/usr/lib/libfastbit.so.0(_ZN4ibis7bundlesC1ERKNS_5queryE+0x44)[0x7fc622c91b74]
/home/dom/usr/lib/libfastbit.so.0(_ZN4ibis6bundle6createERKNS_5queryE+0x6a)[0x7fc622c92d6a]
ibis[0x41c077]
ibis[0x428959]
ibis[0x4293b4]
/lib64/libpthread.so.0(+0x7c5c)[0x7fc620e8ac5c]
/lib64/libc.so.6(clone+0x6d)[0x7fc621179fcd]

With GDB, i can get the following backtrace:

#0  0x00007ffff5d48a55 in raise () from /lib64/libc.so.6
#1  0x00007ffff5d49d55 in abort () from /lib64/libc.so.6
#2  0x00007ffff5d83972 in ?? () from /lib64/libc.so.6
#3  0x00007ffff5d88df5 in ?? () from /lib64/libc.so.6
#4  0x00007ffff5d8dd2c in free () from /lib64/libc.so.6
#5  0x00007ffff6bdb405 in ibis::part::readRIDs (this=0x644870) at part.cpp:2019
#6  0x00007ffff6bfd7ce in ibis::part::getRIDs (this=0x644870, mask=...) at 
part.cpp:2368
#7  0x00007ffff761f624 in ibis::query::getRIDs (this=0x7fffebffb6f0, mask=...) 
at query.cpp:1366
#8  0x00007ffff7904b74 in bundle (q=..., this=0x7fffec055010) at bundle.h:174
#9  ibis::bundles::bundles (this=0x7fffec055010, q=...) at bundle.cpp:1092
#10 0x00007ffff7905d6a in ibis::bundle::create (q=...) at bundle.cpp:56
#11 0x000000000041c077 in doQuery (tbl=0x644870, uid=0x1 <Address 0x1 out of 
bounds>, wstr=0x7fffec0343b8 "<query>", sstr=0x7fffec003a98 "<columns>", 
ordkeys=0x6428b8 "", limit=0, start=0) at ibis.cpp:3351
#12 0x0000000000428959 in parseString (uid=0x646e08 "<uid>", qstr=0x65cbd8 
"<qstr>"...) at ibis.cpp:4607
#13 0x00000000004293b4 in thFun (arg=0x7fffffffdb70) at ibis.cpp:4659
#14 0x00007ffff5afdc5c in start_thread () from /lib64/libpthread.so.0
#15 0x00007ffff5decfcd in clone () from /lib64/libc.so.6

In readRIDs, i'm suspecting a race condition where two readers actually do the 
delete since the read lock would allow them to do so:

void ibis::part::readRIDs() const {
        if (activeDir == 0) return;

        readLock lock(this, "readRIDs");
        if (rids) {
                if (rids->size() == nEvents)
                        return;
                else
                        delete rids;
        }

        ...
}

I'm no expert in C/C++ debugging (i'm planning to use the Java binding), and i 
have little to no experience with the FastBit code base, so feel free to 
comment/ask about my use case. I'm running v1.2.6.

Thanks,

--
Dominique Prunier

_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to