Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002283graphvizDotpublic2013-05-15 17:272014-01-10 13:12
Reporterjhg 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusnewResolutionopen 
PlatformIntelOSWindowsOS VersionWin7-X64
Summary0002283: dot infinite loop in gvc.dll
Descriptiondot being executed from SchemaSpy goes into infinite loop (left it running overnight and it's still churning at 100% of 1 CPU).

Command was (some details obfuscated)

C:\dev\temp>java -jar c:\dev\tools\misc\schemaSpy_5.0.0.jar -t pgsql -dp c:\dev\tools\PostgreSQL\pgJDBC\postgresql-9.1-901.jdbc4.jar -host d
b001.dev.company.pvt:15432 -db jhg_etl_test -u userid -s schema -p password -o schema

Output was:

Using database properties:
  [c:\dev\tools\misc\schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
Gathering schema details....................................................................................(8sec)
Writing/graphing summary............(1sec)
Writing/diagramming details...............................................

That's where it stopped with dot running as a subprocess.

In Sysinternals Process Explorer, there is only one thread running, and the stack looks like this:

gvc.dll!rank2+0xa0e
gvc.dll!rank2+0x968
gvc.dll!rank2+0x795
gvc.dll!rank2+0x2241
gvc.dll!rank2+0x1d8
gvc.dll!rank+0x4e
gvc.dll!gvusershape_file_release+0x7376
gvc.dll!gvusershape_file_release+0x8810
gvc.dll!gvusershape_file_release+0x7676
gvc.dll!make_label+0x14b
gvc.dll!common_init_node+0x15f
gvc.dll!graph_init+0xcae
gvc.dll!gvLayoutJobs+0x12e
dot.exe+0x1170
dot.exe+0x14bb
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36
Additional InformationAttached file is the input .dot
Tagshang, loop
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENT
VERSION
Attached Filesdot file icon wt_educator.1degree.dot [^] (12,749 bytes) 2013-05-15 17:27
dot file icon wt_educator.2degrees.dot [^] (41,609 bytes) 2013-05-15 17:28
dot file icon test_event_result_fact.1degree.dot [^] (23,699 bytes) 2013-05-15 19:54

- Relationships

-  Notes
User avatar (0000342)
jhg (reporter)
2013-05-15 19:54

I've debugged the Java code and extracted a command and input file that cause the infinite loop.

The command is:

dot -Tpng:gd c:\dev\temp\report\diagrams\test_event_result_fact.1degree.dot -oc:\dev\temp\report\diagrams\test_event_result_fact.1degree.png -Tcmapx

I can run this from the command line and reproduce the loop. The input file is attached.

Doing several stack snapshots with ProcessExplorer:

gvc.dll!rank2+0x9cd
gvc.dll!rank2+0x968
gvc.dll!rank2+0x795
gvc.dll!rank2+0x2241
gvc.dll!rank2+0x1d8
gvc.dll!rank+0x4e
gvc.dll!gvusershape_file_release+0x7376
gvc.dll!gvusershape_file_release+0x8810
gvc.dll!gvusershape_file_release+0x7676
gvc.dll!make_label+0x14b
gvc.dll!common_init_node+0x15f
gvc.dll!graph_init+0xcae
gvc.dll!gvLayoutJobs+0x12e
dot.exe+0x1170
dot.exe+0x14bb
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

The only line that ever changes is the first one.
User avatar (0000343)
jhg (reporter)
2013-05-15 20:18

More info:

I tried different output formats, renderers and layout engines, all with exactly the same results. The output with -v is:

C:\dev\temp>dot -Kosage -Tpng:gd c:\dev\temp\report\diagrams\zzz1.dot -oc:\dev\temp\report\diagrams\zzz1.png -vv
dot - graphviz version 2.30.1 (20130214.1330)
libdir = "C:\dev\tools\Graphviz2.30\bin"
Activated plugin library: gvplugin_pango.dll
Using textlayout: textlayout:cairo
Activated plugin library: gvplugin_neato_layout.dll
Using layout: osage:neato_layout
Activated plugin library: gvplugin_gd.dll
Using render: gd:gd
Using device: png:gd:gd
The plugin configuration file:
        C:\dev\tools\Graphviz2.30\bin\config6
                was successfully loaded.
    render : cairo dot fig gd gdiplus 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 emf emfplus eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg metafile pdf pic plai
n plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp xdot
    loadimage : (lib) bmp eps gd gd2 gif jpe jpeg jpg png ps svg
fontname: "Helvetica" resolved to: (ps:pango Arial, ) (PangoCairoWin32Font) "Arial 10.9990234375"
network simplex: 55 nodes 108 edges maxiter=2147483647 balance=2
User avatar (0000344)
jhg (reporter)
2013-05-15 20:26

Sysinternals ProcessMonitor shows the process not issuing ANY system calls. It's in a very hard loop.
User avatar (0000345)
jhg (reporter)
2013-05-15 20:41

Version 2.31.20130515 also has the same problem
User avatar (0000346)
jhg (reporter)
2013-05-16 14:05

This is a Windows-only problem. Everything runs successfully on RHEL6
User avatar (0000347)
stuandgravy (reporter)
2013-05-24 00:51

Same issue on a Windows 2003 Server. Issue replicated in:

2.31.20130523
2.30.1
2.30

Issue does not exist in 2.28.0.
User avatar (0000666)
roaming (reporter)
2014-01-10 13:12
edited on: 2014-01-10 13:14

i had the same problem with schemaspy and dot running in an infinite loop, using graphviz 2.34 on windows 64bit. It was solved by installing the latest dev version of graphviz 2.35


- Issue History
Date Modified Username Field Change
2013-05-15 17:27 jhg New Issue
2013-05-15 17:27 jhg File Added: wt_educator.1degree.dot
2013-05-15 17:27 jhg Tag Attached: hang
2013-05-15 17:27 jhg Tag Attached: loop
2013-05-15 17:28 jhg File Added: wt_educator.2degrees.dot
2013-05-15 19:54 jhg Note Added: 0000342
2013-05-15 19:54 jhg File Added: test_event_result_fact.1degree.dot
2013-05-15 20:18 jhg Note Added: 0000343
2013-05-15 20:26 jhg Note Added: 0000344
2013-05-15 20:41 jhg Note Added: 0000345
2013-05-16 14:05 jhg Note Added: 0000346
2013-05-24 00:51 stuandgravy Note Added: 0000347
2014-01-10 13:12 roaming Note Added: 0000666
2014-01-10 13:14 roaming Note Edited: 0000666 View Revisions


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