Skip to content

[C++] segfault when writing CSV from RecordBatchReader #30636

@asfimport

Description

@asfimport

I'm currently trying to implement functionality in R so that we can open a dataset and then write to a CSV file, but I'm getting a segfault when I run my tests:

 

tbl <- tibble::tibble(
  dbl = c(1:8, NA, 10) + .1,
  lgl = sample(c(TRUE, FALSE, NA), 10, replace = TRUE),
  false = logical(10),
  chr = letters[c(1:5, NA, 7:10)]
)

make_temp_dir <- function() {
  path <- tempfile()
  dir.create(path)
  normalizePath(path, winslash = "/")
}

data_dir <- make_temp_dir()
write_dataset(tbl, data_dir, partitioning = "lgl")
data_in <- open_dataset(data_dir)

csv_file <- tempfile()
tbl_out <- write_csv_arrow(data_in, csv_file)

 

Thread 1 "R" received signal SIGSEGV, Segmentation fault.
0x00007fffee51fdd7 in __gnu_cxx::__exchange_and_add (__mem=0xe9, __val=-1)
    at /usr/include/c++/9/ext/atomicity.h:49
49	  { return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL); }

Reporter: Nicola Crane / @thisisnic
Assignee: Ákos Hadnagy / @ahadnagy

Related issues:

Note: This issue was originally created as ARROW-15128. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions