arq5x / bedtools

A powerful toolset for genome arithmetic.
http://code.google.com/p/bedtools/
GNU General Public License v2.0
140 stars 85 forks source link

Potential bug causing segfault dump in makewindows #96

Open yarden opened 10 years ago

yarden commented 10 years ago

Hi,

I'm trying to make a set of sliding windows using makewindows from a GFF file. Example GFF entry:

chr2    ensGene three_prime_UTR 136907192   136908759   .   -   .   gene_id=ENSMUSG00000027276;region_len=1568;Name=ENSMUST00000028735.utr25;Parent=ENSMUST00000028735;ID=ENSMUST00000028735.utr25

If I try to make 10-bp windows from this, I get a core dump:

$ bedtools makewindows -b myregion.gff -n 10

Yields:

$ bedtools makewindows -b myregion.gff -n 10
    136907191   136907348
    136907348   136907505
    136907505   136907662
    136907662   136907819
    136907819   136907976
    136907976   136908133
    136908133   136908290
    136908290   136908447
    136908447   136908604
    136908604   136908759
*** glibc detected *** bedtools: free(): invalid pointer: 0x00000000012beb10 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7eb96)[0x7fc8d903db96]
/usr/lib/x86_64-linux-gnu/libstdc++.so.6(_ZNSs6assignERKSs+0x79)[0x7fc8d994c6b9]
bedtools[0x41f821]
bedtools[0x420fa5]
bedtools[0x41a389]
bedtools[0x4cb075]
bedtools[0x4c95c5]
bedtools[0x43790a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7fc8d8fe076d]
bedtools[0x406fb9]
======= Memory map: ========
00400000-0054c000 r-xp 00000000 00:1d 4759503922                         /lab/solexa_jaenisch/solexa_jaenisch2/yarden/software/bedtools/bin/bedtools
0074b000-0074d000 r--p 0014b000 00:1d 4759503922                         /lab/solexa_jaenisch/solexa_jaenisch2/yarden/software/bedtools/bin/bedtools
0074d000-0074e000 rw-p 0014d000 00:1d 4759503922                         /lab/solexa_jaenisch/solexa_jaenisch2/yarden/software/bedtools/bin/bedtools
0074e000-0074f000 rw-p 00000000 00:00 0 
012b6000-012d7000 rw-p 00000000 00:00 0                                  [heap]
7fc8d8fbf000-7fc8d9174000 r-xp 00000000 fc:00 937049                     /lib/x86_64-linux-gnu/libc-2.15.so
7fc8d9174000-7fc8d9374000 ---p 001b5000 fc:00 937049                     /lib/x86_64-linux-gnu/libc-2.15.so
7fc8d9374000-7fc8d9378000 r--p 001b5000 fc:00 937049                     /lib/x86_64-linux-gnu/libc-2.15.so
7fc8d9378000-7fc8d937a000 rw-p 001b9000 fc:00 937049                     /lib/x86_64-linux-gnu/libc-2.15.so
7fc8d937a000-7fc8d937f000 rw-p 00000000 00:00 0 
7fc8d937f000-7fc8d9394000 r-xp 00000000 fc:00 917551                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc8d9394000-7fc8d9593000 ---p 00015000 fc:00 917551                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc8d9593000-7fc8d9594000 r--p 00014000 fc:00 917551                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc8d9594000-7fc8d9595000 rw-p 00015000 fc:00 917551                     /lib/x86_64-linux-gnu/libgcc_s.so.1
7fc8d9595000-7fc8d9690000 r-xp 00000000 fc:00 937060                     /lib/x86_64-linux-gnu/libm-2.15.so
7fc8d9690000-7fc8d988f000 ---p 000fb000 fc:00 937060                     /lib/x86_64-linux-gnu/libm-2.15.so
7fc8d988f000-7fc8d9890000 r--p 000fa000 fc:00 937060                     /lib/x86_64-linux-gnu/libm-2.15.so
7fc8d9890000-7fc8d9891000 rw-p 000fb000 fc:00 937060                     /lib/x86_64-linux-gnu/libm-2.15.so
7fc8d9891000-7fc8d9977000 r-xp 00000000 fc:00 1967661                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18
7fc8d9977000-7fc8d9b76000 ---p 000e6000 fc:00 1967661                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18
7fc8d9b76000-7fc8d9b7e000 r--p 000e5000 fc:00 1967661                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18
7fc8d9b7e000-7fc8d9b80000 rw-p 000ed000 fc:00 1967661                    /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.18
7fc8d9b80000-7fc8d9b95000 rw-p 00000000 00:00 0 
7fc8d9b95000-7fc8d9bab000 r-xp 00000000 fc:00 917732                     /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fc8d9bab000-7fc8d9daa000 ---p 00016000 fc:00 917732                     /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fc8d9daa000-7fc8d9dab000 r--p 00015000 fc:00 917732                     /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fc8d9dab000-7fc8d9dac000 rw-p 00016000 fc:00 917732                     /lib/x86_64-linux-gnu/libz.so.1.2.3.4
7fc8d9dac000-7fc8d9dce000 r-xp 00000000 fc:00 937061                     /lib/x86_64-linux-gnu/ld-2.15.so
7fc8d9fa3000-7fc8d9fa8000 rw-p 00000000 00:00 0 
7fc8d9fca000-7fc8d9fce000 rw-p 00000000 00:00 0 
7fc8d9fce000-7fc8d9fcf000 r--p 00022000 fc:00 937061                     /lib/x86_64-linux-gnu/ld-2.15.so
7fc8d9fcf000-7fc8d9fd1000 rw-p 00023000 fc:00 937061                     /lib/x86_64-linux-gnu/ld-2.15.so
7fff7a4bd000-7fff7a4de000 rw-p 00000000 00:00 0                          [stack]
7fff7a5f3000-7fff7a5f4000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)

My bedtools version is:

$ bedtools --version
bedtools v2.17.0-33-g2a16ea9

Any ideas on this? It's a super helpful feature based on docs so I'd really love to use it.

Thanks, --Yarden

yarden commented 10 years ago

Update: Upgrading to bedtools v2.17.0 official release appears to fix this.

arq5x commented 10 years ago

Interesting, I am not sure what would have caused that or what changed to correct it.