Bug 2526747 - graphviz 'cluster' crashes: SIGSEGV on -C 0 -c 1, SIGABRT on empty graph
Summary: graphviz 'cluster' crashes: SIGSEGV on -C 0 -c 1, SIGABRT on empty graph
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: graphviz
Version: 45
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Jaroslav Škarvada
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-09-01 12:19 UTC by Petr Sklenar
Modified: 2026-09-25 18:46 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-09-25 18:46:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2026-09-01 12:19:35 UTC
graphviz 'cluster' crashes on Fedora 45 (graphviz-15.1.1-1.fc45).

Two reproducers, both crash 100% of the time:

1) SIGSEGV (segfault) - option combination -C 0 -c 1:
   python3 -c 'print("graph G {"); [print(f"n{i} -- n{(i+1)%20000};") for i in range(20000)]; print("}")' > /tmp/big.dot
   cluster -C 0 -c 1 /tmp/big.dot
   -> Segmentation fault in Multilevel_MQ_Clustering_establish() <- main()

2) SIGABRT - empty graph:
   echo 'graph G {}' | cluster
   -> cluster: SparseMatrix.c:427: SparseMatrix_from_coordinate_arrays_internal: Assertion `m > 0 && n > 0' failed.

Expected: clean error exit, not a crash. Core dumps available.
Also reproduces on Fedora 44 (graphviz-14.1.4-2.fc44).

Found via automated crash-testing with Claude Code

Comment 1 Petr Sklenar 2026-09-01 12:26:31 UTC
[root@vm-10-0-185-12 ~]# cluster -C
cluster.c:96: claimed unreachable code was reached
Aborted                    (core dumped) cluster -C

[root@vm-10-0-185-12 ~]# /usr/bin/edgepaint -o --lightness -s -v --share_endpoint
edgepaintmain.c:231: claimed unreachable code was reached
Aborted                    (core dumped) /usr/bin/edgepaint -o --lightness -s -v --share_endpoint

[root@vm-10-0-185-12 ~]# cluster -C 0 -c 1 /tmp/big.dot
ncluster = 20000, mq = -0.000100
maxgain=0.000025, merge 0, 1
Segmentation fault         (core dumped) cluster -C 0 -c 1 /tmp/big.dot

Comment 2 Jaroslav Škarvada 2026-09-01 13:12:10 UTC
Upstream bug: https://gitlab.com/graphviz/graphviz/-/work_items/2857

Comment 3 Tom "spot" Callaway 2026-09-25 18:46:18 UTC
Fixed in 16.1.0 (in Rawhide/F46).


Note You need to log in before you can comment on or make changes to this bug.