cole-trapnell-lab / cufflinks

Boost Software License 1.0
310 stars 116 forks source link

Cuffdiff segfault #56

Open moskalenko opened 8 years ago

moskalenko commented 8 years ago

cuffdiff built from the current master segfaults when run as follows

cuffdiff -p 4 -L ctrl,siCTCF -u ./merged_LNC_CTCF_CTRL/merged.gtf LNC_ctrl_output/accepted_hits.bam LNC_siCTCF_output/accepted_hits.bam -o cuffdiff_LNC_CTCF_CTRL

GDB backtrace:

(gdb) bt

0 0x0000003926832625 in raise () from /lib64/libc.so.6

1 0x0000003926833e05 in abort () from /lib64/libc.so.6

2 0x0000003926870537 in __libc_message () from /lib64/libc.so.6

3 0x0000003926875e66 in malloc_printerr () from /lib64/libc.so.6

4 0x0000003926879caa in _int_malloc () from /lib64/libc.so.6

5 0x000000392687a6b1 in malloc () from /lib64/libc.so.6

6 0x00000039294bd0bd in operator new(unsigned long) () from /usr/lib64/libstdc++.so.6

7 0x0000000000413d4f in quantitate_next_locus (rt=..., bundle_factories=..., launcher=...) at cuffdiff.cpp:965

8 0x000000000041accc in driver (ref_gtf=0x82d0a0, mask_gtf=0x6dd, contrast_file=0x7ffffffebc78, norm_standards_file=0xa340000000000000, sam_hit_filename_lists=..., outfiles=...) at cuffdiff.cpp:1831

9 0x000000000041f081 in main (argc=, argv=0x82a570) at cuffdiff.cpp:2684

Processing Locus chr1:109656584-109749403 [* ] 4%[New Thread 0x2aaaabf80700 (LWP 12356)] Processing Locus chr1:110292701-110306644 [* ] 4%[Thread 0x2aaaabf80700 (LWP 12356) exited] Processing Locus chr1:182023704-182030847 [* ] 7%[New Thread 0x2aaaabf80700 (LWP 12357)] Processing Locus chr1:183605207-183897666 [* ] 7%[Thread 0x2aaaabf80700 (LWP 12357) exited] Processing Locus chr1:209929393-209957890 [\ ] 8%* glibc detected * /apps/tuxedo/cufflinks/2.2.2/bin/cuffdiff: corrupted double-linked list: 0x000000000486ce90 ***

Valgrind memcheck:

valgrind --leak-check=yes cuffdiff -p 8 -L ctrl,siCTCF -u ./merged_LNC_CTCF_CTRL/merged.gtf LNC_ctrl_output/accepted_hits.bam LNC_siCTCF_output/accepted_hits.bam -o cuffdiff_LNC_CTCF_CTRL ==18491== Memcheck, a memory error detector ==18491== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al. ==18491== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info ==18491== Command: cuffdiff -p 8 -L ctrl,siCTCF -u ./merged_LNC_CTCF_CTRL/merged.gtf LNC_ctrl_output/accepted_hits.bam LNC_siCTCF_output/accepted_hits.bam -o cuffdiff_LNC_CTCF_CTRL ==18491== You are using Cufflinks v2.2.2, which is the most recent release. [15:50:22] Loading reference annotation. Warning: No conditions are replicated, switching to 'blind' dispersion method [15:52:02] Inspecting maps and determining fragment length distributions. [15:54:43] Modeling fragment count overdispersion.

