Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002226graphvizDotpublic2012-05-04 12:482012-06-08 17:51
ReporterMarcelo do Pagode 
Assigned To 
PrioritynormalSeverityimportantReproducibilityalways
StatusnewResolutionopen 
PlatformIntel Xeon quadcoreOSUbuntuOS Version11.10
Summary0002226: Segmentation fault on neato depending on sep and size of the graph
DescriptionWhen trying to generate a graph using neato with splines for a 17 nodes network (with fixed position for the nodes), I get either segmentation fault of glibc if the number of edges is sufficiently large and sep is not small enough.
If a given value of sep returns a segmentation fault, decreasing a little I get glibc and if I decrease it sufficiently, I get a clean run. Depending on the situation, that means that the output is not good for visualization due to the very small value of sep.
Steps To ReproduceWith the following graph, if sep=0.4 it works. sep=1 gives glibc and sep=2 gives segmentation fault. With this particular case the 0.4 value is ok for visualization, even though a larger value would be better, but for other cases I must set sep=0.2, get a glibc and manualy (ctrl+c) kill the process to get the graph, which ends up with some of the splines drawn as polylines.
Tagsneato, segmentation fault, sep, splines
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION2.29.20120501.0446 (20120501.0446) amd64
Attached Files? file icon plot.gv [^] (7,140 bytes) 2012-05-04 12:48

- Relationships

-  Notes
User avatar (0000242)
Marcelo do Pagode (reporter)
2012-05-04 12:50

Sorry, I wrote my machine's processor specs instead of the platform on the form.
User avatar (0000248)
erg (administrator)
2012-05-07 18:07

If I understand you, running neato on plot.gv should cause a segmentation fault, correct? What is the exact command you use to run neato? What do you get when you run neato with an added -v flag? Also, are you saying that when you get a crash, you can remove some edges (but leave the nodes alone) and the problem is fixed?
User avatar (0000249)
Marcelo do Pagode (reporter)
2012-05-07 19:02

Hi Erg,
I'm sorry, I should have stated that I get those problems running neato with an svg/png output (haven't tried other outputs), that is: neato -Tsvg plot.gv > plot.svg or the equivalent for png.

As for the edges/nodes, it's exactly as you said: removing some of the edges, it works okay. I'm working always with the same group of nodes (always with the same position assignment), only the edges changes from set to set. I haven't been able to sort out a specific problematic edge, it seems that is a combination of number of edges and a few problematic ones. For instance, I have noticed that edges that must avoid node 14 (4 <-> 15 or 6 <-> 11, for ex.) tends to be problematic.
As an example, one scenario that have fewer edges (in a number that usually works okay) but have the edge 4 -> 15 and 15 -> 4 gives me trouble even with sep=0.4. I have to set sep=0.1, get a glibc and ctrl+c the process to get my graph with those two edges not as splines, but polylines, giving the idea that the process have ended without finding the spline. If I remove just one of them (it does not matter if it is 4 -> 15 or 15 -> 4), neato works fine even with sep=1. If I remove all the other edges but keep edges 4 -> 15 and 15 -> 4 I get segmentation fault. I can attach this specific data here, if you want. On the other hand, removing just the edges that must avoid node 14 on the data that is posted here does not solve the problem.

This is the output adding the -v (with the dataset posted here):

neato -v -Tsvg plot.gv > plot.svg
neato - graphviz version 2.29.20120501.0446 (20120501.0446)
libdir = "/usr/lib/graphviz"
Activated plugin library: libgvplugin_pango.so.6
Using textlayout: textlayout:cairo
Activated plugin library: libgvplugin_core.so.6
Using render: svg:core
Using device: svg:svg:core
Activated plugin library: libgvplugin_neato_layout.so.6
Using layout: neato:neato_layout
The plugin configuration file:
    /usr/lib/graphviz/config6
        was successfully loaded.
    render : cairo dot eps fig gd lasi map pic pov ps svg tk vml vrml xdot
    layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout : textlayout
    device : bmp canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gtk gv ico imap imap_np ismap jpe jpeg jpg pdf pic plain plain-ext png pov ps ps2 svg svgz tga tif tiff tk vml vmlz vrml wbmp x11 xdot xlib
    loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg xbm
pack info:
  mode 0
  size 0
  flags 0
Scanning graph _anonymous_0, 17 nodes
model 0 smart_init 0 stresswt 2 iterations 200 tol 0.000100
convert graph: 17 nodes 0.00 sec
Calculating shortest paths: 0.00 sec
Setting initial positions: 0.00 sec: 0.00 sec
Setting up stress function: 0.00 sec
Solving model: 5435.550
final e = 5435.549438 2 iterations 0.00 sec
Edge separation: add=0 (2.600000,2.600000)
Creating edges using splines
Falha de segmentação


PS.: "Falha de segmentação" is segmentation fault in Portuguese.
User avatar (0000250)
erg (administrator)
2012-05-07 22:00

Thanks. This could be difficult. At present, I can't reproduce the problem and, what's worse, spline routing in neato is largely edge independent. There is either room to route every edge, or the code reverts to line segments. My only working hypothesis is that, due some numerical error, it appears there is sufficient space, but when the actual calculation is done for certain edges, the computation fails dramatically.

I'll try to reproduce it on some other machines, but if there is any way you could run the program under gdb and send me the stack trace back after the crash, that would be very helpful.
User avatar (0000251)
erg (administrator)
2012-05-08 09:44

I now realize that your graph has multiedges in it. In this case, the number of edges can affect the outcome. Also, a colleague has found a machine that exhibits the problem.
User avatar (0000252)
Marcelo do Pagode (reporter)
2012-05-08 11:10

First of all, thanks for your efforts Erg!
I tried to run it under gdb (by the way, it is the first time I'm using gdb, so I don't know exactly how to use it, but I'm trying).
Unfortunately, I just got a generic error and a warning that it couldn't find debugging symbols:

gdb neato
GNU gdb (Ubuntu/Linaro 7.3-0ubuntu2) 7.3-2011.08
Copyright (C) 2011 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-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>... [^]
Lendo símbolos de /usr/bin/neato...(no debugging symbols found)...concluído.
[Edit: "Lendo símbolos" means "Reading symbols", and "concluído" means "concluded"]
(gdb) run plot.gv
Starting program: /usr/bin/neato plot.gv
[Thread debugging using libthread_db enabled]
Cannot find new threads: generic error

I have a collaborator that has the same machine as mine, and the problem shows there too. I'll try on my laptop (also Ubuntu 11.10, but i386) and I'll see if I can get someone to try on windows and/or mac.
When I started looking for answers regarding some problems I was having with an older version of grahviz (the one that is in Ubuntu 11.10 repos), the guy that helped me in the stackoverflow forum told me that he could generate the graph without problems on a windows machine (http://stackoverflow.com/questions/10373994/how-to-use-neato-with-spline-and-avoid-mutual-edges-overlapping [^]), maybe there are some issues with the OS...
User avatar (0000253)
erg (administrator)
2012-05-08 11:14

There is an OS dependency. I have a pretty good idea where to look for the problem
now. Thanks.
User avatar (0000254)
Marcelo do Pagode (reporter)
2012-05-08 11:47

On my Ubuntu 11.10 i386 and the corresponding graphviz 2.29 package, I still get a crash for sep=1 or 2, but at least I get an error message that says something:
neato: malloc.c:4631: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.

Cheers.
User avatar (0000257)
Marcelo do Pagode (reporter)
2012-05-10 11:01
edited on: 2012-05-10 11:02

Hi Erg,
My friend tried this same data under winXP SP2, graphviz 2.29, and although the program does not return any errors, it does not generate the svg output either. We ran it with -v flag and also nothing wrong shows up, the verbose is exactly as if the program had run smoothly, but the svg file is blank.

Under which OS are you running graphviz?

Thanks for your help!

User avatar (0000261)
Marcelo do Pagode (reporter)
2012-06-08 17:51

Hi Erg,
Is there any news regarding this issue or any workaround I can use?

Thanks for your help.

- Issue History
Date Modified Username Field Change
2012-05-04 12:48 Marcelo do Pagode New Issue
2012-05-04 12:48 Marcelo do Pagode File Added: plot.gv
2012-05-04 12:50 Marcelo do Pagode Note Added: 0000242
2012-05-04 12:51 Marcelo do Pagode Tag Attached: neato
2012-05-04 12:51 Marcelo do Pagode Tag Attached: segmentation fault
2012-05-04 12:51 Marcelo do Pagode Tag Attached: sep
2012-05-04 12:51 Marcelo do Pagode Tag Attached: splines
2012-05-07 18:07 erg Note Added: 0000248
2012-05-07 19:02 Marcelo do Pagode Note Added: 0000249
2012-05-07 22:00 erg Note Added: 0000250
2012-05-08 09:44 erg Note Added: 0000251
2012-05-08 11:10 Marcelo do Pagode Note Added: 0000252
2012-05-08 11:14 erg Note Added: 0000253
2012-05-08 11:47 Marcelo do Pagode Note Added: 0000254
2012-05-10 11:01 Marcelo do Pagode Note Added: 0000257
2012-05-10 11:02 Marcelo do Pagode Note Edited: 0000257 View Revisions
2012-06-08 17:51 Marcelo do Pagode Note Added: 0000261


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker