rworkflows icon indicating copy to clipboard operation
rworkflows copied to clipboard

`Segmentation fault (core dumped)`

Open bschilder opened this issue 3 years ago • 4 comments

This seems to be happening on Linux (and maybe Windows?) but not Mac on GHA VMs. Unclear why, but it might have something to do with system dependencies, though not sure for which R packages. Perhaps data.table or XML?

  • https://github.com/Rdatatable/data.table/issues/3369
  • https://support.bioconductor.org/p/75920/

https://github.com/RajLabMSSM/echogithub/actions/runs/3657949232/jobs/6182121292#step:5:2121

Traceback:
 1: `[.data.table`(dt, , `:=`((cols), lapply(.SD, unlist)), .SDcols = cols)
 2: dt[, `:=`((cols), lapply(.SD, unlist)), .SDcols = cols]
 3: unlist_dt(dt = dt, exclude = "size", verbose = FALSE)
 4: github_files(owner = owner, repo = repo, query = query, branch = branch,     token = token, verbose = verbose)
 5: github_pages_files(owner = "RajLabMSSM", repo = "Fine_Mapping",     branch = "master")
 6: eval(code, test_env)
 7: eval(code, test_env)
 8: 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)
 9: doTryCatch(return(expr), name, parentenv, handler)
10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
12: doTryCatch(return(expr), name, parentenv, handler)
13: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
14: tryCatchList(expr, classes, parentenv, handlers)
15: 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) {    })
16: test_code(desc, code, env = parent.frame(), reporter = reporter)
17: test_that("github_pages_files works", {    dt <- github_pages_files(owner = "RajLabMSSM", repo = "echolocatoR")    testthat::expect_gte(nrow(dt), 20)    links_df <- github_pages_files(owner = "RajLabMSSM", repo = "Fine_Mapping",         branch = "master")    testthat::expect_gte(nrow(links_df), 220)})
18: eval(code, test_env)
19: eval(code, test_env)
20: 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)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
24: doTryCatch(return(expr), name, parentenv, handler)
25: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
26: tryCatchList(expr, classes, parentenv, handlers)
27: 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) {    })
28: test_code(NULL, exprs, env)
29: source_file(path, child_env(env), wrap = wrap)
30: FUN(X[[i]], ...)
31: lapply(test_paths, test_one_file, env = env, wrap = wrap)
32: doTryCatch(return(expr), name, parentenv, handler)
33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
34: tryCatchList(expr, classes, parentenv, handlers)
35: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL})
36: with_reporter(reporters$multi, lapply(test_paths, test_one_file,     env = env, wrap = wrap))
37: test_files_serial(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)
38: 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)
39: test_dir("testthat", package = package, reporter = reporter,     ..., load_package = "installed")
40: test_check(pkg)
An irrecoverable exception occurred. R is aborting now ...
Segmentation fault (core dumped)

bschilder avatar Dec 09 '22 14:12 bschilder

By chance, is this something you've come across before, @lcolladotor ?

bschilder avatar Dec 14 '22 23:12 bschilder

I have not seen this before.

Hmm, this is likely unrelated. But maybe setting the number of threads (I think it's setDTthreads() ) to 1 will help. data.table has a tendency to use all the cores it detects.

lcolladotor avatar Dec 23 '22 02:12 lcolladotor

I have not seen this before.

Hmm, this is likely unrelated. But maybe setting the number of threads (I think it's setDTthreads() ) to 1 will help. data.table has a tendency to use all the cores it detects.

Cool, I'll give that a try, thanks!

bschilder avatar Dec 23 '22 18:12 bschilder

Just a note, adding data.table::setDTthreads(threads = 1) to the zzz.R file didn't seem to help in this situation. https://github.com/RajLabMSSM/echogithub/blob/c21ab7343973828bd9c4d398e18c8182d7ad1733/R/zzz.R So I think the source of the issue might be something else.

bschilder avatar Mar 14 '23 18:03 bschilder