Warning: compparcomp: perfect fit Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Warning: procv: no points with non-zero weight Error: attempting to re-initialize still-live variable _lfwork Error: attempting to re-initialize still-live variable _lfiwork ==18491== Invalid write of size 8 ==18491== at 0x4A09D13: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB2E: reassign (ev_main.c:135) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== Address 0x1529d5d0 is 0 bytes after a block of size 3,488 alloc'd ==18491== at 0x4A0677B: calloc (vg_replace_malloc.c:593) ==18491== by 0x513053: createvar (vari.cpp:295) ==18491== by 0x52B59D: trchck (ev_main.c:89) ==18491== by 0x52BA96: reassign (ev_main.c:126) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== Address 0x62f7e88 is 8 bytes before a block of size 152 alloc'd ==18491== at 0x4A085BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==18491== by 0x4A3FE8: load_ref_rnas(_IOFILE, RefSequenceTable&, std::vectorboost::shared_ptr<Scaffold, std::allocatorboost::shared_ptr >&, boost::crc_optimal<32ul, 79764919u, 4294967295u, 4294967295u, true, true>&, bool, bool) (bundles.cpp:228) ==18491== by 0x418603: driver(_IOFILE, _IOFILE, _IOFILE, _IOFILE, std::vector<std::string, std::allocator >&, Outfiles&) (cuffdiff.cpp:1637) ==18491== by 0x41F080: main (cuffdiff.cpp:2684) ==18491== ==18491== Invalid read of size 8 ==18491== at 0x4A09D0C: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB63: reassign (ev_main.c:138) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== Address 0x62f8050 is not stack'd, malloc'd or (recently) free'd ==18491== Error: attempting to re-initialize still-live variable _lfwork Error: attempting to re-initialize still-live variable _lfiwork ==18491== Invalid read of size 8 ==18491== at 0x4A09BFE: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB2E: reassign (ev_main.c:135) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== by 0x4F18F9: locfit_dispatch (cmd.c:748) ==18491== by 0x4E12D4: fit_dispersion_model_helper(std::string const&, std::vector<double, std::allocator > const&, std::vector<LocusCountList, std::allocator > const&) (replicates.cpp:825) ==18491== Address 0x1529d5d0 is 0 bytes after a block of size 3,488 alloc'd ==18491== at 0x4A0677B: calloc (vg_replace_malloc.c:593) ==18491== by 0x513053: createvar (vari.cpp:295) ==18491== by 0x52B59D: trchck (ev_main.c:89) ==18491== by 0x52BA96: reassign (ev_main.c:126) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== by 0x52810A: atree_grow.clone.0 (ev_atree.c:122) ==18491== ==18491== Invalid write of size 8 ==18491== at 0x4A09BF3: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB2E: reassign (ev_main.c:135) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== by 0x4F18F9: locfit_dispatch (cmd.c:748) ==18491== by 0x4E12D4: fit_dispersion_model_helper(std::string const&, std::vector<double, std::allocator > const&, std::vector<LocusCountList, std::allocator > const&) (replicates.cpp:825) ==18491== Address 0x7074710 is 0 bytes after a block of size 6,832 alloc'd ==18491== at 0x4A0677B: calloc (vg_replace_malloc.c:593) ==18491== by 0x513053: createvar (vari.cpp:295) ==18491== by 0x52B59D: trchck (ev_main.c:89) ==18491== by 0x52BA96: reassign (ev_main.c:126) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== ==18491== Invalid read of size 8 ==18491== at 0x4A09BE8: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB2E: reassign (ev_main.c:135) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== by 0x4F18F9: locfit_dispatch (cmd.c:748) ==18491== by 0x4E12D4: fit_dispersion_model_helper(std::string const&, std::vector<double, std::allocator > const&, std::vector<LocusCountList, std::allocator > const&) (replicates.cpp:825) ==18491== Address 0x1529d5e8 is not stack'd, malloc'd or (recently) free'd ==18491== ==18491== Invalid read of size 8 ==18491== at 0x4A09BE8: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB63: reassign (ev_main.c:138) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== by 0x4F18F9: locfit_dispatch (cmd.c:748) ==18491== by 0x4E12D4: fit_dispersion_model_helper(std::string const&, std::vector<double, std::allocator > const&, std::vector<LocusCountList, std::allocator > const&) (replicates.cpp:825) ==18491== Address 0x1529da00 is 16 bytes before a block of size 16 alloc'd ==18491== at 0x4A085BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==18491== by 0x428FBE: std::vector<std::string, std::allocator >::vector(std::vector<std::string, std::allocator > const&) (newallocator.h:89) ==18491== by 0x429375: LocusCount std::uninitialized_copy_a<gnu_cxx::normaliterator<LocusCount const*, std::vector<LocusCount, std::allocator > >, LocusCount, LocusCount>(gnu_cxx::normaliterator<LocusCount const, std::vector<LocusCount, std::allocator > >, gnu_cxx::normaliterator<LocusCount const*, std::vector<LocusCount, std::allocator > >, LocusCount, std::allocator&) (common.h:378) ==18491== by 0x42C9DB: std::vector<LocusCount, std::allocator >::operator=(std::vector<LocusCount, std::allocator > const&) (stl_vector.h:966) ==18491== by 0x4E34BB: normalize_counts(std::vectorboost::shared_ptr<ReadGroupProperties, std::allocatorboost::shared_ptr >&) (common.h:598) ==18491== by 0x41A2EA: driver(_IOFILE, _IOFILE, _IOFILE, _IOFILE, std::vector<std::string, std::allocator >&, Outfiles&) (cuffdiff.cpp:1765) ==18491== by 0x41F080: main (cuffdiff.cpp:2684) ==18491== ==18491== Invalid read of size 8 ==18491== at 0x4A09BFE: memcpy (mc_replace_strmem.c:882) ==18491== by 0x52BB63: reassign (ev_main.c:138) ==18491== by 0x52BDA0: newsplit (ev_main.c:264) ==18491== by 0x528023: atree_grow.clone.0 (ev_atree.c:117) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x528073: atree_grow.clone.0 (ev_atree.c:128) ==18491== by 0x5283AA: atree_start (ev_atree.c:163) ==18491== by 0x5103D8: startlf.clone.0 (startlf.c:215) ==18491== by 0x511CCB: clocfit (startlf.c:432) ==18491== by 0x4F181B: cmdint (cmd.c:696) ==18491== by 0x4F18F9: locfit_dispatch (cmd.c:748) ==18491== by 0x4E12D4: fit_dispersion_model_helper(std::string const&, std::vector<double, std::allocator > const&, std::vector<LocusCountList, std::allocator > const&) (replicates.cpp:825) ==18491== Address 0x1529da20 is 0 bytes after a block of size 16 alloc'd ==18491== at 0x4A085BC: operator new(unsigned long) (vg_replace_malloc.c:298) ==18491== by 0x428FBE: std::vector<std::string, std::allocator >::vector(std::vector<std::string, std::allocator > const&) (newallocator.h:89) ==18491== by 0x429375: LocusCount std::uninitialized_copy_a<gnu_cxx::normaliterator<LocusCount const*, std::vector<LocusCount, std::allocator > >, LocusCount, LocusCount>(gnu_cxx::normaliterator<LocusCount const, std::vector<LocusCount, std::allocator > >, __gnu_cxx::__normaliterator<LocusCount const*, std::vector<LocusCount, std::allocator > >, LocusCount, std::allocator&) (common.h:378) ==18491== by 0x42C9DB: std::vector<LocusCount, std::allocator >::operator=(std::vector<LocusCount, std::allocator > const&) (stl_vector.h:966) ==18491== by 0x4E34BB: normalize_counts(std::vectorboost::shared_ptr<ReadGroupProperties, std::allocatorboost::shared_ptr >&) (common.h:598) ==18491== by 0x41A2EA: driver(_IOFILE, _IOFILE, _IOFILE, _IO_FILE*, std::vector<std::string, std::allocator >&, Outfiles&) (cuffdiff.cpp:1765) ==18491== by 0x41F080: main (cuffdiff.cpp:2684) ==18491==

Map Properties:

  Normalized Map Mass: 25.50
  Raw Map Mass: 26.00
  Number of Multi-Reads: 74 (with 148 total hits)
  Fragment Length Distribution: Truncated Gaussian (default)
                Default Mean: 200
             Default Std Dev: 80

Map Properties: Normalized Map Mass: 25.50 Raw Map Mass: 27.00 Number of Multi-Reads: 70 (with 139 total hits) Fragment Length Distribution: Truncated Gaussian (default) Default Mean: 200 Default Std Dev: 80 [17:06:46] Calculating preliminary abundance estimates Processing Locus chr1:70820492-70833705 [ ] 3% valgrind: m_mallocfree.c:294 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed. valgrind: Heap block lo/hi size mismatch: lo = 80, hi = 1888. This is probably caused by your program erroneously writing past the end of a heap block and corrupting heap metadata. If you fix any invalid writes reported by Memcheck, this assertion failure will probably go away. Please try that before reporting this as a bug.

==18491== at 0x38031DA7: report_and_quit (m_libcassert.c:235) ==18491== by 0x38031FE0: vgPlain_assert_fail (m_libcassert.c:309) ==18491== by 0x3803CBBD: get_bszB (m_mallocfree.c:294) ==18491== by 0x3803E86E: vgPlain_arena_free (m_mallocfree.c:1810) ==18491== by 0x38003667: create_MC_Chunk (mc_malloc_wrappers.c:165) ==18491== by 0x38003BE0: vgMemCheck_new_block (mc_malloc_wrappers.c:283) ==18491== by 0x3800409A: vgMemCheck_malloc (mc_malloc_wrappers.c:301) ==18491== by 0x3807A58A: vgPlain_scheduler (scheduler.c:1665) ==18491== by 0x380A5A19: run_a_thread_NORETURN (syswrap-linux.c:103)

sched status: running_tid=1

Thread 1: status = VgTs_Runnable ==18491== at 0x4A079EE: malloc (vg_replace_malloc.c:270) ==18491== by 0x4A07B62: realloc (vg_replace_malloc.c:662) ==18491== by 0x561236: bam_read1 (sam.c:350) ==18491== by 0x567B0D: sam_read1 (sam.c:916) ==18491== by 0x49A27A: BAMHitFactory::nextrecord(char const&, unsigned long&) (sam.h:95) ==18491== by 0x4A1EDF: BundleFactory::next_validalignment(ReadHit const&) (bundles.cpp:673) ==18491== by 0x4AD8BA: BundleFactory::next_bundle_ref_driven(HitBundle&) (bundles.cpp:910) ==18491== by 0x4AE2B1: BundleFactory::next_bundle(HitBundle&, bool) (bundles.cpp:1168) ==18491== by 0x4330EC: ReplicatedBundleFactory::next_bundle(HitBundle&, bool) (replicates.h:190) ==18491== by 0x4142A9: quantitate_next_locus(RefSequenceTable const&, std::vectorboost::shared_ptr<ReplicatedBundleFactory, std::allocatorboost::shared_ptr >&, boost::shared_ptr) (cuffdiff.cpp:986) ==18491== by 0x41ACCB: driver(_IOFILE, _IOFILE, _IOFILE, _IOFILE, std::vector<std::string, std::allocator >&, Outfiles&) (cuffdiff.cpp:1831) ==18491== by 0x41F080: main (cuffdiff.cpp:2684)