[
https://issues.apache.org/jira/browse/ARROW-16201?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Keane resolved ARROW-16201.
------------------------------------
Fix Version/s: 8.0.0
Resolution: Fixed
Issue resolved by pull request 12887
[https://github.com/apache/arrow/pull/12887]
> [R] SafeCallIntoR on 3.4
> ------------------------
>
> Key: ARROW-16201
> URL: https://issues.apache.org/jira/browse/ARROW-16201
> Project: Apache Arrow
> Issue Type: Improvement
> Components: R
> Reporter: Jonathan Keane
> Assignee: Jonathan Keane
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 8.0.0
>
> Time Spent: 2h
> Remaining Estimate: 0h
>
> In the R versions test, we're seeing a segfault on 3.4:
> {code}
> Start test: SafeCallIntoR errors from the non-R thread
> *** caught segfault ***
> address 0x2b, cause 'memory not mapped'
> Traceback:
> 1: .Call(`_arrow_TestSafeCallIntoR`, r_fun_that_returns_a_string, opt)
> 2: TestSafeCallIntoR(function() "string one!", opt =
> "async_without_executor")
> 3: eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
> 4: withCallingHandlers(expr, condition = function(cnd) { if
> (!is.null(matched) || !matches(cnd)) { return() } if
> (can_entrace(cnd)) { cnd <- cnd_entrace(cnd) } matched <<- cnd
> if (inherits(cnd, "message") || inherits(cnd, "warning")) {
> cnd_muffle(cnd) } else if (inherits(cnd, "error") || inherits(cnd,
> "skip")) { return_from(tl, cnd) }})
> 5: .capture(act$val <- eval_bare(quo_get_expr(.quo), quo_get_env(.quo)),
> ...)
> 6: quasi_capture(enquo(object), label, capture_matching_condition,
> matches = matcher)
> 7: expect_condition_matching("error", { { object }}, regexp =
> regexp, class = class, ..., inherit = inherit, info = info, label = label)
> 8: expect_error(TestSafeCallIntoR(function() "string one!", opt =
> "async_without_executor"), "Call to R from a non-R thread")
> 9: eval(code, test_env)
> 10: eval(code, test_env)
> 11: withCallingHandlers({ eval(code, test_env) if (!handled &&
> !is.null(test)) { skip_empty() }}, expectation =
> handle_expectation, skip = handle_skip, warning = handle_warning, message
> = handle_message, error = handle_error)
> 12: doTryCatch(return(expr), name, parentenv, handler)
> 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 14: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
> 15: doTryCatch(return(expr), name, parentenv, handler)
> 16: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
> names[nh], parentenv, handlers[[nh]])
> 17: tryCatchList(expr, classes, parentenv, handlers)
> 18: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled &&
> !is.null(test)) { skip_empty() }}, expectation =
> handle_expectation, skip = handle_skip, warning = handle_warning, message
> = handle_message, error = handle_error), error = handle_fatal, skip =
> function(e) { })
> 19: test_code(desc, code, env = parent.frame(), reporter = reporter)
> 20: testthat::test_that(what, { skip_if(getOption("..skip.tests", TRUE),
> "arrow C++ library not available") code})
> 21: test_that("SafeCallIntoR errors from the non-R thread", {
> skip_on_cran() expect_error(TestSafeCallIntoR(function() "string one!",
> opt = "async_without_executor"), "Call to R from a non-R thread")
> expect_error(TestSafeCallIntoR(function() stop("an error!"), opt =
> "async_without_executor"), "Call to R from a non-R thread")})
> 22: eval(code, test_env)
> 23: eval(code, test_env)
> 24: withCallingHandlers({ eval(code, test_env) if (!handled &&
> !is.null(test)) { skip_empty() }}, expectation =
> handle_expectation, skip = handle_skip, warning = handle_warning, message
> = handle_message, error = handle_error)
> 25: doTryCatch(return(expr), name, parentenv, handler)
> 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
> 28: doTryCatch(return(expr), name, parentenv, handler)
> 29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
> names[nh], parentenv, handlers[[nh]])
> 30: tryCatchList(expr, classes, parentenv, handlers)
> 31: tryCatch(withCallingHandlers({ eval(code, test_env) if (!handled &&
> !is.null(test)) { skip_empty() }}, expectation =
> handle_expectation, skip = handle_skip, warning = handle_warning, message
> = handle_message, error = handle_error), error = handle_fatal, skip =
> function(e) { })
> 32: test_code(NULL, exprs, env)
> 33: source_file(path, child_env(env), wrap = wrap)
> 34: FUN(X[[i]], ...)
> 35: lapply(test_paths, test_one_file, env = env, wrap = wrap)
> 36: doTryCatch(return(expr), name, parentenv, handler)
> 37: tryCatchOne(expr, names, parentenv, handlers[[1L]])
> 38: tryCatchList(expr, classes, parentenv, handlers)
> 39: tryCatch(code, testthat_abort_reporter = function(cnd) {
> cat(conditionMessage(cnd), "\n") NULL})
> 40: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env
> = env, wrap = wrap))
> 41: test_files(test_dir = test_dir, test_package = test_package,
> test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
> env = env, stop_on_failure = stop_on_failure, stop_on_warning =
> stop_on_warning, wrap = wrap, load_package = load_package)
> 42: test_files(test_dir = path, test_paths = test_paths, test_package =
> package, reporter = reporter, load_helpers = load_helpers, env = env,
> stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
> wrap = wrap, load_package = load_package, parallel = parallel)
> 43: test_dir("testthat", package = package, reporter = reporter, ...,
> load_package = "installed")
> 44: test_check("arrow", reporter = arrow_reporter)
> An irrecoverable exception occurred. R is aborting now ...
> Segmentation fault (core dumped)
> {code}
> https://github.com/ursacomputing/crossbow/runs/6017815299?check_suite_focus=true
--
This message was sent by Atlassian Jira
(v8.20.1#820001)