Skip to content

Instantly share code, notes, and snippets.

@LTLA
Last active May 16, 2021 01:02
Show Gist options
  • Save LTLA/47c0a1abb9efb6979d003b98bb5830a0 to your computer and use it in GitHub Desktop.
Save LTLA/47c0a1abb9efb6979d003b98bb5830a0 to your computer and use it in GitHub Desktop.
TileDB segfault script (mac only)
library(tiledb)
dim <- c(500L, 200L)
context <- tiledb_ctx()
collected <- vector("list", length(dim))
for (i in seq_along(dim)) {
collected[[i]] <- tiledb_dim(ctx=context, paste0("d", i), c(1L, dim[i]), tile=100L, type="INT32")
}
dom <- tiledb_domain(ctx=context, dims=collected)
val <- r_to_tiledb_type(numeric(0))
schema <- tiledb_array_schema(ctx=context, dom,
sparse=FALSE,
attrs=list(tiledb_attr(ctx=context, "x", type=val)))
path <- tempfile()
tiledb_array_create(path, schema)
obj <- tiledb_array(path, attrs="x", query_type="WRITE")
obj[1:500, 1:200] <- matrix(runif(100000), 500, 200)
@LTLA
Copy link
Author

LTLA commented May 16, 2021

==11084== Memcheck, a memory error detector
==11084== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==11084== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==11084== Command: /home/luna/Software/R/trunk/bin/exec/R -f blah.R --restore --save --no-readline
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x7167DB7: __wcsnlen_avx2 (strlen-avx2.S:264)
==11084==    by 0x7095CA1: wcsrtombs (wcsrtombs.c:104)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x37A2AA: wcstombs (stdlib.h:154)
==11084==    by 0x37A2AA: tre_parse_bracket_items (tre-parse.c:336)
==11084==    by 0x37A2AA: tre_parse_bracket (tre-parse.c:453)
==11084==    by 0x37A2AA: tre_parse (tre-parse.c:1388)
==11084==    by 0x371B88: tre_compile (tre-compile.c:1920)
==11084==    by 0x36F2D0: tre_regcompb (regcomp.c:150)
==11084==    by 0x26A5E6: do_gsub (grep.c:2061)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x247AFE: Rf_eval (eval.c:850)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF4E8: internal_utf8_loop (loop.c:298)
==11084==    by 0x6FFF4E8: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x37A2AA: wcstombs (stdlib.h:154)
==11084==    by 0x37A2AA: tre_parse_bracket_items (tre-parse.c:336)
==11084==    by 0x37A2AA: tre_parse_bracket (tre-parse.c:453)
==11084==    by 0x37A2AA: tre_parse (tre-parse.c:1388)
==11084==    by 0x371B88: tre_compile (tre-compile.c:1920)
==11084==    by 0x36F2D0: tre_regcompb (regcomp.c:150)
==11084==    by 0x26A5E6: do_gsub (grep.c:2061)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x247AFE: Rf_eval (eval.c:850)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF4F1: internal_utf8_loop (loop.c:303)
==11084==    by 0x6FFF4F1: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x37A2AA: wcstombs (stdlib.h:154)
==11084==    by 0x37A2AA: tre_parse_bracket_items (tre-parse.c:336)
==11084==    by 0x37A2AA: tre_parse_bracket (tre-parse.c:453)
==11084==    by 0x37A2AA: tre_parse (tre-parse.c:1388)
==11084==    by 0x371B88: tre_compile (tre-compile.c:1920)
==11084==    by 0x36F2D0: tre_regcompb (regcomp.c:150)
==11084==    by 0x26A5E6: do_gsub (grep.c:2061)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x247AFE: Rf_eval (eval.c:850)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF538: internal_utf8_loop (loop.c:298)
==11084==    by 0x6FFF538: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x37A2AA: wcstombs (stdlib.h:154)
==11084==    by 0x37A2AA: tre_parse_bracket_items (tre-parse.c:336)
==11084==    by 0x37A2AA: tre_parse_bracket (tre-parse.c:453)
==11084==    by 0x37A2AA: tre_parse (tre-parse.c:1388)
==11084==    by 0x371B88: tre_compile (tre-compile.c:1920)
==11084==    by 0x36F2D0: tre_regcompb (regcomp.c:150)
==11084==    by 0x26A5E6: do_gsub (grep.c:2061)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x247AFE: Rf_eval (eval.c:850)
==11084== 

R Under development (unstable) (2021-01-24 r79876) -- "Unsuffered Consequences"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[Previously saved workspace restored]

> library(tiledb)
> dim <- c(500L, 200L)
> context <- tiledb_ctx()
> 
> collected <- vector("list", length(dim))
> for (i in seq_along(dim)) {
+     collected[[i]] <- tiledb_dim(ctx=context, paste0("d", i), c(1L, dim[i]), tile=100L, type="INT32")
+ }
> dom <- tiledb_domain(ctx=context, dims=collected)
> 
> val <- r_to_tiledb_type(numeric(0))
> schema <- tiledb_array_schema(ctx=context, dom,
+     sparse=FALSE,
+     attrs=list(tiledb_attr(ctx=context, "x", type=val)))
> 
> path <- tempfile()
> tiledb_array_create(path, schema)
[1] "/tmp/Rtmpltrn6Z/file2b4c1201810b"
> 
> obj <- tiledb_array(path, attrs="x", query_type="WRITE")
> obj[1:500, 1:200] <- matrix(runif(100000), 500, 200)
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x7167C2C: __wcsnlen_avx2 (strlen-avx2.S:106)
==11084==    by 0x7095CA1: wcsrtombs (wcsrtombs.c:104)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x1BEDA8: wcstombs (stdlib.h:154)
==11084==    by 0x1BEDA8: do_makenames (character.c:979)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF4E8: internal_utf8_loop (loop.c:298)
==11084==    by 0x6FFF4E8: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x1BEDA8: wcstombs (stdlib.h:154)
==11084==    by 0x1BEDA8: do_makenames (character.c:979)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF4F1: internal_utf8_loop (loop.c:303)
==11084==    by 0x6FFF4F1: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x1BEDA8: wcstombs (stdlib.h:154)
==11084==    by 0x1BEDA8: do_makenames (character.c:979)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084== 
==11084== Conditional jump or move depends on uninitialised value(s)
==11084==    at 0x6FFF538: internal_utf8_loop (loop.c:298)
==11084==    by 0x6FFF538: __gconv_transform_internal_utf8 (skeleton.c:609)
==11084==    by 0x7095CD4: wcsrtombs (wcsrtombs.c:110)
==11084==    by 0x701BC40: wcstombs (wcstombs.c:34)
==11084==    by 0x1BEDA8: wcstombs (stdlib.h:154)
==11084==    by 0x1BEDA8: do_makenames (character.c:979)
==11084==    by 0x23B88C: bcEval (eval.c:7115)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084== 
==11084== Invalid read of size 8
==11084==    at 0x4C387E0: memmove (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11084==    by 0x1219CB51: tiledb::sm::ChunkedBuffer::write(void const*, unsigned long, unsigned long) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x1219F6E2: tiledb::sm::Tile::write(tiledb::sm::ConstBuffer*, unsigned long) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120DBF9E: tiledb::sm::Writer::prepare_tiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >*) const (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120DC358: std::_Function_handler<tiledb::common::Status (unsigned long, unsigned long), std::vector<tiledb::common::Status, std::allocator<tiledb::common::Status> > tiledb::sm::parallel_for<tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const::{lambda()#1}::operator()() const::{lambda(unsigned long)#1}>(tiledb::common::ThreadPool*, unsigned long, unsigned long, tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const::{lambda()#1}::operator()() const::{lambda(unsigned long)#1} const&)::{lambda(unsigned long, unsigned long)#1}>::_M_invoke(std::_Any_data const&, unsigned long&&, std::_Any_data) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11FF27E4: std::_Function_handler<tiledb::common::Status (), std::_Bind<std::function<tiledb::common::Status (unsigned long, unsigned long)> (unsigned long, unsigned long)> >::_M_invoke(std::_Any_data const&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F10F99: tiledb::common::ThreadPool::exec_packaged_task(std::shared_ptr<tiledb::common::ThreadPool::PackagedTask>) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F120FD: tiledb::common::ThreadPool::wait_or_work(tiledb::common::ThreadPool::Task&&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F12B9C: tiledb::common::ThreadPool::wait_all_status(std::vector<tiledb::common::ThreadPool::Task, std::allocator<tiledb::common::ThreadPool::Task> >&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F12DD4: tiledb::common::ThreadPool::wait_all(std::vector<tiledb::common::ThreadPool::Task, std::allocator<tiledb::common::ThreadPool::Task> >&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120D505E: tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120E9B54: tiledb::common::Status tiledb::sm::Writer::ordered_write<int>() (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==  Address 0x1f716990 is 0 bytes after a block of size 400,000 alloc'd
==11084==    at 0x4C3217F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11084==    by 0x11BDEAD6: allocate (new_allocator.h:111)
==11084==    by 0x11BDEAD6: allocate (alloc_traits.h:436)
==11084==    by 0x11BDEAD6: _M_allocate (stl_vector.h:172)
==11084==    by 0x11BDEAD6: std::vector<signed char, std::allocator<signed char> >::_M_default_append(unsigned long) (vector.tcc:571)
==11084==    by 0x11BC683A: resize (stl_vector.h:692)
==11084==    by 0x11BC683A: libtiledb_query_buffer_alloc_ptr(Rcpp::XPtr<tiledb::Array, Rcpp::PreserveStorage, &(void Rcpp::standard_delete_finalizer<tiledb::Array>(tiledb::Array*)), false>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long, bool) (libtiledb.cpp:2542)
==11084==    by 0x11B992F6: _tiledb_libtiledb_query_buffer_alloc_ptr (RcppExports.cpp:1663)
==11084==    by 0x1FE3C3: R_doDotCall (dotcode.c:607)
==11084==    by 0x23DBEA: bcEval (eval.c:7671)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084== 
==11084== Invalid read of size 8
==11084==    at 0x4C387EE: memmove (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11084==    by 0x1219CB51: tiledb::sm::ChunkedBuffer::write(void const*, unsigned long, unsigned long) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x1219F6E2: tiledb::sm::Tile::write(tiledb::sm::ConstBuffer*, unsigned long) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120DBF9E: tiledb::sm::Writer::prepare_tiles(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >*) const (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120DC358: std::_Function_handler<tiledb::common::Status (unsigned long, unsigned long), std::vector<tiledb::common::Status, std::allocator<tiledb::common::Status> > tiledb::sm::parallel_for<tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const::{lambda()#1}::operator()() const::{lambda(unsigned long)#1}>(tiledb::common::ThreadPool*, unsigned long, unsigned long, tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const::{lambda()#1}::operator()() const::{lambda(unsigned long)#1} const&)::{lambda(unsigned long, unsigned long)#1}>::_M_invoke(std::_Any_data const&, unsigned long&&, std::_Any_data) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11FF27E4: std::_Function_handler<tiledb::common::Status (), std::_Bind<std::function<tiledb::common::Status (unsigned long, unsigned long)> (unsigned long, unsigned long)> >::_M_invoke(std::_Any_data const&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F10F99: tiledb::common::ThreadPool::exec_packaged_task(std::shared_ptr<tiledb::common::ThreadPool::PackagedTask>) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F120FD: tiledb::common::ThreadPool::wait_or_work(tiledb::common::ThreadPool::Task&&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F12B9C: tiledb::common::ThreadPool::wait_all_status(std::vector<tiledb::common::ThreadPool::Task, std::allocator<tiledb::common::ThreadPool::Task> >&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x11F12DD4: tiledb::common::ThreadPool::wait_all(std::vector<tiledb::common::ThreadPool::Task, std::allocator<tiledb::common::ThreadPool::Task> >&) (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120D505E: tiledb::sm::Writer::prepare_and_filter_attr_tiles(std::vector<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> >, std::allocator<std::vector<tiledb::sm::Writer::WriteCellRange, std::allocator<tiledb::sm::Writer::WriteCellRange> > > > const&, std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> >, std::hash<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<tiledb::sm::Tile, std::allocator<tiledb::sm::Tile> > > > >*) const (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==    by 0x120E9B54: tiledb::common::Status tiledb::sm::Writer::ordered_write<int>() (in /home/luna/Software/R/trunk/library/tiledb/tiledb/lib/libtiledb.so.2.2)
==11084==  Address 0x1f7169a0 is 16 bytes after a block of size 400,000 alloc'd
==11084==    at 0x4C3217F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11084==    by 0x11BDEAD6: allocate (new_allocator.h:111)
==11084==    by 0x11BDEAD6: allocate (alloc_traits.h:436)
==11084==    by 0x11BDEAD6: _M_allocate (stl_vector.h:172)
==11084==    by 0x11BDEAD6: std::vector<signed char, std::allocator<signed char> >::_M_default_append(unsigned long) (vector.tcc:571)
==11084==    by 0x11BC683A: resize (stl_vector.h:692)
==11084==    by 0x11BC683A: libtiledb_query_buffer_alloc_ptr(Rcpp::XPtr<tiledb::Array, Rcpp::PreserveStorage, &(void Rcpp::standard_delete_finalizer<tiledb::Array>(tiledb::Array*)), false>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long, bool) (libtiledb.cpp:2542)
==11084==    by 0x11B992F6: _tiledb_libtiledb_query_buffer_alloc_ptr (RcppExports.cpp:1663)
==11084==    by 0x1FE3C3: R_doDotCall (dotcode.c:607)
==11084==    by 0x23DBEA: bcEval (eval.c:7671)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084==    by 0x24A314: Rf_applyClosure (eval.c:1823)
==11084==    by 0x23F32B: bcEval (eval.c:7083)
==11084==    by 0x24796F: Rf_eval (eval.c:727)
==11084==    by 0x24960E: R_execClosure (eval.c:1897)
==11084== 
> 
> proc.time()
   user  system elapsed 
 16.953   0.171  16.606 
==11084== 
==11084== HEAP SUMMARY:
==11084==     in use at exit: 68,262,536 bytes in 15,727 blocks
==11084==   total heap usage: 66,394 allocs, 50,667 frees, 157,969,453 bytes allocated
==11084== 
==11084== LEAK SUMMARY:
==11084==    definitely lost: 0 bytes in 0 blocks
==11084==    indirectly lost: 0 bytes in 0 blocks
==11084==      possibly lost: 0 bytes in 0 blocks
==11084==    still reachable: 68,262,536 bytes in 15,727 blocks
==11084==                       of which reachable via heuristic:
==11084==                         newarray           : 4,264 bytes in 1 blocks
==11084==         suppressed: 0 bytes in 0 blocks
==11084== Rerun with --leak-check=full to see details of leaked memory
==11084== 
==11084== For counts of detected and suppressed errors, rerun with: -v
==11084== Use --track-origins=yes to see where uninitialised values come from
==11084== ERROR SUMMARY: 2514 errors from 10 contexts (suppressed: 0 from 0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment