Opened 8 years ago

Closed 8 years ago

#5381 closed bug (fixed)

internal error: MVAR_CLEAN on mutable list

Reported by: MikolajKonarski Owned by:
Priority: normal Milestone: 7.4.1
Component: Runtime System Version: 7.3
Keywords: MVAR_CLEAN Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


How to reproduce:

cabal update cabal install Allure --ghc-options="-dcore-lint -debug" -fvty $HOME/.cabal/bin/Allure

then press '.' a few times. (If nothing happens, press Q and try running it again.)

Allure: internal error: MVAR_CLEAN on mutable list GHC version 7.3.20110803 for x86_64_unknown_linux) Please report this as a GHC bug: Aborted

Without the debug options it segfaults much less often. I does not segfault at all, to my knowledge, when compiled with 6.12.3 and 7.0.*, even with the debug options. Neither of the other frontends (-fgtk nor -fcurses) compile with 7.3 right now, so I couldn't test those, but it may be informative to check them, as soon as the gtk2hs and/or hcurses libraries are updated to compile with 7.3.

Change History (8)

comment:1 Changed 8 years ago by MikolajKonarski

Ooof, wrong formatting and no Trac plugin/hack/permission to edit ticket descriptions. Let's insert semicolons instead:

cabal update; cabal install Allure --ghc-options="-dcore-lint -debug" -fvty; $HOME/.cabal/bin/Allure

comment:2 Changed 8 years ago by MikolajKonarski

Oh, now I realize, building is not so easy on 7.3 --- you have to build the last development version of MissingH and manually remove haskell98 from ConfigFile to make it compile. Perhaps others. But nothing too complex, I think.

comment:3 Changed 8 years ago by simonmar

Does this occur with 7.2.1RC or just 7.3?

comment:4 in reply to:  3 Changed 8 years ago by MikolajKonarski

Replying to simonmar:

Does this occur with 7.2.1RC or just 7.3?

No idea. I'm juggling 6.3.12 and 7.3 at the moment: the latter for spark log events, the former for threadscope (for gtk2hs). AFAIK, 7.2 does not help me with either.

comment:5 Changed 8 years ago by MikolajKonarski

JaffaCake: to avoid messing up the terminal when the crash happens, change the line

display area = D.display area . fst


display area _ a1 a2 a3 = D.startup (\ vty -> D.display area vty a1 a2 a3 >> D.shutdown vty)

in src/Display.hs in the Allure source code. Then press the dot key repeatedly, as before. Works for me, though it can crash your whole terminal emulator under right conditions, I'm sure.

comment:6 Changed 8 years ago by marlowsd@…

commit 7ed0b20c0828fef0987aa7b3dea5d5190844338c

Author: Simon Marlow <>
Date:   Mon Aug 8 09:12:08 2011 +0100

    fix #5381: the -debug RTS could crash with "internal error: MVAR_CLEAN
    on mutable list" after a call to tryPutMVar#.
    I don't think this leads to any problems without -debug.

 rts/PrimOps.cmm |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

comment:7 Changed 8 years ago by simonmar

Component: CompilerRuntime System
Milestone: 7.4.1
Status: newmerge

I fixed the cause of the error, as you'll see in the commit above. However, you mentioned segfaults, and I don't think this error can lead to any problems. I'll close this ticket, but please open a new one if you still encounter segfaults.

comment:8 Changed 8 years ago by simonmar

Resolution: fixed
Status: mergeclosed

on second thoughts, there's no need to merge (too late for 7.2.1 and we're not doing 7.2.2), I'll just close.

Note: See TracTickets for help on using tickets.