Opened 20 months ago

Last modified 20 months ago

#9253 new bug

"internal error: evacuate(static): strange closure type 0" when running in QEMU

Reported by: ocharles Owned by: simonmar
Priority: normal Milestone:
Component: Runtime System Version: 7.8.2
Keywords: Cc: simonmar
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


We're trying to use NixOS to automatically run our acceptance tests in a VM on commit, in order to guarantee system stability. However, we're periodically seeing our web server component, compiled with GHC 7.8.2 is failing to start up. When it fails, the error message is always:

internal error: evacuate(static): strange closure type 0
(GHC version 7.8.2 for x86_64_unknown_linux)
Please report this as a GHC bug:

Happy to do more debugging on this, but I'll need to be pointed in the right direction.

Change History (3)

comment:1 Changed 20 months ago by ocharles

I should point out that the exact same code doesn't fail when we run it on bare metal, so it seems to be something specific to running in QEMU. This also doesn't always happen, but it certainly feels like it happens more often than not. We're building this executable with:

ghc-options: -Wall -O2 -threaded -rtsopts

We run the server with:

${metronomeConfig.package}/bin/metronome-server -c ${} +RTS -k1M

comment:2 Changed 20 months ago by ocharles

Here's the compiler flags that were used:

configure flags: --disable-split-objs --disable-library-profiling --enable-shared --enable-library-vanilla --enable-executable-dynamic --disable-tests -fsystemdLogging --ghc-option=-optl=-Wl,-rpath=/nix/store/blagiv17bwhqhnpqv6jbkyhd8i1dnig5-metronome-0.1.0/lib/ghc-7.8.2/metronome-0.1.0
Configuring metronome-0.1.0...

The full build log can be seen at

Last edited 20 months ago by ocharles (previous) (diff)

comment:3 Changed 20 months ago by simonmar

Debugging this will require a fair bit of knowledge of GHC internals, so if you want to tackle it yourself then head over to Commentary/Rts and Debugging/CompiledCode.

If you can find a smaller test case that demonstrates the problem and you can distribute, please add it here and I'll take a look.

I'm wondering whether this is the same thing as #7320.

Note: See TracTickets for help on using tickets.