Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#58795 - [ghc][xmobar] Crashes after latest updates

Attached to Project: Community Packages
Opened by Luis Angel Vicente Sanchez (Krychek) - Wednesday, 30 May 2018, 14:44 GMT
Last edited by Felix Yan (felixonmars) - Friday, 22 February 2019, 05:18 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jelle van der Waa (jelly)
Felix Yan (felixonmars)
Levente Polyak (anthraxx)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

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.
Comment by Doug Newgard (Scimmia) - Friday, 01 June 2018, 15:28 GMT
We've had 2 rebuilds since this, is it still an issue with xmobar 0.26-26?
Comment by Luis Angel Vicente Sanchez (Krychek) - Friday, 01 June 2018, 21:00 GMT
Yes, but the errors the last two times. This one is from yesterday:

```
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)
```
Comment by Luis Angel Vicente Sanchez (Krychek) - Monday, 04 June 2018, 09:33 GMT
After today's update, it's still failing with versions:

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)
```
Comment by Sabrina Dubroca (qsn) - Tuesday, 05 June 2018, 23:05 GMT
Same here, also with 0.26-26 and 0.26-29.

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)
Comment by Levente Polyak (anthraxx) - Wednesday, 06 June 2018, 08:49 GMT
I just can't reproduce any of this, even trying this hold down thingie for lots of minutes.
Please file bugs against upstream as from a packaging point of view this works just fine.
Comment by Alexey (Morisson) - Thursday, 07 June 2018, 19:54 GMT
Randomly breaks down

$ 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]

Comment by Duncan Townsend (duncancmt) - Friday, 08 June 2018, 15:09 GMT
There are a number of bugs open on this upstream, the most recent of which is https://github.com/jaor/xmobar/issues/354 , but bugs 310, 318, and 322 all appear to be the same problem. It seems to be an Arch-specific problem. All those upstream bugs are reported by Arch users, and I can't find any similar bugs reported by non-Arch users.

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.
Comment by Levente Polyak (anthraxx) - Friday, 08 June 2018, 16:38 GMT
Added felix to the ticket, there are pretty strong indicators that this is a ghc issue (follow the github issues) and not a problem within xmobar itself.
Comment by Sylvain Falardeau (sylvainf) - Monday, 11 June 2018, 17:35 GMT
Same problem with xmobar-0.26-31.

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.
Comment by Duncan Townsend (duncancmt) - Monday, 09 July 2018, 16:30 GMT
I'm still having this problem even after the most recent update to xmobar

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
Comment by Levente Polyak (anthraxx) - Monday, 09 July 2018, 17:58 GMT
Its most certainly a ghc issue again, like it was last time with a similar problem. Nothing should break apart like that.

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.
Comment by Duncan Townsend (duncancmt) - Monday, 09 July 2018, 18:53 GMT Comment by Felix Yan (felixonmars) - Thursday, 21 February 2019, 19:45 GMT
The GHC issue suggests a fix was landed long ago. Is this issue still present?
Comment by Josiah Schwab (jschwab) - Friday, 22 February 2019, 00:04 GMT
My logs show I have not had an xmobar crash since Oct. 2018, so it is no longer an issue on my system.

Loading...