FS#58795 - [ghc][xmobar] Crashes after latest updates
Attached to Project:
Community Packages
Opened by Luis Sanchez (Krychek) - Wednesday, 30 May 2018, 14:44 GMT
Last edited by Felix Yan (felixonmars) - Friday, 22 February 2019, 05:18 GMT
Opened by Luis Sanchez (Krychek) - Wednesday, 30 May 2018, 14:44 GMT
Last edited by Felix Yan (felixonmars) - Friday, 22 February 2019, 05:18 GMT
|
Details
Description:
After upgrading ghc, ghc-libs, xmonad and xmobar to latest versions, xmobar crashes and leaves a coredump. Additional info: ghc 8.4.2-1 ghc-libs 8.4.2-1 xmobar 0.26-24 xmonad 0.13.20180419-1 xmonad-contrib 0.13.20180518-1 My xmonad config is: ``` import System.IO import System.Posix.Env (putEnv) import XMonad import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Layout.BinarySpacePartition import XMonad.Util.EZConfig(additionalKeys) import XMonad.Util.Run(spawnPipe) import XMonad.Util.SpawnOnce(spawnOnce) main = do putEnv "_JAVA_AWT_WM_NONREPARENTING=1" xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs" xmonad $ docks $ def { terminal = "kitty" , startupHook = do spawnOnce "feh --bg-scale -z \"/home/luis/Pictures/Wallpapers/Cthulhu - 02.png\"" spawnOnce "stalonetray -c ~/.config/stalonetrayrc" spawnOnce "nm-applet" spawnOnce "redshift-gtk" spawnOnce "setxkbmap -option compose:rctrl" , normalBorderColor = myNormalBorderColor , focusedBorderColor = myFocusedBorderColor , manageHook = manageDocks <+> manageHook def , layoutHook = myLayout --avoidStruts $ layoutHook def , logHook = dynamicLogWithPP $ xmobarPP { ppOutput = hPutStrLn xmproc , ppTitle = xmobarColor "#657b83" "" . shorten 100 , ppCurrent = xmobarColor "#c0c0c0" "" . wrap "" "" , ppSep = xmobarColor "#c0c0c0" "" " | " , ppUrgent = xmobarColor "#ff69b4" "" } , modMask = mod4Mask } `additionalKeys` [ ((mod4Mask, xK_b) , sendMessage ToggleStruts) , ((mod4Mask, xK_d) , spawn "rofi -bw 1 -show drun") , ((mod4Mask, xK_m) , spawn "xrandr --output DP1 --auto --primary --left-of eDP1") , ((mod4Mask .|. shiftMask, xK_m), spawn "xrandr --output DP1 --off") , ((mod4Mask .|. shiftMask, xK_l), spawn "dm-tool lock") ] myLayout = avoidStruts $ emptyBSP ||| Full myNormalBorderColor = "#657b83" myFocusedBorderColor = "#b58900" ``` My xmobar config is: ``` Config { font = "xft:Meslo LG M DZ for Powerline:size=10,FontAwesome:size=10" , bgColor = "#002b36" , fgColor = "#657b83" , position = Static { xpos = 0 , ypos = 0, width = 3520, height = 32 } , sepChar = "%" , alignSep = "}{" , template = "%StdinReader% }{ <fc=#c0c0c0>|</fc> %coretemp% <fc=#c0c0c0>|</fc> %memory% <fc=#c0c0c0>|</fc> %bright% <fc=#c0c0c0>|</fc> %volume% <fc=#c0c0c0>|</fc> %battery% <fc=#c0c0c0>|</fc> %date% <fc=#c0c0c0>|</fc>" , commands = [ Run StdinReader , Run CoreTemp [ "--template" , "Temp: <core0>°C <core1>°C <core2>°C <core3>°C" , "--Low" , "40" -- units: °C , "--High" , "80" -- units: °C , "--low" , "#859900" , "--normal" , "#b58900" , "--high" , "#dc322f" ] 50 , Run Memory [ "--template" ,"Mem: <usedratio>%" , "--Low" , "20" -- units: % , "--High" , "90" -- units: % , "--low" , "#859900" , "--normal" , "#b58900" , "--high" , "#dc322f" ] 10 , Run Date "%F %H:%M" "date" 10 , Run Battery [ "--template" , "Batt: <acstatus>" , "--Low" , "10" -- units: % , "--High" , "80" -- units: % , "--low" , "#dc322f" , "--normal" , "#b58900" , "--high" , "#859900" , "--" -- battery specific options -- discharging status , "-o" , "<left>% (<timeleft>)" -- AC "on" status , "-O" , "<fc=#b58900>Charging (<timeleft>)</fc>" -- charged status , "-i" , "<fc=#859900>Charged</fc>" ] 30 , Run Com "/bin/sh" [ "-c", "~/.xmonad/volume.sh" ] "volume" 10 , Run Brightness [ "--template" , " <percent>%" , "--" , "--device" , "intel_backlight" ] 50 ] } ``` The coredump exceeds the attachment size limit so I got this: ``` coredumpctl info 16929 PID: 16929 (xmobar) UID: 1000 (luis) GID: 100 (users) Signal: 11 (SEGV) Timestamp: Wed 2018-05-30 15:27:36 BST (9min ago) Command Line: xmobar /home/luis/.xmonad/xmobar.hs Executable: /usr/bin/xmobar Control Group: /user.slice/user-1000.slice/session-c2.scope Unit: session-c2.scope Slice: user-1000.slice Session: c2 Owner UID: 1000 (luis) Boot ID: 9cc0b30f2b6d4986b3592884836ac3fb Machine ID: 7de0af45534246b38abb3b614fea0071 Hostname: BigCentech-Precision5520 Storage: /var/lib/systemd/coredump/core.xmobar.1000.9cc0b30f2b6d4986b3592884836ac3fb.16929.1527690456000000.lz4 Message: Process 16929 (xmobar) of user 1000 dumped core. Stack trace of thread 16929: #0 0x00007f10b3a53acb ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info (libHSghc-prim-0.5.2.0-ghc8.4.2.so) ``` |
This task depends upon
Closed by Felix Yan (felixonmars)
Friday, 22 February 2019, 05:18 GMT
Reason for closing: Fixed
Additional comments about closing: by upstream.
Friday, 22 February 2019, 05:18 GMT
Reason for closing: Fixed
Additional comments about closing: by upstream.
```
PID: 1231 (xmobar)
UID: 1000 (luis)
GID: 100 (users)
Signal: 11 (SEGV)
Timestamp: Thu 2018-05-31 23:54:07 BST (22h ago)
Command Line: xmobar /home/luis/.xmonad/xmobar.hs
Executable: /usr/bin/xmobar
Control Group: /user.slice/user-1000.slice/session-c2.scope
Unit: session-c2.scope
Slice: user-1000.slice
Session: c2
Owner UID: 1000 (luis)
Boot ID: dabe946a0f5b43639085a981ea0252f7
Machine ID: 7de0af45534246b38abb3b614fea0071
Hostname: BigCentech-Precision5520
Storage: /var/lib/systemd/coredump/core.xmobar.1000.dabe946a0f5b43639085a981ea0252f7.1231.1527807247000000.lz4
Message: Process 1231 (xmobar) of user 1000 dumped core.
Stack trace of thread 1231:
#0 0x00007f9772770248 n/a (libHSrts-ghc8.4.2.so)
#1 0x00007f9772785346 n/a (libHSrts-ghc8.4.2.so)
#2 0x00007f9772785798 n/a (libHSrts-ghc8.4.2.so)
#3 0x00007f977278caf5 n/a (libHSrts-ghc8.4.2.so)
#4 0x00007f977277712d n/a (libHSrts-ghc8.4.2.so)
#5 0x00007f9772777e2a scheduleWaitThread (libHSrts-ghc8.4.2.so)
#6 0x00007f9772781cfc hs_main (libHSrts-ghc8.4.2.so)
#7 0x000000000058acef n/a (xmobar)
#8 0x00007f9771e6806b __libc_start_main (libc.so.6)
#9 0x000000000042ffaa n/a (xmobar)
```
And this one is from today:
```
PID: 1400 (xmobar)
UID: 1000 (luis)
GID: 100 (users)
Signal: 11 (SEGV)
Timestamp: Fri 2018-06-01 12:16:35 BST (9h ago)
Command Line: xmobar /home/luis/.xmonad/xmobar.hs
Executable: /usr/bin/xmobar
Control Group: /user.slice/user-1000.slice/session-c2.scope
Unit: session-c2.scope
Slice: user-1000.slice
Session: c2
Owner UID: 1000 (luis)
Boot ID: 442861a64e7d43ef8ecb1661a27e2923
Machine ID: 7de0af45534246b38abb3b614fea0071
Hostname: BigCentech-Precision5520
Storage: /var/lib/systemd/coredump/core.xmobar.1000.442861a64e7d43ef8ecb1661a27e2923.1400.1527851795000000.lz4
Message: Process 1400 (xmobar) of user 1000 dumped core.
Stack trace of thread 1400:
#0 0x00007f076e1ee5f0 n/a (libHSbase-4.11.1.0-ghc8.4.2.so)
```
ghc 8.4.3-1
ghc-libs 8.4.3-1
xmobar 0.26-29
xmonad 0.13.20180419-3
xmonad-contrib 0.13.20180518-3
```
PID: 1748 (xmobar)
UID: 1000 (luis)
GID: 100 (users)
Signal: 11 (SEGV)
Timestamp: Mon 2018-06-04 10:26:26 BST (4min 11s ago)
Command Line: xmobar /home/luis/.xmonad/xmobar.hs
Executable: /usr/bin/xmobar
Control Group: /user.slice/user-1000.slice/session-c5.scope
Unit: session-c5.scope
Slice: user-1000.slice
Session: c5
Owner UID: 1000 (luis)
Boot ID: 14f2700b85e140398043c36e10d07f5a
Machine ID: 7de0af45534246b38abb3b614fea0071
Hostname: BigCentech-Precision5520
Storage: /var/lib/systemd/coredump/core.xmobar.1000.14f2700b85e140398043c36e10d07f5a.1748.1528104386000000.lz4
Message: Process 1748 (xmobar) of user 1000 dumped core.
Stack trace of thread 1748:
#0 0x00007f7cb5fd72b8 n/a (libHSrts-ghc8.4.3.so)
#1 0x00007f7cb5fd65dd n/a (libHSrts-ghc8.4.3.so)
#2 0x00007f7cb5fed3a4 n/a (libHSrts-ghc8.4.3.so)
#3 0x00007f7cb5ff3c2b n/a (libHSrts-ghc8.4.3.so)
#4 0x00007f7cb5fdc00d n/a (libHSrts-ghc8.4.3.so)
#5 0x00007f7cb5fdcd0a scheduleWaitThread (libHSrts-ghc8.4.3.so)
#6 0x00007f7cb5fea8dc hs_main (libHSrts-ghc8.4.3.so)
#7 0x000000000058ad8f n/a (xmobar)
#8 0x00007f7cb56cf06b __libc_start_main (libc.so.6)
#9 0x000000000043004a n/a (xmobar)
```
It seems to trigger easily if I just keep changing layouts continuously for a few seconds (holding mod4 + space until xmobar crashes, sometimes it survives about 20 seconds of this torture, but it's often under 5 seconds). The stack traces vary.
If I remove the CoreTemp plugin from my xmobar config, it can handle 60 seconds of layout changes.
With just the CoreTemp plugin, xmobar still crashes pretty quickly.
minimal broken config:
Config { position = Bottom
, commands = [ Run CoreTemp ["-t", "<core0>C", "-H", "50", "-h", "#552222"] 25 ]
, sepChar = "%"
, template = "%coretemp%"
}
(note: xmonad has locked up a few times when I was trying to crash xmobar)
Please file bugs against upstream as from a packaging point of view this works just fine.
$ dmesg
[ 153.014689] xmobar[735]: segfault at 8 ip 00007f14baa882b8 sp 00007fffbac72080 error 4 in libHSrts-ghc8.4.3.so[7f14baa6e000+5f000]
[ 476.542482] xmobar[4282]: segfault at 92101008 ip 00007ff53fe372b8 sp 00007fff60a427b0 error 4 in libHSrts-ghc8.4.3.so[7ff53fe1d000+5f000]
[ 967.459396] xmobar[19484]: segfault at 0 ip 00007f59af99facb sp 00007ffc87d2fc38 error 4 in libHSghc-prim-0.5.2.0-ghc8.4.3.so[7f59af604000+3bd000]
Previously, compiling --enable-debug-info=1 would fix the crashes, but that workaround no longer works. I also tried removing the CoreTemp plugin from my config, and I am still experiencing crashes. Unfortunately, I can't help with the reproducibility of this bug; the crashes appear to be random to me.
I am able to produce the crash by clicking left and right on the bar and switching layouts.
I tried compiling from source the 0.26 version from git with stack and it seems to work without
any crash. The stack version produces a static binary (13M with all the extensions). This is
using ghc-8.2.2.
xmobar 0.26-51
xmonad 0.13.20180419-3
xmonad-contrib 0.13.20180518-3
ghc 8.4.3-1
ghc-libs 8.4.3-1
Last time it was:
https://git.haskell.org/ghc.git/commitdiff/404bf05ed3193e918875cd2f6c95ae0da5989be2
https://ghc.haskell.org/trac/ghc/ticket/13707
https://github.com/jaor/xmobar/issues/310
https://bugs.archlinux.org/task/55666
Please file issues against ghc and back-reference the tickets here. For people who can easily reproduce this deterministically (which i can't) please try to bisect ghc to get the commit.