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

[R] `arrow::write_*` causes R session hard abort on Mac OSX Monterey

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • Mac OSX Monterey 12.2.1
      Chip: Apple M1 Pro

    Description

      The Reprex is super simple.

       

      arrow::write_feather(data.frame(1:2), compression = "uncompressed") 

       

       

      This causes R to hard abort with the "Start a new session" prompt

      <details>
      <summary>Sys.info</summary>
      ```
      sysname  "Darwin"

      release  "21.3.0"

      version  "Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T6000"     

      nodename     "MacBook-Pro.local"                                                                                                machine   "x86_64" 

      login "root" 

      </details>

      <details>
      <summary>sessionInfo</summary>

       

      R version 4.1.2 (2021-11-01) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.2.1 Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats     graphics  grDevices datasets  utils     methods   base      loaded via a namespace (and not attached):   [1] fs_1.5.2                 usethis_2.1.5            bit64_4.0.5                [4] lubridate_1.8.0          devtools_2.4.3           httr_1.4.2                 [7] rprojroot_2.0.2          tools_4.1.2              bslib_0.3.1               [10] utf8_1.2.2               R6_2.5.1                 DT_0.21                   [13] DBI_1.1.2                lazyeval_0.2.2           colorspace_2.0-3          [16] withr_2.5.0              tidyselect_1.1.2         prettyunits_1.1.1         [19] processx_3.5.2           bit_4.0.4                curl_4.3.2                [22] compiler_4.1.2           cli_3.2.0                xml2_1.3.3                [25] desc_1.4.0               plotly_4.9.4.1           sass_0.4.0                [28] scales_1.1.1             bs4Dash_2.0.3            arrow_7.0.0               [31] callr_3.7.0              stringr_1.4.0            digest_0.6.29             [34] shinydashboardPlus_2.0.3 rmarkdown_2.11           pkgconfig_2.0.3           [37] htmltools_0.5.2          sessioninfo_1.2.2        attempt_0.3.1             [40] highr_0.9                fastmap_1.1.0            htmlwidgets_1.5.4         [43] rlang_1.0.2              rstudioapi_0.13          shiny_1.7.1               [46] jquerylib_0.1.4          generics_0.1.2           jsonlite_1.8.0            [49] dplyr_1.0.8              zip_2.2.0                config_0.3.1              [52] magrittr_2.0.2           Rcpp_1.0.8               munsell_0.5.0             [55] fansi_1.0.2              clipr_0.8.0              shinycssloaders_1.0.0     [58] lifecycle_1.0.1          stringi_1.7.6            yaml_2.3.5                [61] snakecase_0.11.0         brio_1.1.3               pkgbuild_1.3.1            [64] grid_4.1.2               promises_1.2.0.1         shinydashboard_0.7.2      [67] crayon_1.5.0             knitr_1.37               ps_1.6.0                  [70] pillar_1.7.0             pkgload_1.2.4            reprex_2.0.1              [73] glue_1.6.2               evaluate_0.15            golem_0.3.1               [76] data.table_1.14.2        remotes_2.4.2            renv_0.15.2               [79] vctrs_0.3.8              httpuv_1.6.5             testthat_3.1.2            [82] gtable_0.3.0             purrr_0.3.4              tidyr_1.2.0               [85] assertthat_0.2.1         cachem_1.0.6             ggplot2_3.3.5             [88] xfun_0.29                mime_0.12                xtable_1.8-4              [91] roxygen2_7.1.2           UU_0.0.0.9003            later_1.3.0               [94] googledrive_2.0.0        viridisLite_0.4.0        gargle_1.2.0              [97] dockerfiler_0.1.4        tibble_3.1.6             memoise_2.0.1            [100] shinyWidgets_0.6.3       ellipsis_0.3.2   

      </details>
      <details>
      <summary>Extended STDOUT from the {reprex} package</summary>
      This reprex appears to crash R.
      See standard output and standard error for more details.

       

            1. Standard output and error

       

      x Install the styler package in order to use `style = TRUE`.
       *** caught illegal operation ***
      address 0x114c7b741, cause 'illegal opcode'
      Traceback:
       1: Table__from_dots(dots, schema, option_use_threads())
       2: Table$create
       3: arrow::write_feather(data.frame(1:2), compression = "uncompressed")
       4: eval(expr, envir, enclos)
       5: eval(expr, envir, enclos)
       6: eval_with_user_handlers(expr, envir, enclos, user_handlers)
       7: withVisible(eval_with_user_handlers(expr, envir, enclos, user_handlers))
       8: withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)
       9: doTryCatch(return(expr), name, parentenv, handler)
      10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
      11: tryCatchList(expr, classes, parentenv, handlers)
      12: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call))
      {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }
         else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages")))
      {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }
         invisible(structure(msg, class = "try-error", condition = e))})
      13: try(f, silent = TRUE)
      14: handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler))
      15: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval_with_user_handlers(expr,     envir, enclos, user_handlers)), warning = wHandler, error = eHandler,     message = mHandler)))
      16: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos,     debug = debug, last = i == length(out), use_try = stop_on_error !=         2L, keep_warning = keep_warning, keep_message = keep_message,     output_handler = output_handler, include_timing = include_timing)
      17: evaluate::evaluate(...)
      18: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning),     keep_message = !isFALSE(options$message), stop_on_error = if (is.numeric(options$error)) options$error else
      {        if (options$error && options$include)             0L        else 2L    }
      , output_handler = knit_handlers(options$render, options))
      19: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE,     keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message),     stop_on_error = if (is.numeric(options$error)) options$error else {        if (options$error && options$include)             0L        else 2L    }
      , output_handler = knit_handlers(options$render, options)))
      20: eng_r(options)
      21: block_exec(params)
      22: call_block
      23: process_group.block(group)
      24: process_group(group)
      25: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group),     error = function(e)
      {        setwd(wd)        cat(res, sep = "\n", file = output %n% "")        message("Quitting from lines ", paste(current_lines(i),             collapse = "-"), " (", knit_concord$get("infile"),             ") ")    }
      )
      26: process_file(text, output)
      27: knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)
      28: rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8")
      29: (function (input)
      {    rmarkdown::render(input, quiet = TRUE, envir = globalenv(),         encoding = "UTF-8")}
      )(input = base::quote("bonny-fox_reprex.R"))
      30: (function (what, args, quote = FALSE, envir = parent.frame())
      {    if (!is.list(args))         stop("second argument must be a list")    if (quote)         args <- lapply(args, enquote)    .Internal(do.call(what, args, envir))}
      )(base::quote(function (input)
      {    rmarkdown::render(input, quiet = TRUE, envir = globalenv(),         encoding = "UTF-8")}
      ), base::quote(list(input = "bonny-fox_reprex.R")), envir = base::quote(<environment>),     quote = base::quote(TRUE))
      31: do.call(do.call, c(readRDS("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-fun-120e5fef59ef"),     list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE)
      32: saveRDS(do.call(do.call, c(readRDS("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-fun-120e5fef59ef"),     list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE), file = "/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d")
      33: withCallingHandlers(
      {    NULL    saveRDS(do.call(do.call, c(readRDS("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-fun-120e5fef59ef"),         list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         quote = TRUE), file = "/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d")    flush(stdout())    flush(stderr())    NULL    invisible()}
      , error = function(e) {    {        callr_data <- as.environment("tools:callr")$`{}callr_data{}`        err <- callr_data$err        assign(".Traceback", .traceback(4), envir = callr_data)        dump.frames("{}callr_dump{}")        assign(".Last.dump", .GlobalEnv$`{}callr_dump{}`, envir = callr_data)        rm("{}callr_dump{}", envir = .GlobalEnv)        e$call <- deparse(conditionCall(e), nlines = 6)        e2 <- err$new_error(conditionMessage(e), call. = conditionCall(e))        class(e2) <- c("callr_remote_error", class(e2))        e2$error <- e        calls <- sys.calls()        dcframe <- which(vapply(calls, function length >=             1 && identical(x[[1]], quote(do.call)), logical(1)))[1]        if (!is.na(dcframe))             e2$`ignore` <- list(c(1, dcframe + 1L))        e2$`_pid` <- Sys.getpid()        e2$`_timestamp` <- Sys.time()        if (inherits(e, "rlib_error_2_0"))             e2$parent <- e$parent        e2 <- err$add_trace_back(e2, embed = FALSE)        saveRDS(list("error", e2), file = paste0("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d",             ".error"))    }}, interrupt = function(e) {    {        callr_data <- as.environment("tools:callr")$`callr_data`        err <- callr_data$err        assign(".Traceback", .traceback(4), envir = callr_data)        dump.frames("callr_dump")        assign(".Last.dump", .GlobalEnv$`callr_dump`, envir = callr_data)        rm("callr_dump_", envir = .GlobalEnv)        e$call <- deparse(conditionCall(e), nlines = 6)        e2 <- err$new_error(conditionMessage(e), call. = conditionCall(e))        class(e2) <- c("callr_remote_error", class(e2))        e2$error <- e        calls <- sys.calls()        dcframe <- which(vapply(calls, function length >=             1 && identical(x[[1]], quote(do.call)), logical(1)))[1]        if (!is.na(dcframe))             e2$`_ignore` <- list(c(1, dcframe + 1L))        e2$`_pid` <- Sys.getpid()        e2$`_timestamp` <- Sys.time()        if (inherits(e, "rlib_error_2_0"))             e2$parent <- e$parent        e2 <- err$add_trace_back(e2, embed = FALSE)        saveRDS(list("error", e2), file = paste0("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d",             ".error"))    }}, callr_message = function(e) {    try(signalCondition(e))})
      34: doTryCatch(return(expr), name, parentenv, handler)
      35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
      36: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
      37: doTryCatch(return(expr), name, parentenv, handler)
      38: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
      39: tryCatchList(expr, classes, parentenv, handlers)
      40: tryCatch(withCallingHandlers({    NULL    saveRDS(do.call(do.call, c(readRDS("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-fun-120e5fef59ef"),         list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         quote = TRUE), file = "/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d")    flush(stdout())    flush(stderr())    NULL    invisible()}
      , error = function(e) {    {        callr_data <- as.environment("tools:callr")$`{}callr_data{}`        err <- callr_data$err        assign(".Traceback", .traceback(4), envir = callr_data)        dump.frames("{}callr_dump{}")        assign(".Last.dump", .GlobalEnv$`{}callr_dump{}`, envir = callr_data)        rm("{}callr_dump{}", envir = .GlobalEnv)        e$call <- deparse(conditionCall(e), nlines = 6)        e2 <- err$new_error(conditionMessage(e), call. = conditionCall(e))        class(e2) <- c("callr_remote_error", class(e2))        e2$error <- e        calls <- sys.calls()        dcframe <- which(vapply(calls, function length >=             1 && identical(x[[1]], quote(do.call)), logical(1)))[1]        if (!is.na(dcframe))             e2$`ignore` <- list(c(1, dcframe + 1L))        e2$`_pid` <- Sys.getpid()        e2$`_timestamp` <- Sys.time()        if (inherits(e, "rlib_error_2_0"))             e2$parent <- e$parent        e2 <- err$add_trace_back(e2, embed = FALSE)        saveRDS(list("error", e2), file = paste0("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d",             ".error"))    }}, interrupt = function(e) {    {        callr_data <- as.environment("tools:callr")$`callr_data`        err <- callr_data$err        assign(".Traceback", .traceback(4), envir = callr_data)        dump.frames("callr_dump")        assign(".Last.dump", .GlobalEnv$`callr_dump`, envir = callr_data)        rm("callr_dump_", envir = .GlobalEnv)        e$call <- deparse(conditionCall(e), nlines = 6)        e2 <- err$new_error(conditionMessage(e), call. = conditionCall(e))        class(e2) <- c("callr_remote_error", class(e2))        e2$error <- e        calls <- sys.calls()        dcframe <- which(vapply(calls, function length >=             1 && identical(x[[1]], quote(do.call)), logical(1)))[1]        if (!is.na(dcframe))             e2$`_ignore` <- list(c(1, dcframe + 1L))        e2$`_pid` <- Sys.getpid()        e2$`_timestamp` <- Sys.time()        if (inherits(e, "rlib_error_2_0"))             e2$parent <- e$parent        e2 <- err$add_trace_back(e2, embed = FALSE)        saveRDS(list("error", e2), file = paste0("/var/folders/s8/yv0hmbdj5pq2g88v8qs7v82c0000gn/T//RtmphMqH7S/callr-res-120e5af98b1d",             ".error"))    }}, callr_message = function(e)
      {    try(signalCondition(e))}
      ), error = function(e)
      {    NULL    try(stop(e))}
      , interrupt = function(e)
      {    NULL    e}
      )
      An irrecoverable exception occurred. R is aborting now ... 

      </details>

      Attachments

        Activity

          People

            Unassigned Unassigned
            yogat3ch Stephen Holsenbeck
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: