Hi, Gaurav,

Thanks for reporting the problem.

Please give SVN revision 592 a try.

Here is a bit of explanation just in case you are curious as what was
going on.  The column type KEY is always indexed, and therefore does
not need to build index explicitly.  When you do build the index
explicitly, the object keeps a pointer to the index just built.  The
function ibis::mensa::buildIndex deletes this pointer and therefore
leaving the pointer held by the column object itself invalid.  When
the table object is to be freed, the destructor of the column object
again attempts to delete the index pointer, which causes a double
deletion problem.  This problem is not fixed by change to
ibis::mensa::buildIndex to call the function ibis::column::loadIndex
instead of directly calling ibis::index::create.

Let me know if you experience any other problem with FastBit.

John


On 10/16/12 11:32 PM, Gaurav Agarwal wrote:
> Hi John,
> 
> I am running on 'FastBit ibis1.3.2.6'
> Am getting a weird seg fault when I try to explicitly build the index
> on a 'key' type column. The index is created successfully; the
> segfault is encountered only at the time the program is ending. If I
> skip building index on the key column (c), the program finishes up
> fine. Looking at verbose logs it seems that the problem is happening
> when invoking the cleaners in filemanager class.
> 
> Pls find attached the test data file and below are the command to
> import it and the c++ code to reproduce the error:
> 
> ** Import File **
> ardea -d /tmp/data -t ~/Desktop/test.csv -m a:i,b:t,c:k
> 
> ** code to create indexes **
> 
> #include "ibis.h" // FastBit IBIS public header file
> #include <set>    // std::set
> #include <iostream>
> 
> int main() {
>   using namespace std;
>   string dir_name = "/tmp/data";
>   ibis::table * table = ibis::table::create(dir_name.c_str());
>   string col[] = {"a", "b", "c"};
>   string option[] = {"<binning none/><encoding equality/>", "<binning
> none/><encoding equality/>", "<binning none/><encoding equality/>"};
>   int count = 3;
>   ibis::gVerbose = 10000;
>   for (int i = 0; i < count; ++i) {
>     cout << "Building: " << col[i].c_str() << " : " <<
> option[i].c_str() << endl;
>     table->buildIndex(col[i].c_str(), option[i].c_str());
>   }
>   cout << "done" << endl;
> }
> 
> **Here is the verbose output of filemanager part**
> 
> FastBit ibis1.3.2.6
> Log messages started on Wed Oct 17 11:35:00 2012
> .
> .
> .
> fileManager::clear -- starting ...
> --- Wed Oct 17 11:34:14 2012
> The number of memory mapped files is 0. (max = 192)
> Size of all mapped files is 0
> 
> The number of files read into memory is 1
> file name: /tmp/data/a
> storage @ 0x109a01b70, 0x109a01bc0, 1st 32 bits = 6ea6d67e
> mapped          nopened at       Wed Oct 17 11:34:14 2012last used at
>    Wed Oct 17 11:34:14 2012
> # of bytes      4# of past acc   1# of active acc 0
> 
> The total size of all files read into memory is 4
> Size of all named storages is 4
> Size of all unnamed storages is 144
> The total size of all named and unnamed storages is 148
> The prescribed maximum size is 4,294,967,296
> Number of pages accessed (recorded so far) is 2 (page size = 8192)
> 
> 
> util::mutexLock -- acquiring lock (0x10947be80) for fileManager::clear
> fileManager invoking registered external cleaners ...
> column[data.c]::softWriteLock -- pthread_rwlock_trywrlock(0x109a014a0)
> for unloadIndex
> Segmentation fault: 11
> 
> 
> _______________________________________________
> FastBit-users mailing list
> [email protected]
> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to