[GHC] #13707: xmobar crashes with segmentation faults?

GHC ghc-devs at haskell.org
Thu Sep 28 09:44:22 UTC 2017


#13707: xmobar crashes with segmentation faults?
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  highest           |            Milestone:  8.2.1
       Component:  Compiler          |              Version:  8.2.1-rc2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Compile-time      |  Unknown/Multiple
  crash or panic                     |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Rufflewind):

 Okay, so I think I've found a semi-reliable way to reproduce the bug
 without waiting days.  You need to have two X screens (you can also have
 one X screen and one Linux terminal instead, but I got the impression that
 crashes are less reliable that way).  Suppose you have one screen on TTY1
 (Ctrl+Alt+F2) and another on TTY2 (Ctrl+Alt+F2).  I found the that if I
 have xmobar on one of them and repeatedly spam Ctrl+Alt+F1 and Ctrl+Alt+F2
 (*) to switch the screens back and forth, I can occasionally reproduce the
 crash.

 What I did essentially was to load 10 instances of xmobar and then switch
 screens repeatedly, and I could get it to crash fairly often.  In one
 particular run of 100 attempts, it crashed on the attempt 3, 5, 6, 10, 20,
 21, 21, 22, 33, 53, 54, 60, 60, 62, 69, 83, 85.  Two of the instances
 crashed one after the other on 21 and 60.  Therefore I conclude it has
 about a 2% chance of crashing each time the screen gets blanked.

 I think the bug has something to do with screen blanking / switching.  In
 retrospect, I think the reason I often discover this bug overnight is
 because my screensaver blanks out the screen while I'm away, so that has a
 small chance of triggering the bug.

 The xmobar configuration seems irrelevant for the most part.  I could
 reproduce this with the default config.

 (*) You'll have to fully release the Ctrl and Alt keys between each hit,
 or else Linux will fail to interpret the key correctly.

 Given that I'm able to reproduce a wide variety of stack traces, I think
 these errors are all somewhat related in cause despite the apparent ways
 in which they crash.  I even got a crash like this:

 {{{
 xmobar: internal error: evacuate: strange closure type 4689
     (GHC version 8.3.20170927 for x86_64_unknown_linux)
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13707#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list