Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15128

[C++] segfault when writing CSV from RecordBatchReader

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • C++
    • None

    Description

      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); }
      

      Attachments

        Issue Links

          Activity

            People

              ahadnagy Ákos Hadnagy
              thisisnic Nicola Crane
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Slack

                  Issue deployment