Exception: An error was encountered while running DADA2 in R (return code -11), please inspect stdout and stderr to learn more.

Hi, I’m running this lines on qiime2:

nohup qiime dada2 denoise-paired --i-demultiplexed-seqs …/0.importing/paired-end-demux.qza --p-trim-left-f 0 --p-trim-left-r 0 --p-trunc-len-f 235 --p-trunc-len-r 201 --o-representative-sequences rep-seqs.qza --o-denoising-stats denoising-stats.qza --o-table table.qza --p-n-threads 10 &

And I heve been getting the following error:

Exception: An error was encountered while running DADA2 in R (return code -11), please inspect stdout and stderr to learn more.

here is the nohup.out contents:

R version 3.5.1 (2018-07-02)
Loading required package: Rcpp
DADA2: 1.10.0 / Rcpp: 1.0.4.6 / RcppParallel: 5.0.1

  1. Filtering …
  2. Learning Error Rates
    247164775 total bases in 1051765 reads from 5 samples will be used for learning the error rates.
    211404765 total bases in 1051765 reads from 5 samples will be used for learning the error rates.

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“OATCH”]], opts[[“OMEGATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“MMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“HOMOPAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“SSE”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“MINfleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …
Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“KATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“USE_KSIZE”]], opts[[“KMEGA_A”]], opts[["OMEGA_PS]], opts[[“MIN_A_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“VEC_FOLD”]], opts[[“MIN_HAMMING”]], opts[[“MAX_CLUST”]],
Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“BATCH”]], opts[[“OMEGA_AH”]], opts[[“GAP_PENALTY”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“MIN_ABUNDAN_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“VSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“MIEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“MIN_ABUNDAN_GAP_PENALTY”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …
} else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“MIN_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“KDI_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“MIN_FMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“HOMGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“GREEDOLD”]], opts[[“MIN_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

*** caught segfault ***
address 0xfffffffffffffff7, cause ‘memory not mapped’

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“MIN_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …

Traceback:
1: dada_uniques(names(derep[[i]]$uniques), unname(derep[[i]]$uniques), names(derep[[i]]$uniques) %in% c(priors, pseudo_priors), err, qi, opts[[“MATCH”]], opts[[“MISMATCH”]], opts[[“GAP_PENALTY”]], opts[[“USE_KMERS”]], opts[[“KDIST_CUTOFF”]], opts[[“BAND_SIZE”]], opts[[“OMEGA_A”]], opts[[“OMEGA_P”]], opts[[“OMEGA_C”]], if (initializeErr) { 1 } else { opts[[“MAX_CLUST”]] }, opts[[“MIN_FOLD”]], opts[[“MIN_HAMMING”]], opts[[“MIN_ABUNDANCE”]], TRUE, FALSE, opts[[“VECTORIZED_ALIGNMENT”]], opts[[“HOMOPOLYMER_GAP_PENALTY”]], multithread, (verbose >= 2), opts[[“SSE”]], opts[[“GAPLESS”]], opts[[“GREEDY”]])
2: dada(drps, err = NULL, errorEstimationFunction = errorEstimationFunction, selfConsist = TRUE, multithread = multithread, verbose = verbose, MAX_CONSIST = MAX_CONSIST, OMEGA_C = OMEGA_C, …)
3: learnErrors(filtsR, nreads = nreads.learn, multithread = multithread)
4: withCallingHandlers(expr, warning = function(w) invokeRestart(“muffleWarning”))
5: suppressWarnings(learnErrors(filtsR, nreads = nreads.learn, multithread = multithread))
An irrecoverable exception occurred. R is aborting now …
Running external command line application(s). This may print messages to stdout and/or stderr.
The command(s) being run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: run_dada_paired.R /bigdata/yuanting/tmp/tmpllajtvlv/forward /tmp/tmpllajtvlv/reverse /tmp/tmpllajtvlv/output.tsv.biom /bigdata/yuanting/tmp/tmpllajtvlv/track.tsv /tmp/tmpllajtvlv/filt_f /bigdata/yuanting/tmp/tmpllajtvlv/filt_r 235 201 0 0 2.0 2.0 2 consensus 1.0 10 1000000

Traceback (most recent call last):
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 257, in denoise_paired
run_commands([cmd])
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 36, in run_commands
subprocess.run(cmd, check=True)
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/subprocess.py”, line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command ‘[‘run_dada_paired.R’, ‘/tmp/tmpllajtvlv/forward’, ‘/tmp/tmpllajtvlv/reverse’, ‘/bigdata/yuanting/tmp/tmpllajtvlv/output.tsv.biom’, ‘/tmp/tmpllajtvlv/track.tsv’, ‘/bigdata/yuanting/tmp/tmpllajtvlv/filt_f’, ‘/tmp/tmpllajtvlv/filt_r’, ‘235’, ‘201’, ‘0’, ‘0’, ‘2.0’, ‘2.0’, ‘2’, ‘consensus’, ‘1.0’, ‘10’, ‘1000000’]’ died with <Signals.SIGSEGV: 11>.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-455>”, line 2, in denoise_paired
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 245, in bound_callable
output_types, provenance)
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 390, in callable_executor
output_views = self._callable(**view_args)
File “/Anaconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_dada2/_denoise.py”, line 272, in denoise_paired
" and stderr to learn more." % e.returncode)
Exception: An error was encountered while running DADA2 in R (return code -11), please inspect stdout and stderr to learn more.

I’ve try this code before and it worked. Now i just change the sample-id and the --p-trunc-len-f /r and it didnot work anymore. So depressed now, could anyone give me your kindest hand?
Thanks in advance!

i don’t know whether anyone will see this topic. But I found the solution and i wish to give you a hand if you happen to be trapped in the same trouble with me.
The problem i think is that the server’s memory cannot support my command. It only has 64 threads and many people use it at the same time. So i used another server, which has 160 threads, and change the --p-n-thread 10 to --p-n-thread 30.and it finally worked.
Wish you all the best.

2 Likes

Welcome to the forum, @Ting_Yuan! :wave:

Thanks so much for sharing your solution with us. I’m sure others will appreciate it if they encounter the same problem.

Cheers,
Andrew

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.