chanzuckerberg / shasta

[MOVED] Moved to paoloshasta/shasta. De novo assembly from Oxford Nanopore reads
Other
272 stars 59 forks source link

segmentation faults when beginning "simplifyMarkerGraph" #123

Closed Nheyer closed 4 years ago

Nheyer commented 4 years ago

using both release 0.4.0, and a local compiled version of Shasta I get a segmentation fault I am on a CentOs server with version 2.6.32-754.18.2.el6.x86_64 Most all packages were installed through Linux brew, and for the locally compiled version only the static library & executable was built. command that was run was : shasta --command=assemble --memoryBacking 2M --threads 8 --input foo.fasta --assemblyDirectory out_dir

trailing 20 lines of output are consistently:

2020-Apr-22 10:13:59.791654 Flagged as weak 2 edges with coverage 69 out of 572 total. 2020-Apr-22 10:13:59.792702 Flagged as weak 2 edges with coverage 70 out of 550 total. 2020-Apr-22 10:13:59.793527 Flagged as weak 2 edges with coverage 71 out of 566 total. 2020-Apr-22 10:13:59.795658 Flagged as weak 2 edges with coverage 74 out of 554 total. 2020-Apr-22 10:13:59.796736 Flagged as weak 2 edges with coverage 76 out of 570 total. 2020-Apr-22 10:13:59.800192 Flagged as weak 2 edges with coverage 84 out of 484 total. Transitive reduction removed 2946484 marker graph edges out of 3566124 total. The marker graph has 480952 vertices and 619640 strong edges. 2020-Apr-22 10:13:59.833666 Transitive reduction of the marker graph ends. 2020-Apr-22 10:13:59.870307 Begin prune iteration 0 Pruned 588 edges at prune iteration 0. 2020-Apr-22 10:14:00.396775 Begin prune iteration 1 Pruned 486 edges at prune iteration 1. 2020-Apr-22 10:14:00.927001 Begin prune iteration 2 Pruned 46 edges at prune iteration 2. 2020-Apr-22 10:14:01.486068 Begin prune iteration 3 Pruned 4 edges at prune iteration 3. 2020-Apr-22 10:14:02.010430 Begin prune iteration 4 Pruned 0 edges at prune iteration 4. 2020-Apr-22 10:14:02.554399 Begin prune iteration 5 Pruned 0 edges at prune iteration 5. The original marker graph had 480952 vertices and 3566124 edges. The number of surviving edges is 618516. 2020-Apr-22 10:14:03.294165 Begin simplifyMarkerGraph iteration 0 with maxLength = 10

paoloczi commented 4 years ago

Are you getting the segment fault when using the 0.4.0 static executable downloaded from the release page? If so, please provide the following information:

Regarding building Shasta on CentOS, this is not supported by the current code base.

paoloczi commented 4 years ago

Also, please attach stderr in addition to stdout, including the message showing that the segment fault occurred.

Nheyer commented 4 years ago

CentOS 6.10 (Final)

The server has ~757 Gb of ram

The binary version is Shasta Release 0.4.0 Linux version

trying it with --memoryMode filesystem and --memoryBacking disk now

Nheyer commented 4 years ago

running with those flags seem to have fixed it ! Do you have an idea why this happened

paoloczi commented 4 years ago

I don't know. But I suspect you did not really get a segment fault. If you got a segment fault, you should have seen this message:

A segment fault occurred. Please report it by filing an issue on the Shasta repository and attaching the entire log output.

But you did not report this message. I suspect instead the job was killed by the system due to a resource issue related to the 2 MB pages. Did you see a "killed" message? If the system has been up without rebooting for a long time, allocating 2 MB pages requires defragmentation of real memory, which could be problematic in some conditions. However, the system should be able to respond to that gracefully. Can you see if your syslog contains messages at the time of failure that might give an indication of what happened? If this guess is correct, rebooting the machine before running the Shasta assembly may fix the problem.

Switching to disk-backed mapped memory circumvented the issue at a price in performance.