[Bug 285706] GraphicsMagick on ARM64 reproducibly fails with "Too many args to microtask: 17!"

From: <bugzilla-noreply_at_freebsd.org>
Date: Thu, 27 Mar 2025 15:45:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285706

            Bug ID: 285706
           Summary: GraphicsMagick on ARM64 reproducibly fails with "Too
                    many args to microtask: 17!"
           Product: Ports & Packages
           Version: Latest
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: thomas.dreibholz@gmail.com

Steps to reproduce the problem:

gm convert -size 128x128 xc:yellow test.png
gm convert test.png -gravity center -extent 512x512 test2.png


Expected result:

"gm convert" creates test2.png, which would be the content of test.png embedded
into a larger frame.


Observed result:

The second command fails on ARM64 (but works fine in x86):
$ gm convert test.png -gravity center -extent 512x512 test2.png
Too many args to microtask: 17!
Too many args to microtask: 17!
...
(64 repetitions)


Some debugging:

The machine has 64 cores (using QEMU, not a real ARM64 CPU). Due to the 64
repetitions, I just tried to limit the number of threads:

OMP_NUM_THREADS=1 gm convert test.png -gravity center -extent 512x512 test2.png
-> this works!

$ OMP_NUM_THREADS=2 gm convert test.png -gravity center -extent 512x512
test2.png
Too many args to microtask: 17!
Too many args to microtask: 17!
-> this fails, with 2 repetitions of the error message.

=> Something seems to be wrong with GraphicsMagick's multi-threading on ARM64.

-- 
You are receiving this mail because:
You are the assignee for the bug.