Skip to content

Conversation

@thiagogenez
Copy link

This patch copies dimensions before segments in the halAppendSubtree in a similar way as 0b35950 (halReplaceGenomes) and ab7d889 (halAddToBranch).

This patch aims to fix the error Program received signal SIGSEGV, Segmentation fault while running the first job of the last step of Cactus (HAL merging). I have been facing this error in two completely different alignments (123-way fish and 37-way wheat). The lines below show gdb log for both examples:

  1. Fish:
[thiagogenez_ebi_ac_uk@slurm-prj-int-dev-isp-wheat-controller fish]$ gdb $HOME/cactus/bin/halAppendSubtree
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/thiagogenez_ebi_ac_uk/cactus/bin/halAppendSubtree...done.
(gdb) set args steps/123-way-fish-final.hal steps/Anc002.hal Anc002 Anc002 --merge --hdf5InMemory
(gdb) r
Starting program: /home/thiagogenez_ebi_ac_uk/cactus/bin/halAppendSubtree steps/123-way-fish-final.hal steps/Anc002.hal Anc002 Anc002 --merge --hdf5InMemory
[halAppendSubtree] Copying Anc004
[halAppendSubtree] Copying Anc005

Program received signal SIGSEGV, Segmentation fault.
0x0000000000431109 in hal::Genome::copyTopDimensions(hal::Genome*) const ()
    at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/shared_ptr_base.h:1020
1020	      _M_get() const noexcept
(gdb) where
#0  0x0000000000431109 in hal::Genome::copyTopDimensions(hal::Genome*) const ()
    at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/shared_ptr_base.h:1020
#1  0x000000000041758e in main () at halAppendSubtree.cpp:141
#2  0x000000000080fd54 in generic_start_main ()
#3  0x000000000080ffd1 in __libc_start_main ()
#4  0x00000000004192d6 in _start ()
    at /opt/rh/devtoolset-9/root/usr/include/c++/9/ext/new_allocator.h:89
(gdb) steps/Anc002.hal
  1. Wheat
[thiagogenez_ebi_ac_uk@slurm-prj-int-dev-isp-wheat-controller wheat]$ gdb $HOME/cactus/bin/halAppendSubtree
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-120.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/thiagogenez_ebi_ac_uk/cactus/bin/halAppendSubtree...done.
(gdb) set args steps/37-way-wheat.hal steps/Anc01.hal Anc01 Anc01 --merge --hdf5InMemory
(gdb) r
Starting program: /home/thiagogenez_ebi_ac_uk/cactus/bin/halAppendSubtree steps/37-way-wheat.hal steps/Anc01.hal Anc01 Anc01 --merge --hdf5InMemory
[halAppendSubtree] Copying hordeum_vulgare
[halAppendSubtree] Copying Anc02

Program received signal SIGSEGV, Segmentation fault.
0x0000000000431109 in hal::Genome::copyTopDimensions(hal::Genome*) const () at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/shared_ptr_base.h:1020
1020	      _M_get() const noexcept
(gdb) WHERE
#0  0x0000000000431109 in hal::Genome::copyTopDimensions(hal::Genome*) const () at /opt/rh/devtoolset-9/root/usr/include/c++/9/bits/shared_ptr_base.h:1020
#1  0x000000000041758e in main () at halAppendSubtree.cpp:141
#2  0x000000000080fd54 in generic_start_main ()
#3  0x000000000080ffd1 in __libc_start_main ()
#4  0x00000000004192d6 in _start () at /opt/rh/devtoolset-9/root/usr/include/c++/9/ext/new_allocator.h:89

To reproduce the errors above, I made the files for both cases (fish and wheat) available for download at https://storage.googleapis.com/37-way-wheat/issue/halAppendSubtree-issue.tar.gz.

After this patch is applied, I was able to build the final HAL files for both alignments with halValidade outputting File valid for each halAppendSubtree call.

  1. Fish
halAppendSubtree steps/123-way-fish-final.hal steps/Anc002.hal Anc002 Anc002 --merge --hdf5InMemory
[halAppendSubtree] Copying Anc004
[halAppendSubtree] Copying Anc005

halValidate steps/123-way-fish-final.hal
File valid
  1. Wheat
$ halAppendSubtree steps/37-way-wheat.hal steps/Anc01.hal Anc01 Anc01 --merge --hdf5InMemory
[halAppendSubtree] Copying hordeum_vulgare
[halAppendSubtree] Copying Anc02

$ halValidade steps/37-way-wheat.hal
File valid

@glennhickey
Copy link
Collaborator

Great catch, thanks. So weird that this crash has only started happening now in halAppendSubtree which has been working fine recently on a lot of data, whereas it completely broke halReplaceGenomes and halAddToBranch for any input with >1 chromosome.

@thiagogenez
Copy link
Author

Great catch, thanks. So weird that this crash has only started happening now in halAppendSubtree which has been working fine recently on a lot of data, whereas it completely broke halReplaceGenomes and halAddToBranch for any input with >1 chromosome.

Fairly, I had the same thought about it. I ran a lot of alignments too and I haven't had any problem with halAppendSubtree until now. Maybe I was pretty (un)luck with this fish and wheat alignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants