mikolmogorov / Flye

De novo assembler for single molecule sequencing reads using repeat graphs
Other
743 stars 164 forks source link

corrupted double-linked list #682

Closed grinning-bat closed 3 months ago

grinning-bat commented 3 months ago

Hi! Thanks for your wonderful work! I've got a crash while assembling ONT reads.

The only thing I know about the error: "corrupted double-linked list" in the log when "Extending reads" was at 100%. Tried to find this message in the source code, but no luck. If you need additional debug info/data files - please don't hesitate to tell how to collect/send.

Running on conda, version:

[2024-03-04 11:06:27] root: INFO: Starting Flye 2.9.3-b1797
[2024-03-04 11:06:27] root: DEBUG: Cmd: [redacted]/env/bin/flye --threads 63 --nano-raw [redacted]_all_pass.fastq.gz --out-dir [redacted]
[2024-03-04 11:06:27] root: DEBUG: Python version: 3.9.18 | packaged by conda-forge | (main, Dec 23 2023, 16:33:10)
[GCC 12.3.0]
Last messages in flye.log:
[2024-03-05 04:38:09] DEBUG: Inner: 2814456 covered: 5113684 total: 5200290
[2024-03-05 04:38:24] DEBUG: Assembled disjointig 72723
        With 4 reads
        Start read: +94d239bc-57c5-441e-af5b-620001e87078
        At position: 2
        leftTip: 0 rightTip: 0
        Suspicious: 3
        Short ext: 0
        Mean extensions: 50
        Avg overlap len: 6311
        Min overlap len: 6246
        Inner reads: 0
        Length: 49901
[2024-03-05 04:38:24] DEBUG: Inner: 2814460 covered: 5113684 total: 5200290
[2024-03-05 04:38:42] DEBUG: Assembled disjointig 72724
        With 7 reads
        Start read: +4a87f165-c7f1-4c05-9f6f-100d6cae3a19
        At position: 2
        leftTip: 0 rightTip: 0
        Suspicious: 1
        Short ext: 1
        Mean extensions: 15
        Avg overlap len: 13130
        Min overlap len: 1798
        Inner reads: 0
        Length: 69687
[2024-03-05 04:38:42] DEBUG: Inner: 2814472 covered: 5113684 total: 5200290
lscpu:
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              64
On-line CPU(s) list: 0-63
Thread(s) per core:  1
Core(s) per socket:  32
Socket(s):           2
NUMA node(s):        8
Vendor ID:           AuthenticAMD
CPU family:          25
Model:               1
Model name:          AMD EPYC 7543 32-Core Processor
Stepping:            1
CPU MHz:             2800.228
CPU max MHz:         2800.0000
CPU min MHz:         1500.0000
BogoMIPS:            5600.46
Virtualization:      AMD-V
L1d cache:           32K
L1i cache:           32K
L2 cache:            512K
L3 cache:            32768K
NUMA node0 CPU(s):   0-7
NUMA node1 CPU(s):   8-15
NUMA node2 CPU(s):   16-23
NUMA node3 CPU(s):   24-31
NUMA node4 CPU(s):   32-39
NUMA node5 CPU(s):   40-47
NUMA node6 CPU(s):   48-55
NUMA node7 CPU(s):   56-63
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 invpcid_single hw_pstate sme ssbd mba sev ibrs ibpb stibp vmmcall sev_es fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr wbnoinvd amd_ppin arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold v_vmsave_vmload vgif umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm
Command line:
flye --threads 63 \
--nano-raw [redacted]_all_pass.fastq.gz \
--out-dir [redacted] 

Log:
[2024-03-04 11:06:27] INFO: Starting Flye 2.9.3-b1797
[2024-03-04 11:06:27] INFO: >>>STAGE: configure
[2024-03-04 11:06:27] INFO: Configuring run
[2024-03-04 11:21:42] INFO: Total read length: 44088709391
[2024-03-04 11:21:42] INFO: Reads N50/N90: 16339 / 4674
[2024-03-04 11:21:42] INFO: Minimum overlap set to 5000
[2024-03-04 11:21:42] INFO: >>>STAGE: assembly
[2024-03-04 11:21:42] INFO: Assembling disjointigs
[2024-03-04 11:21:42] INFO: Reading sequences
[2024-03-04 11:34:37] INFO: Counting k-mers:
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 
[2024-03-04 11:47:52] INFO: Filling index table (1/2)
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 
[2024-03-04 11:54:37] INFO: Filling index table (2/2)
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 
[2024-03-04 12:04:14] INFO: Extending reads
[2024-03-04 12:30:13] INFO: Overlap-based coverage: 4
[2024-03-04 12:30:13] INFO: Median overlap divergence: 0.136314
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 
corrupted double-linked list
[2024-03-05 04:41:11] ERROR: Command '['flye-modules', 'assemble', '--reads', '[redacted]_all_pass.fastq.gz', '--out-asm', '[redacted]/00-assembly/draft_assembly.fasta', '--config', '[redacted]/env/lib/python3.9/site-packages/flye/config/bin_cfg/asm_raw_reads.cfg', '--log', '[redacted]/flye.log', '--threads', '63', '--min-ovlp', '5000']' died with .
[2024-03-05 04:41:11] ERROR: Pipeline aborted
mikolmogorov commented 3 months ago

Sorry for my late response. This is indeed very strange - and would be hard to debug without being able to reproduce the issue. Did you compile from source or run the bioconda version? Did you have any additional information in your terminal output (e.g. backtrace)? Does this reproduces if you run it again?

Another thing to rule out - is it possible you are running out of memory?

grinning-bat commented 3 months ago

Hello. I believe this one was installed from bioconda (see the first block in OP). Bug is reproducible, assembly takes many days, so I tried it only twice. Now I'm running flye-modules with parameters from "ERROR: Command" line under gdb to get a stack trace. Would also appreciate some hints on debug techniques. The only option to run flye on my dataset is HPC cluster (we don't have dedicated 512G RAM node) and I'm using gdb target remote and gdbserver for debugging. Unfortunately it's rather buggy on itself.

RAM usage recorded in the log is about 220Gb and there is a scheduler-imposed limit which is less than the real installed size (500G of 512G installed), so I'd rather expect to see the task being killed by a SLURM than dying due to mem allocation failure.

grinning-bat commented 3 months ago

UPD: this time process running under gdb finished correctly. Hard to say why, failed two times before. So "can't repro" I guess...