Something is fishy with byte arrays on big endian systems
The recent containers
0.6.2.1 release (which introduced byte arrays usage into Data.Graph
and is shipped with GHC 8.6 and later) seems to have uncovered some endianness issues on big enidan systems (S390x and PowerPC).
This has been reported as #15411 (closed) and #16973 (closed) but they both comment on the symptom. I am opening this to track the underlying cause.
For those affected by this issue there is a patch to disable unboxed array usage in containers
which can be used to workaround the issue until it is fixed.