Xinglab / rmats-turbo

Other
228 stars 55 forks source link

Segmentation fault (core dumped) #173

Open xibeixingchen opened 2 years ago

xibeixingchen commented 2 years ago
0  futex_wait (val=8, addr=0x555563ac8184)
    at /home/conda/feedstock_root/build_artifacts/gcc_compilers_1634095553113/work/build/x86_64-conda-linux-gnu/libgomp/wait.h:97
#1  do_wait (addr=addr@entry=0x555563ac8184, val=val@entry=8) at ../../../libgomp/config/linux/bar.c:67
#2  0x00007ffff640d2bc in gomp_team_barrier_wait_end (bar=0x555563ac8180, state=8)
    at /home/conda/feedstock_root/build_artifacts/gcc_compilers_1634095553113/work/build/x86_64-conda-linux-gnu/libgomp/mutex.h:112
#3  0x00007ffff640d2f4 in gomp_team_barrier_wait (bar=<optimized out>)
    at /home/conda/feedstock_root/build_artifacts/gcc_compilers_1634095553113/work/build/x86_64-conda-linux-gnu/libgomp/mutex.h:127
#4  0x00007ffff6402bbe in GOMP_barrier () at ../../../libgomp/barrier.c:41
#5  0x00007ffff6673c0f in __pyx_f_5rmats_13rmatspipeline_detect_novel ()
    at /opt/conda/conda-bld/rmats_1640125329716/_build_env/x86_64-conda-linux-gnu/include/c++/9.4.0/ext/new_allocator.h:89
#6  0x00007ffff64064a8 in GOMP_parallel (
    fn=0x7ffff6673a40 <_ZL43__pyx_f_5rmats_13rmatspipeline_detect_novelP7_objectRSt13unordered_mapIiSt3setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4lessIS8_ESaIS8_EESt4hashIiESt8equal_toIiESaISt4pairIKiSC_EEERS1_IS8_N5rmats4GeneESD_IS8_ESF_IS8_ESaISH_IKS8_SO_EEERS1_IS8_NSN_7SupInfoESP_SQ_SaISH_ISR_SW_EEERSt6vectorIS1_IS8_S11_INSN_5TriadESaIS12_EESP_SQ_SaISH_ISR_S14_EEESaIS17_EERS11_IS1_IS8_St3mapINSN_6TetradEiS9_IS1C_ESaISH_IKS1C_iEEESP_SQ_SaISH_ISR_S1H_EEESaIS1K_EERS11_IS1_IS8_S1B_IS8_iSA_SaISH_ISR_iEEESP_SQ_SaISH_ISR_S1Q_EEESaIS1T_EES0_._omp_fn.0(void)>, data=0x7fffffffd460, num_threads=8, flags=0) at ../../../libgomp/parallel.c:178
#7  0x00007ffff669cba6 in __pyx_f_5rmats_13rmatspipeline_detect_novel (__pyx_v_args=0x7ffff683b4f0, __pyx_v_multis=..., __pyx_v_exons=...,
    __pyx_v_novel_juncs=..., __pyx_v_supple=..., __pyx_v_genes=..., __pyx_v_geneGroup=..., __pyx_v_bams=<optimized out>)
    at rmatspipeline/rmatspipeline.cpp:11164
#8  __pyx_pf_5rmats_13rmatspipeline_run_pipe(_object*, _object*) [clone .isra.0] () at rmatspipeline/rmatspipeline.cpp:38477
#9  0x00005555556eecd6 in cfunction_vectorcall_O ()
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Objects/methodobject.c:516
#10 0x000055555573572d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x555555b3b1e0, callable=0x7ffff6742d10,
    tstate=0x55555594e330) at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Include/cpython/abstract.h:127
#11 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x555555b3b1e0, callable=0x7ffff6742d10)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Include/cpython/abstract.h:127
#12 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x55555594e330)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Python/ceval.c:5075
#13 _PyEval_EvalFrameDefault () at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Python/ceval.c:3518
#14 0x00005555556f576a in _PyEval_EvalFrame (throwflag=0, f=0x555555b3b040, tstate=0x55555594e330)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Objects/object.c:1822
#15 function_code_fastcall (globals=0x7ffff7f00c80, nargs=<optimized out>, args=<optimized out>, co=<optimized out>, tstate=0x55555594e330)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Objects/call.c:330
#16 _PyFunction_Vectorcall () at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Objects/call.c:367
#17 0x000055555573572d in _PyObject_VectorcallTstate (kwnames=0x0, nargsf=<optimized out>, args=0x55555599bd50, callable=0x7ffff6734af0,
    tstate=0x55555594e330) at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Include/cpython/abstract.h:127
#18 PyObject_Vectorcall (kwnames=0x0, nargsf=<optimized out>, args=0x55555599bd50, callable=0x7ffff6734af0)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Include/cpython/abstract.h:127
#19 call_function (kwnames=0x0, oparg=<optimized out>, pp_stack=<synthetic pointer>, tstate=0x55555594e330)
    at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Python/ceval.c:5075
#20 _PyEval_EvalFrameDefault () at /home/conda/feedstock_root/build_artifacts/python-split_1639967288117/work/Python/ceval.c:3518
#21 0x000055555568d250 in _PyEval_EvalFrame (throwflag=0, f=0x55555599bbe0, tstate=0x55555594e330)
---Type <return> to continue, or q <return> to quit---

Detailed errors were reported using gbd, when used code python rmats.py --b1 /home/wengyy/work/mcl/BMK211105-AQ137-ZX01-0302/BMK_DATA_20211227144421_1/Customer_BMK211105-AQ137-ZX01-0302/result/as_out/CK4.txt --b2 /home/wengyy/work/mcl/BMK211105-AQ137-ZX01-0302/BMK_DATA_20211227144421_1/Customer_BMK211105-AQ137-ZX01-0302/result/as_out/AGE4.txt --gtf /home/wengyy/work/software/miniconda2/envs/rmats/rMATS/path/to/oat_gene_v2.gtf -t paired --readLength 100 --variable-read-length --nthread 8 --od /home/wengyy/work/mcl/BMK211105-AQ137-ZX01-0302/BMK_DATA_20211227144421_1/Customer_BMK211105-AQ137-ZX01-0302/result/as_out/output --tmp /home/wengyy/work/mcl/BMK211105-AQ137-ZX01-0302/BMK_DATA_20211227144421_1/Customer_BMK211105-AQ137-ZX01-0302/result/as_out/tmp_output , Each of my BAM files is about 1GB in size, where one bam file was select on every group. How can I solve this problem?

EricKutschera commented 2 years ago

From the stack trace, it looks like the segfault happened while reading the bam files on multiple threads: https://github.com/Xinglab/rmats-turbo/blob/v4.1.2/rMATS_pipeline/rmatspipeline/rmatspipeline.pyx#L987

My guess is that the segfault happens due to running out of memory. This thread has some suggestions: https://github.com/Xinglab/rmats-turbo/issues/18#issuecomment-763109643