question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Tree Building Failed

See original GitHub issue

Current Behavior

I have run nextstrain build ncov/ with no problems for a few iterations of the GISAID data. Today using the most up to date sequences, the code is failing with the following error:

ERROR: b'/bin/bash: line 1: 18148 Killed                  iqtree -ninit 2 -n 2 -me 0.05 -nt 1 -s results/subsampled_alignment-delim.fasta -m GTR > results/subsampled_alignment-delim.iqtree.log\n'
shell exited 137 when running: iqtree -ninit 2 -n 2 -me 0.05 -nt 1 -s results/subsampled_alignment-delim.fasta -m GTR  > results/subsampled_alignment-delim.iqtree.log

ERROR: TREE BUILDING FAILED
Please see the log file for more details: results/subsampled_alignment-delim.iqtree.log

Building original tree took 537.5226821899414 seconds
[Tue Apr 14 13:20:35 2020]
Error in rule tree:
    jobid: 8
    output: results/tree_raw.nwk
    shell:

        augur tree             --alignment results/subsampled_alignment.fasta             --output results/tree_raw.nwk             --nthreads 1

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: /nextstrain/build/.snakemake/log/2020-04-14T124028.174414.snakemake.log

I deleted the repo, re-cloned it and ran nextstrain update to ensure I had the most up to date version of the CLI. Running it all again (including the step to clean the GISAID download with ./scripts/normalize_gisaid_fasta.sh data/gisaid_cov2020_sequences.fasta data/sequences.fasta) I am still getting the same error.

Your environment: if running Nextstrain locally

  • Operating system: macOS Catalina
  • Version (e.g. auspice 2.7.0): nextstrain.cli 1.16.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
tsibleycommented, Apr 14, 2020

Thanks for tagging me in @emmahodcroft. 😃

@TrentBrick From the first logs you posted, it looks like Linux’s out-of-memory (OOM) killer in the container is killing the iqtree process when memory is overcommitted:

ERROR: b'/bin/bash: line 1: 18148 Killed iqtree …
shell exited 137 when running: …

When a process is killed by a signal, the shell exits with 128+n where n is the signal number. 137 - 128 = 9, which is SIGKILL (see output of kill -l). This matches the “bash: Killed iqtree” message which is Bash telling you that it noticed iqtree was killed by something.

Can you run nextstrain check-setup and paste the output here? On macOS, Docker runs Linux containers inside a VM. The VM by default only has access to a pretty limited amount of your computer’s memory, and thus the containers are restricted by that same limit. (On Linux, Docker doesn’t have to use a VM, so by default containers have access to all the memory.) nextstrain check-setup will attempt to diagnose the amount of memory available to the Nextstrain container, so its output will be useful to see.

0reactions
TrentBrickcommented, Apr 16, 2020

I set Docker to 7Gb and it worked without any issues. Thanks for the rapid and precise help. I don’t know how common this issue is but you may want to flag it in some way for future users?

What was insidious about it was that everything ran well when GISAID had fewer sequences! Either way thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: tree building failed - Help and Getting Started
Hello, I am a new for nextstrain. I have the problem when I follow the tutorial. I appreciate if you give me some...
Read more >
IQ-TREE CRASHES WITH SIGNAL ABORTED - Google Groups
You received this message because you are subscribed to the Google Groups "IQ-TREE" group. To unsubscribe from this group and stop receiving emails...
Read more >
Dependency tree for Bug 687
Bugzilla – Dependency tree for Bug 687. Build failed with GSL in non-default location ... Bug 687 does not depend on any open...
Read more >
Not Able to Build Some Versions of Python on M1 at 12.3.1
Following is the failure I get running pyenv install 3.6.9 ... BUILD FAILED (OS X 12.3.1 using python-build 20180424) Inspect or clean up...
Read more >
Why my forge installer keeps giving me Failed to run ...
SSLHandshakeException:PKIX path building failed : ... August 23 in Support & Bug Reports ... Recommended Posts. YotSuS Tree Puncher ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found