You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Nicola Crane (Jira)" <ji...@apache.org> on 2021/12/16 08:36:00 UTC

[jira] [Created] (ARROW-15128) [C++] segfault when writing CSV from RecordBatchReader

Nicola Crane created ARROW-15128:
------------------------------------

             Summary: [C++] segfault when writing CSV from RecordBatchReader
                 Key: ARROW-15128
                 URL: https://issues.apache.org/jira/browse/ARROW-15128
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Nicola Crane


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:

 
{code:r}
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)
{code}
 
{code:java}
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); }
{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)