Number: 1778
Title: dot aborts in pgram.dot
Submitter: Philipp Thomas
Date: Wed Sep 30 08:44:53 2009
Subsys: Dot
Version: 2.20
System: x86-Linux-openSUSE 11.2 Milestone8
Severity: major
Problem:
As you can see in https://bugzilla.novell.com/show_bug.cgi?id=542703

dot from graphviz 2.20 chokes on pgram.dot supplied with the package:

dot -v -Tps /usr/share/graphviz/graphs/directed/pgram.dot


Activated plugin library: libgvplugin_pango.so.5
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_dot_layout.so.5
Using layout: dot:dot_layout
Activated plugin library: libgvplugin_core.so.5
Using render: ps:core
Using device: ps:ps:core
The plugin configuration file:
        /usr/lib64/graphviz/config
                was successfully loaded.
    render      :  cairo dot fig gd map ps svg tk vml vrml xdot
    layout      :  circo dot fdp neato nop nop1 nop2 twopi
    textlayout  :  textlayout
    device      :  bmp canon cmap cmapx cmapx_np dia dot eps fig gd gd2 gif
    gtk hpgl ico imap imap_np ismap jpe jpeg jpg mif mp pcl pdf pic plain
    plain-ext png ps ps2 svg svgz tif tiff tk vml vmlz vrml vtx wbmp xdot
    xlib
    loadimage   :  (lib) gd gd2 gif jpe jpeg jpg png ps svg xbm
fontname: "Times-Roman" resolved to: (ps) "Arial 14"
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross test: 0 crossings, 0.00 secs.
network simplex: 111 nodes 160 edges 19 iter 0.00 sec
Aborted

When checking with gdb I get:


Program received signal SIGABRT, Aborted.
0x00007ffff76284e5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
        in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) where
#0  0x00007ffff76284e5 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff76299b0 in abort () at abort.c:88
#2  0x00007ffff71ebc6e in growdq (newdqn=<value optimized out>) at shortest.c:559
#3  Pshortestpath (newdqn=<value optimized out>) at shortest.c:124
#4  0x00007ffff7b92369 in _routesplines (pp=0x8, npoints=<value optimized out>, polyline=<value optimized out>) at routespl.c:466
#5  0x00007ffff31fd6d5 in make_flat_edge (sp=<value optimized out>, P=0x69fd10, edges=<value optimized out>, ind=<value optimized out>, cnt=<value optimized out>,
    et=<value optimized out>) at dotsplines.c:1242
#6  0x00007ffff31fc664 in _dot_splines (g=<value optimized out>, normalize=<value optimized out>) at dotsplines.c:393
#7  0x00007ffff31f1cee in t (g=0x617de0) at dotinit.c:212
#8  0x00007ffff7b81310 in gvLayoutJobs (gvc=<value optimized out>, g=0x617de0) at gvlayout.c:69
#9  0x0000000000400ddc in main (argc=<value optimized out>, argv=0x7fffffffdfe8) at dot.c:180

So the abort is in shortest.c(growdq) when malloc fails. What irritates me is that the message from perror doesn't seem to be printed.

Question now is if this is a bug in dot or is there just not enough memory available (x86-64 aka AMD64 with 3 GiB Memory).

As told in the report, it's pgram.dot from the graphviz examples.
Input file: b1778.dot
Comments:
[erg] I am unable to reproduce this on our Linux server with version 2.25. Maybe John can get it to fail.

In any case, the bug is very strange, in that the input graph is small and the call to malloc only occurs on the first call of growdq, in which case, it asks for 96 bytes. So memory should not be an issue.

I'm wary of all of those values optimized out in the traceback.
Owner: *
Status: *