Skip to content

TBR causes crash #1

@wtwhite

Description

@wtwhite

By default, fastdnamp runs tree bisection and reconnection (TBR) in an initial phase to try to obtain a quality upper bound (UB). But this seems to consistently hit an assertion failure. Running gdb on mt-10.phy:

...
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1999 (improvement: -310).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 2009 (improvement: -320).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1693 (improvement: -4).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1688 (improvement: 1).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1696 (improvement: -7).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1738 (improvement: -49).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1756 (improvement: -67).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1775 (improvement: -86).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1728 (improvement: -39).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1812 (improvement: -123).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 2021 (improvement: -332).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 2023 (improvement: -334).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1685 (improvement: 4).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1718 (improvement: -29).
EnumThingsAbove(): Found new edge from lower root to upper edge with weight 1689 (improvement: 0).
TBR(): Old edge had weight 1689; best TBR rearrangement found has score improvement 30.
EnumCuts(): Cutting an edge with weight 985.
Original score of entire tree before cut: 14418
Full tree: (1,(2,((8,(6,(5,(10,9)))),(3,(7,4)))));
Tree below this edge: (8,(6,(5,(10,9))));
Lower subtree before rerooting: (8,(6,(5,(10,9))));
Rerooting lower subtree...
fastdnamp: /home/wtwhite/code/xmp/src/arena.h:38: ArenaAllocate: Assertion `a->cur + size <= a->base + a->size' failed.
8>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>L<0>L<0>L<0>L<0>L<0>L<0><1586><3281><4769><6329>L<0>L<0>L<0><2605><4104><11518><13198>R<14418>
Program received signal SIGABRT, Aborted.
0x00007ffff7a43428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) back
#0  0x00007ffff7a43428 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff7a4502a in abort () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff7a3bbd7 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff7a3bc82 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x000000000041a31f in ArenaAllocate (a=0x7fffffffe320, size=1240) at /home/wtwhite/code/xmp/src/arena.h:38
#5  0x000000000041a4a7 in VerifyTreeMIDPOINTSeqs (t=0x674c30, ctx=0x7fffffffe2c0, piEdge=0x7fffffffe220) at /home/wtwhite/code/xmp/src/tbr.c:69
#6  0x000000000041a5dd in VerifyTreeMIDPOINTSeqs (t=0x675220, ctx=0x7fffffffe2c0, piEdge=0x7fffffffe220) at /home/wtwhite/code/xmp/src/tbr.c:91
#7  0x000000000041ab23 in VerifyTreeSeqs (t=0x675220, ctx=0x7fffffffe2c0, piEdge=0x7fffffffe264) at /home/wtwhite/code/xmp/src/tbr.c:193
#8  0x000000000041c786 in RerootTreeAbove (t=0x674c30, root=0x674cc0, ctx=0x7fffffffe2c0) at /home/wtwhite/code/xmp/src/tbr.c:815
#9  0x000000000041d279 in TreeBisectionReconnection (root=0x641190, td=0x63efc0 <gTD>) at /home/wtwhite/code/xmp/src/tbr.c:960
#10 0x000000000040c67f in ImproveInitialUpperBoundViaTbr (td=0x63efc0 <gTD>) at /home/wtwhite/code/xmp/src/common.c:2625
#11 0x0000000000407cc8 in InitTreeData (cd=0x63f110 <gCD>, td=0x63efc0 <gTD>) at /home/wtwhite/code/xmp/src/common.c:1220
#12 0x000000000040447a in main (argc=2, argv=0x7fffffffe588) at /home/wtwhite/code/xmp/src/fastdnamp.c:90
(gdb)

Workaround: --tbr=N to turn this off. Consider specifying an upper bound you know (or guess one) with -b.

This occurs with DEBUG on or off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions