-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dot] Dot.exe crashes #201
Comments
I am seeing this crash too, using the latest code. The stack trace is 100k deep.
|
How big is this graph? treesearch() in lib/dotgen2/ns.c is recursive, so on a large enough graph, it could It’s not likely we would go to the trouble of recoding ns.c to use an explicit
|
The graph that is crashing has 2866 nodes (the value of maxiter seen in the stack trace) and 5768 edges. Not that big. By the way this is in lib/common/ns.c, not lib/dotgen2/ns.c. |
Your initial graph isn't that big, but given the recursion depth, this is treesearch being run during node positioning, which includes all of the dummy nodes (clearly, at least 98109 nodes). On ubuntu, each stack frame is 48 bytes, and my stack limit is 8192 kb, so I could probably get away with it (98109*48/1000 = 4709kb), but any increase frame or decrease in stack limit, and it's over. Actually, I have been rewriting the various recursive algorithms over the years. treesearch must be one of the few remaining ones. |
What would be the side effects of adding a recursion limit to treesearch? In my application, I am willing to sacrifice quality for stability. By the way, I have made many local changes to sacrifice quality for speed as well. I will be working on some bottlenecks that showed up in profiling runs. I will search the issue list to see if they have been filed already. |
The trade-off here is not a straightforward one between speed and quality. It is conceivable that truncating the treesearch might cause real consistency problems. If one wants to speed things up, it should be done at a higher level. Note that Graphviz already provides nslimit and nslimit1 attributes which can be used to get a non-optimal ranking. (These won't help you unless you set them to 0, since any iteration will make a call to treesearch and blow your stack. And 0 iterations would probably be acceptable for the ranking phase, but I suspect it would be unacceptable for positioning.) There are other approaches that could be used. The one that has been in our queue for a while is to use 2 dummy nodes per edge, rather than one for each rank the edge crosses. But any of these would require serious coding. The quickest fix here would probably be to replace the recursion with iteration. |
I set nslimit and nslimit1 to 0 and this particular graph no longer crashes. Thanks for the suggestion. I can't change the stack limit (ulimit -s) because the machines it runs on are out of my control. |
Also for now you could just raise the stack size limit.
|
Ported Issue from Mantis
Original ID: 1843 Referenced attachment(s) only available in original Mantis DB
Reported By: Bernhard Seybold
SEVERITY: MAJOR
Submitted: 2010-03-22 08:13:11
OS: X86-WINDOWS-WIN7 X64
VERSION: 2.26.3
DESCRIPTION
dot.exe -v -Tjpg -O routes.dot
crashes (same happens with graphviz 2.27.20100201.0545)
Similar files work ok. Neato can process the file.
ADDITIONAL INFORMATION
[erg] It's a fairly large graph for dot. Here is the
trace log.
[erg] The stack is being blown in the recursive use of
treesearch() in ns.c. The graph in that phase has
752011 nodes and 1128201 edges.
The text was updated successfully, but these errors were encountered: