Skip to content
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

FAIL: test_graphviz_regression_tests (Graphviz on macOS with multi.dot) #233

Open
rex4539 opened this issue Jun 1, 2020 · 16 comments
Open

Comments

@rex4539
Copy link

rex4539 commented Jun 1, 2020

Latest master.

FAIL: test_graphviz_regression_tests (__main__.TestGraphAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./pydot_unittest.py", line 210, in test_graphviz_regression_tests
    self._render_and_compare_dot_files(path)
  File "./pydot_unittest.py", line 229, in _render_and_compare_dot_files
    graphviz_sha = self._render_with_graphviz(fpath, encoding)
  File "./pydot_unittest.py", line 191, in _render_with_graphviz
    assert process.returncode == 0, stderr_data
AssertionError: b''
@peternowee
Copy link
Member

Hmm, difficult, because the error message does not give much information. I am not even sure if the test script could not find the Graphviz executable, or that the Graphviz executable ran, but returned an error code.

The preceding call to _render_with_pydot of line 228 was obviously successful and that depends on Graphviz as well, even though it goes through pydot then. pydot has some special tweaks for finding Graphviz executables under Anaconda on Windows and those tweaks may be missing from _render_with_graphviz in the test suite.

How did you install Graphviz? Using anaconda/conda/conda-forge on Windows perhaps?

Otherwise maybe edit the assert statement of line 191 to see if we can get some more information:

assert process.returncode == 0, (stdout_data, stderr_data, process.returncode)

@rex4539
Copy link
Author

rex4539 commented Jun 15, 2020

Graphviz is installed on macOS using MacPorts.

@rex4539
Copy link
Author

rex4539 commented Jun 15, 2020

FAIL: test_graphviz_regression_tests (__main__.TestGraphAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "pydot_unittest.py", line 210, in test_graphviz_regression_tests
    self._render_and_compare_dot_files(path)
  File "pydot_unittest.py", line 229, in _render_and_compare_dot_files
    graphviz_sha = self._render_with_graphviz(fpath, encoding)
  File "pydot_unittest.py", line 191, in _render_with_graphviz
    assert process.returncode == 0, (stdout_data, stderr_data, process.returncode)
AssertionError: (b'\xff\xd8\xff\xe0\x00\x10JFIF\x00\x01\x01\x00\x00H\x00H\x00\x00\xff\xe1\x00LExif\x00\x00MM\x00*\x00\x00\x00\x08\x00\x01\x87i\x00\x04\x00\x00\x00\x01\x00\x00\x00\x1a\x00\x00\x00\x00\x00\x03\xa0\x01\x00\x03\x00\x00\x00\x01\x00\x01\x00\x00\xa0\x02\x00\x04\x00\x00\x00\x01\x00\x00\x00S\xa0\x03\x00\x04\x00\x00\x00\x01\x00\x00\x00\x9b\x00\x00\x00\x00\xff\xc0\x00\x11\x08\x00\x9b\x00S\x03\x01"\x00\x02\x11\x01\x03\x11\x01\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\xff\xc4\x00\xb5\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01}\x01\x02\x03\x00\x04\x11\x05\x12!1A\x06\x13Qa\x07"q\x142\x81\x91\xa1\x08#B\xb1\xc1\x15R\xd1\xf0$3br\x82\t\n\x16\x17\x18\x19\x1a%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xc4\x00\x1f\x01\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\xff\xc4\x00\xb5\x11\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04\x00\x01\x02w\x00\x01\x02\x03\x11\x04\x05!1\x06\x12AQ\x07aq\x13"2\x81\x08\x14B\x91\xa1\xb1\xc1\t#3R\xf0\x15br\xd1\n\x16$4\xe1%\xf1\x17\x18\x19\x1a&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xdb\x00C\x00\x02\x02\x02\x02\x02\x02\x03\x02\x02\x03\x05\x03\x03\x03\x05\x06\x05\x05\x05\x05\x06\x08\x06\x06\x06\x06\x06\x08\n\x08\x08\x08\x08\x08\x08\n\n\n\n\n\n\n\n\x0c\x0c\x0c\x0c\x0c\x0c\x0e\x0e\x0e\x0e\x0e\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\x0f\xff\xdb\x00C\x01\x02\x02\x02\x04\x04\x04\x07\x04\x04\x07\x10\x0b\t\x0b\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\x10\xff\xdd\x00\x04\x00\x06\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00?\x00\xfd\xfc\xa2\x8a\xf0\xcf\x8b\x9f\x1c\xb4\xaf\x86\xb7\x9aw\x83\xf4-*\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xbd\xb5\x93\x1e\xe61\xf4\xa5\xff\x00\x86\x87\xf8\x9by\xfb\xbd\x17\xf6|\xf1\xb4\x93\x1e\x82\xf2m\x02\xce<\xfb\xbbj\xad\x81\xf8W\xd5TP\x07\xca-\xe3\x0f\xdb\x0f\xc5\x7f\xba\xf0\xff\x00\xc3\xbf\r\xf8\x163\xd6\xe7\xc4\x1a\xd4\x9a\xa4\xc0\x1fK=6\x15BG\xa7\xdb\x00\xf7\xa8?\xe1\x985\x0f\x1e\xc8\xb7?\xb4\x7f\x8f5\x1f\x88\xb0\x82\x1b\xfb\x16\x14\x1a7\x87r9\x02K\x0bf2\\\x80{]O2\x9f\xee\xd7\xd6\xb4P\x06~\x95\xa4\xe9Z\x16\x9bm\xa3hvp\xe9\xda}\x94k\x14\x16\xd6\xf1\xac0\xc5\x1a\x8c*$h\x02\xaa\x81\xd0\x00\x00\xad\n(\xa0\x02\x8a(\xa0\x0f\xff\xd9', b'', -11)

@peternowee
Copy link
Member

That was quick, thanks. That long binary string is a JPG file:

output

So that means that the Graphviz executable was found and somewhat works, but for some reason also returns an error code -11 instead of the expected 0. I do not know enough about Graphviz exit codes and could not quickly find any mention of -11.

I am not sure, but the image looks like it could be the output of pydot/test/graphs/multi.dot, which is a file containing two DOT graph descriptions. Perhaps the Graphviz version you are using responds differently to such files. Perhaps because of recent changes in Graphviz, or because something OS-related. Could you maybe try the following:

$ cd pydot/test/graphs
$ dot -v -Tjpe multi.dot >multi.jpg
$ echo $?

Be sure to run echo $? directly after the dot command. It should show the exit code.

$ ls -l multi.jpg
$ shasum -a 256 multi.jpg

(Or sha256sum multi.jpg.)

In my case:

$ dot -v -Tjpe multi.dot >multi.jpg
dot - graphviz version 2.40.1 (20161225.0304)
Using render: cairo:cairo
libdir = "/usr/lib/x86_64-linux-gnu/graphviz"
Activated plugin library: libgvplugin_gdk.so.6
Using device: jpe:cairo:gdk
Activated plugin library: libgvplugin_dot_layout.so.6
Using layout: dot:dot_layout
The plugin configuration file:
	/usr/lib/x86_64-linux-gnu/graphviz/config6a
		was successfully loaded.
    render	:  cairo dot dot_json fig gd json json0 map mp pic pov ps svg tk vml vrml xdot xdot_json
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  bmp canon cmap cmapx cmapx_np dot dot_json eps fig gd gd2 gif gtk gv ico imap imap_np ismap jpe jpeg jpg json json0 mp pdf pic plain plain-ext png pov ps ps2 svg svgz tif tiff tk vml vmlz vrml wbmp x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage	:  (lib) bmp eps gd gd2 gif ico jpe jpeg jpg png ps svg xbm
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  Nimbus Roman No9 L,  REGULAR) (PangoCairoFcFont) "Nimbus Roman No9 L, Regular" /usr/share/fonts/type1/gsfonts/n021003l.pfb
network simplex:  2 nodes 1 edges maxiter=2147483647 balance=1
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
Maxrank = 1, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross G: 0 crossings, 0.00 secs.
network simplex:  3 nodes 2 edges maxiter=2147483647 balance=2
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
routesplines: 1 edges, 3 boxes 0.00 sec
Using render: cairo:cairo
Using device: jpe:cairo:gdk
dot: allocating a 50K cairo image surface (83 x 155 pixels)
gvRenderJobs G: 0.00 secs.
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
network simplex:  2 nodes 1 edges maxiter=2147483647 balance=1
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
Maxrank = 1, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross H: 0 crossings, 0.00 secs.
network simplex:  3 nodes 2 edges maxiter=2147483647 balance=2
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
routesplines: 1 edges, 3 boxes 0.00 sec
Using render: cairo:cairo
Using device: jpe:cairo:gdk
dot: allocating a 50K cairo image surface (83 x 155 pixels)
gvRenderJobs H: 0.00 secs.
$ echo $?
0
$ ls -l multi.jpg 
-rw-r--r-- 1 peter peter 6541 Jun 15 19:39 multi.jpg
$ shasum -a 256 multi.jpg
4cd401a9e8e6db92cf10b661a9eb2be3f89d5f23f2eb1236b0290659688df8a4  multi.jpg

The multi.jpg I get is actually a concatenation of two JPG files, of which image viewers will normally only show the first one:
multi
(If you use a hex editor on this JPG file, you will find two JFIF strings, and it is possible to split the file in two valid JPG files actually. I know a concatenation of two JPG files in one file is strange output, but a DOT-file containing a concatenation of two DOT strings is strange input to begin with. :) )

The JPG file in the stdout of your last comment seems to really contain only a single JPG file (4250 bytes, SHA256: f486a2bcd5f64c965f541fc5532408ceb67a069a434d08c71eccd6121171bc06), so if that indeed came from multi.dot, it would mean that something may have changed in Graphviz behavior recently, or that it behaves differently on macOS. Hope you can confirm that.

@rex4539
Copy link
Author

rex4539 commented Jun 15, 2020

/Users/rex  rex@MacBook-Pro-2018% cd pydot/test/graphs
/Users/rex/pydot/test/graphs on branch master rex@MacBook-Pro-2018% dot -v -Tjpe multi.dot >multi.jpg
dot - graphviz version 2.40.1 (20161225.0304)
libdir = "/opt/local/lib/graphviz"
Activated plugin library: libgvplugin_quartz.6.dylib
Using render: quartz:quartz
Using device: jpe:quartz:quartz
Activated plugin library: libgvplugin_dot_layout.6.dylib
Using layout: dot:dot_layout
The plugin configuration file:
	/opt/local/lib/graphviz/config6
		was successfully loaded.
    render	:  cairo dot dot_json fig gd json json0 lasi map mp pic pov ps quartz svg tk vml vrml xdot xdot_json
    layout	:  circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi
    textlayout	:  textlayout
    device	:  bmp canon cgimage cmap cmapx cmapx_np dot dot_json eps exr fig gd gd2 gif gv icns ico imap imap_np ismap jp2 jpe jpeg jpg json json0 mp pct pdf pic pict plain plain-ext png pov ps ps2 psd sgi svg svgz tga tif tiff tk vml vmlz vrml wbmp webp x11 xdot xdot1.2 xdot1.4 xdot_json xlib
    loadimage	:  (lib) bmp eps gd gd2 gif jpe jpeg jpg pdf png ps svg webp xbm
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
fontname: "Times-Roman" resolved to: (ps:pango  Times,  REGULAR) (PangoCairoCoreTextFont) "Times" 
network simplex:  2 nodes 1 edges maxiter=2147483647 balance=1
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
Maxrank = 1, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross G: 0 crossings, 0.00 secs.
network simplex:  3 nodes 2 edges maxiter=2147483647 balance=2
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
routesplines: 1 edges, 3 boxes 0.00 sec
Using render: quartz:quartz
Using device: jpe:quartz:quartz
gvRenderJobs G: 0.00 secs.
pack info:
  mode   undefined
  size   0
  flags  0
  margin 8
pack info:
  mode   node
  size   0
  flags  0
network simplex:  2 nodes 1 edges maxiter=2147483647 balance=1
network simplex: 2 nodes 1 edges 0 iter 0.00 sec
Maxrank = 1, minrank = 0
mincross: pass 0 iter 0 trying 0 cur_cross 0 best_cross 0
mincross H: 0 crossings, 0.00 secs.
network simplex:  3 nodes 2 edges maxiter=2147483647 balance=2
network simplex: 3 nodes 2 edges 0 iter 0.00 sec
routesplines: 1 edges, 3 boxes 0.00 sec
Using render: quartz:quartz
Using device: jpe:quartz:quartz
zsh: segmentation fault  dot -v -Tjpe multi.dot > multi.jpg
/Users/rex/pydot/test/graphs on branch master rex@MacBook-Pro-2018% echo $?
139
/Users/rex/pydot/test/graphs on branch master rex@MacBook-Pro-2018% ls -l multi.jpg
-rw-r--r--  1 rex  staff  4250 Jun 15 21:35 multi.jpg
/Users/rex/pydot/test/graphs on branch master rex@MacBook-Pro-2018% shasum -a 256 multi.jpg
f486a2bcd5f64c965f541fc5532408ceb67a069a434d08c71eccd6121171bc06  multi.jpg

@peternowee
Copy link
Member

Thanks. The JPG output file is the same as your earlier assert output, so that confirms that the error is indeed caused by pydot/test/graphs/multi.dot, in combination with some problem with Graphviz.

Your Graphviz crashes (segmentation fault/ segfault) during rendering of the second graph. Your Graphviz version is the same as mine (2.40.1 (20161225.0304)), but uses a different rendering/formatting plugin (Quartz vs. cairo), so maybe the crash is related to that.

It won't be of any immediate help, but if you want to experiment some more, you can see what other jpe: renderers/formatters you have available and try those, for example:

$ dot -T:
$ dot -v -Tjpe:cairo:gdk multi.dot >multi-cairo-gdk.jpg
$ dot -v -Tjpe:cairo:gd multi.dot >multi-cairo-gd.jpg
$ dot -v -Tjpe:gd:gd multi.dot >multi-gd-gd.jpg
$ ls -l multi*jpg
$ shasum -a 256 multi*jpg

Results for me:

$ ls -l multi*jpg
-rw-r--r-- 1 peter peter 6669 Jun 15 22:40 multi-cairo-gd.jpg
-rw-r--r-- 1 peter peter 6541 Jun 15 22:40 multi-cairo-gdk.jpg
-rw-r--r-- 1 peter peter 6574 Jun 15 22:40 multi-gd-gd.jpg
$ shasum -a 256 multi*jpg
8016d382a8adf4de857d7086f093bd09b93ecb3cf3410f6058b5d0a2f1bf6c4d  multi-cairo-gd.jpg
4cd401a9e8e6db92cf10b661a9eb2be3f89d5f23f2eb1236b0290659688df8a4  multi-cairo-gdk.jpg
07d8643d2151adc2d7d31279cfd57cf0a6ae10282c6c48207205f6498a0d591e  multi-gd-gd.jpg

There is also the -O option, which makes Graphviz create and name multiple output files automatically:

$ dot -v -Tjpe multi.dot -O
$ ls -l multi*.jpe
-rw-r--r-- 1 peter peter 3266 Jun 15 23:27 multi.dot.2.jpe
-rw-r--r-- 1 peter peter 3275 Jun 15 23:27 multi.dot.jpe
$ shasum -a 256 multi*jpe
ed83e482c1040b6cceda0984e9b26a3fc77377393884965549f64f7eba62f49c  multi.dot.2.jpe
9bf02bca17285ca9c8faba1b64fcd375a83b6c9dc1f0776e94d7e4d9ccf189bc  multi.dot.jpe

However, the -O file output is not the stdout output that the pydot test currently expects, so this is not immediately useful.

If you want to get rid of the crash, you may need to ask on the Graphviz issue tracker. However, I do think they are already aware that multiple graphs in a single file can cause problems:

Here is some very recent, interesting talk between Graphviz authors about if they should spend their time on preventing crashes made by pathological inputs (in general):

Also, before you report to them, you should test with their latest version. It seems there has been quite some activity there in the last few months.

The DOT Language specification does not mention how many graphs a single file can contain. It does not even mention the word 'file', I think. The highest level it defines seems to be graph. See https://graphviz.gitlab.io/_pages/doc/info/lang.html.

For the rest I am not immediately sure if and how we should solve this in pydot. I don't think anyone wants to hard-code which renderers/formatters to use (if that solves it even). Detecting the Graphviz crash and then somehow just ignoring the test might be a possibility, but I am not really interested in implementing it. Maybe you could just move multi.dot out of the test directory until your Graphviz does not crash over it anymore.

By the way, I checked why this problem only happens with _render_with_graphviz, not with _render_with_pydot: That is because _render_with_pydot loops through the graphs from the file one by one, see pydot_unittest.py, line 198: for g in c:. We cannot really take care of that in the test suite for _render_with_graphviz, at least not easily. I guess the idea has always been that Graphviz does the same kind of looping internally.

Finally, be aware that even if you get Graphviz working, there is another issue with the multi.dot test that leads it to fail for current master. You will have to apply PR #211 to fix that. That is a different issue than this, though.

@powderluv
Copy link

powderluv commented Aug 27, 2020

hit the same issue on my OSX bigsur system.

dot -v -Tjpe:cairo:gdk multi.dot > multi_cairo_gdk.jpg is the only one that doesn't get recognized. the others like

$ dot -v -Tjpe:cairo:gd multi.dot >multi-cairo-gd.jpg
$ dot -v -Tjpe:gd:gd multi.dot >multi-gd-gd.jpg

work ok.

Here is the output of my dot -T:

(pyenv_3.8) foo@denali graphs % dot -T:
Format: ":" not recognized. Use one of: bmp:quartz:quartz bmp:cairo:quartz canon:dot:core cgimage:quartz:quartz cmap:map:core cmapx:map:core cmapx_np:map:core dot:dot:core dot_json:json:core eps:ps:core eps:cairo:cairo exr:quartz:quartz exr:cairo:quartz fig:fig:core gd:cairo:gd gd:gd:gd gd2:cairo:gd gd2:gd:gd gif:cairo:gd gif:quartz:quartz gif:cairo:quartz gif:gd:gd gv:dot:core icns:quartz:quartz icns:cairo:quartz ico:quartz:quartz ico:cairo:quartz imap:map:core imap_np:map:core ismap:map:core jp2:quartz:quartz jp2:cairo:quartz jpe:quartz:quartz jpe:cairo:quartz jpe:cairo:gd jpe:gd:gd jpeg:quartz:quartz jpeg:cairo:quartz jpeg:cairo:gd jpeg:gd:gd jpg:quartz:quartz jpg:cairo:quartz jpg:cairo:gd jpg:gd:gd json:json:core json0:json:core mp:mp:core pct:quartz:quartz pct:cairo:quartz pdf:cairo:cairo pdf:quartz:quartz pic:pic:core pict:quartz:quartz pict:cairo:quartz plain:dot:core plain-ext:dot:core png:cairo:cairo png:quartz:quartz png:cairo:quartz png:cairo:gd png:gd:gd pov:pov:core ps:ps:core ps:cairo:cairo ps2:ps:core psd:quartz:quartz psd:cairo:quartz sgi:quartz:quartz sgi:cairo:quartz svg:svg:core svg:cairo:cairo svgz:svg:core tga:quartz:quartz tga:cairo:quartz tif:quartz:quartz tif:cairo:quartz tiff:quartz:quartz tiff:cairo:quartz tk:tk:core vdx:visio:visio vml:vml:core vmlz:vml:core vrml:vrml:gd wbmp:cairo:gd wbmp:gd:gd webp:cairo:webp xdot:xdot:core xdot1.2:xdot:core xdot1.4:xdot:core xdot_json:json:core

@peternowee
Copy link
Member

@powderluv Thanks for sharing your findings. Just a few more questions for clarity:

  • When you say that jpe:cairo:gd and jpe:gd:gd work ok, do you mean the exit code was 0 as well? (You can check this by issuing echo $? immediately after dot).
  • Could you also check what the exit codes are of jpe:quartz:quartz and jpe:cairo:quartz?

Maybe just the entire output of:

$ dot -v -Tjpe:quartz:quartz multi.dot >multi-quartz-quartz.jpg
$ echo $?
$ dot -v -Tjpe:cairo:quartz multi.dot >multi-cairo-quartz.jpg
$ echo $?
$ dot -v -Tjpe:cairo:gd multi.dot >multi-cairo-gd.jpg
$ echo $?
$ dot -v -Tjpe:gd:gd multi.dot >multi-gd-gd.jpg
$ echo $?
$ ls -l multi*jpg
$ shasum -a 256 multi*jpg

I am trying to pinpoint exactly which combination of graphic libraries leads to problems. We may need this when we start to discuss this issue with others, such as Graphviz or one of those graphics libraries (Cairo/Quartz/GD).

That jpe:cairo:gdk is not found, is probably because the GDK library is not part of OSX by default. No need to install GDK though, because the test suite should just work with the default libraries.

@powderluv
Copy link

quartz:quartz crashes with exit code 139. Others all return 0.

zsh: segmentation fault dot -v -Tjpe:quartz:quartz multi.dot > multi-quartz-quartz.jpg
(pyenv_3.8) powderluv@denali graphs % echo $?
139

(pyenv_3.8) foo@denali graphs % ls -l multijpg
-rw-r--r-- 1 foo staff 6687 Aug 30 14:09 multi-cairo-gd.jpg
-rw-r--r-- 1 foo staff 8445 Aug 30 14:09 multi-cairo-quartz.jpg
-rw-r--r-- 1 foo staff 6521 Aug 30 14:10 multi-gd-gd.jpg
-rw-r--r-- 1 foo staff 0 Aug 30 14:09 multi-quartz-quartz.jpg
(pyenv_3.8) foo@denali graphs % shasum -a 256 multi
jpg
ae6b2f60e41b9de3109a55ec7e18a366ca2bb229779c610bad6f24fcc3298487 multi-cairo-gd.jpg
b441a25150ee34cecfe65f4f2f7e5b7a3e9c8af12bada44e0fb4c5401d4525ae multi-cairo-quartz.jpg
a62889ea071429000adbfdc1322775837544573c966cc83434f4f05677b1401a multi-gd-gd.jpg
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 multi-quartz-quartz.jpg

I have attached the backtrace of the crash in dot to help debug it.
dot_2020-08-30-141613_denali.crash.txt

@peternowee
Copy link
Member

peternowee commented Sep 3, 2020

@powderluv Sorry for the delay. Interesting stuff.

  • First, it shows that the crash is specific to quartz-as-a-renderer, not to quartz-as-a-formatter, because quartz:quartz crashes and cairo:quartz does not. The first field refers to the renderer, the second to the formatter, see Command-line Invocation.

    • I guess quartz refers to Quartz 2D, which is closed source I guess? Or not? At least I could not quickly find something like a public issue tracker for it. This Apple Quartz 2D Programming Guide refers to a "quartz-dev" mailing list, but the mailing list server that it points to does not have that list anymore. Archives elsewhere indicate that the mailing list was closed in 2018-01.
    • There are 22 quartz-issues in the Graphviz issue tracker, but I could not immediately see any related to this issue. For example, 1320 (Graphviz crashes on Mac during render using Quartz) seems close judging by the title, but has a very different input and backtrace. The 2 merge requests mentioning quartz are 6 years old and merged already. I did not have time to look at the 37 comments, 38 code and 43 commits in the other tabs of the search results.
  • Second, the backtrace:

    • I searched for some of the terms mentioned in there and a search for gvrender_end_job in the Graphviz issue tracker led me (again) to https://gitlab.com/graphviz/graphviz/issues/1377 (graphviz produces incorrect output when input file contains multiple graphs). That issue from 2018 (still open at the moment) discusses that Graphviz executes one of their tests called multi.gv in a way that "does not look correct". Looking at their multi.gv, I found it was identical to the multi.dot in pydot's test suite that we are discussing here! Turns out that pydot's test/graph directory was actually copied from Graphviz! Learned something new again.
    • The reporter of 1377 also linked to an earlier report (1356, also still open) of macOS 10.13.3 segfaulting on a very similar input of two (empty) digraph: https://gitlab.com/graphviz/graphviz/-/issues/1356 (SEGV for input file with two digraphs).
    • It seems to me that issue 1377 is more about the general problem with the code logic and 1356 is about a particular manifestation of that problem as a crash under specific circumstances (e.g. macOS or quartz). The reporter of 1377 also says it "produces odd-to-invalid output - depending on the output format selected".

So, seeing that at the core this is a Graphviz crash on a Graphviz test, this really needs to be reported there, possibly as a comment to 1356 and/or 1377. Would you be willing to do that? I can also do it, but I do not use macOS myself, so I would just be in the middle if they have any follow-up questions.

Finally, I thought about if we could do something more here at pydot while we are waiting for Graphviz. For example, disable this specific test under specific circumstances (e.g. macOS), or explicitly set a different renderer than Quartz. Because, for us, our test suite should be testing pydot, not Graphviz. However, I also do not want to change the test suite too easily. I guess it also depends on how quickly we can expect a solution from Graphviz and how well we can target such exceptions. For now, I suggest we at least keep this issue here at pydot open for such discussions.

@powderluv
Copy link

Thank you for digging into it. I dont think i care as much about using quartz just that the pydot test fails on a OSX Big Sur install. So if you have a way to skip those tests on OSX we should be good. We can cross post the issue with Graphviz if required to fix properly.

Thanks

@peternowee
Copy link
Member

So if you have a way to skip those tests on OSX we should be good.

Well, actually I was trying to say that I do not feel for disabling tests so easily. Only if it becomes clear Graphviz is not planning to solve this anytime soon, and then still I am not even sure if that should be a blanket disabling of the test on macOS. Maybe some macOS users are not affected by this issue at all, for example. Also, if one day the issue gets solved at Graphviz and we re-enable the test after it having been disabled for a long time, we will get complaints again from users still on older, affected Graphviz-versions. In that case, we may better start our test suite with determining what kind of Graphviz executable we are dealing with and adapt our tests based on that.

So, for now, I would prefer to just suggest affected users who want to skip this test to temporarily remove pydot/test/graphs/multi.dot. Maybe they can give a +1 to this issue or leave a comment, so that we can get some feel for how many users are affected and maybe find out some more details along the way. Hope you can agree.

We can cross post the issue with Graphviz if required to fix properly.

Yes, I think we can agree that that is required. Question is: Are you available to do that? Because I would prefer an affected user to take the initiative. If not you, then maybe the OP. I am available to help and chime in where necessary, of course. I can also take the lead, but then things may go a lot slower, because I am not affected myself, I do not have any access to macOS and my time is spent on other pydot-issues as well. Just let me know what you prefer. No pressure, because your help so far has been very valuable already, so thank you for that.

@powderluv
Copy link

This seems like this issue here: https://gitlab.com/graphviz/graphviz/-/issues/1320

I tried to build with the solution recommended at the end but ran into some compile errors. I agree this should be tracked with graphviz. Thanks for the quick responses.

@peternowee
Copy link
Member

I don't know. I noticed Graphviz issue 1320 during my searches in the Graphviz bug tracker as well, but considered it a different issue, because of the very different input and very different backtrace. But maybe it is true what Stephen C. North says there:

Possibly the bug has always been there, but Apple recently improved the argument checking in their API.

Maybe that is true for this bug as well, so both bugs surface because of some change that Apple made in supporting libraries, like stricter checking. But does that mean that they should both be reported in the same issue there? Maybe if there is one simple solution to solve them all at once, but I don't know. Graphviz issues 1377 indicates that there is something strange going on with input files with multiple graphs in Graphviz anyway, and I am not immediately seeing that back in 1320.

Anyway, wherever you choose to report (1320, 1377 or 1356), maybe at least mention the other issue numbers, so they can see for themselves if there is a connection. Thank you too, hope it goes well.

@peternowee peternowee changed the title FAIL: test_graphviz_regression_tests (__main__.TestGraphAPI) FAIL: test_graphviz_regression_tests (Graphviz on macOS with multi.dot) Sep 16, 2020
@peternowee peternowee added this to the Unplanned milestone Dec 26, 2020
@peternowee
Copy link
Member

peternowee commented Jul 1, 2021

@powderluv @rex4539 Wondering if there are any new findings on this issue? Did either of you ever find the cause of this issue? Did you ever try with Graphviz 2.42.0 or higher? Did you report it at Graphviz?

Asking because another Graphviz/macOS issue was reported yesterday in #270. Also, I noticed that Graphviz PR 1310 claimed to solve Graphviz issue 1320, which I thought was maybe related to your issue. It was merged in Graphviz 2.42.0.

@peternowee
Copy link
Member

The other Graphviz/macOS Big Sur issue (#270) was solved by upgrading Graphviz from 2.38.0 to the latest version 2.47.3.

Can someone with macOS Big Sur and a recent version of Graphviz (>=2.42.0, but preferably the latest) try to run the pydot test suite again? And if it still fails, the output of:

$ dot -v -Tjpe multi.dot >multi-default.jpg
$ echo $?
$ ls -l multi*jpg
$ shasum -a 256 multi*jpg

multi.dot can be found in the pydot source tree at test/graphs/multi.dot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants