stxxl::sort Error: double deallocation

2011-08-12
2013-04-25
  • Nobody/Anonymous

    Hello, i have a structure s_t with sizeof() = 224, and have stxxl::vector declaration:
    typedef stxxl::vector<s_t, 4, stxxl::lru_pager<2>, 7 * 4 * 1024 * 1024, STXXL_DEFAULT_ALLOC_STRATEGY> s_t_vec;
    and have simple code:

        stxxl::syscall_file ff("file", (stxxl::file::DIRECT | stxxl::file::RDWR | stxxl::file::CREAT), 0, 0);
        s_t_vec fv(&ff);
        stxxl::sort(fv.begin(), fv.end(), s_t_sorter(), 1024 * 1024 * 1024);

    when size of file is small (< 1024M), sorting work fine(stxxl uses memory sorting), but when size of "file" is big (3gb for example), sorting ended with exception:
    Error in DiskAllocator::check_corruption: Error: double deallocation of external memory, trying to deallocate region 58720256 + 29360128  in empty space

    but sometimes no exception but error output:
    WRITE request submitted for a BID with a pending READ request

    i have latest version from trunk, any idea how to resolve it? thx

     
  • Nobody/Anonymous

    rewrite sorting with stxxl::stream, but the problem remains,
    with optimization, (-O3 -DNDEBUG) i get exception:
    Error in DiskAllocator::check_corruption: Error: double deallocation of external memory, trying to deallocate region 0 + 67108864  in empty space
    but in debug(-g -DSTXXL_VERBOSE_LEVEL=3) i receive many messages in output:

    WRITE request submitted for a BID with a pending READ request

     
  • Andreas Beckmann

    Can't reproduce this here. What OS, architecture, kernel, compiler, versions, … do you use?
    Can you reproduce the problem with algo/sort_file.cpp (eventually modified to use your type, parameters, …) or provide a test program?
    How does your .stxxl look like?

    Andreas

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks