FS#55666 - [xmobar] Started to crash after recent update

Attached to Project: Community Packages
Opened by Michal Minář (miminar) - Monday, 18 September 2017, 06:13 GMT
Last edited by Doug Newgard (Scimmia) - Friday, 15 December 2017, 18:59 GMT
Task Type Bug Report
Category Packages
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:
xmobar crashes with this stacktrace:

Sep 18 07:50:54 hostname systemd-coredump[27624]: Process 27254 (xmobar) of user 1000 dumped core.

Stack trace of thread 27254:
#0 0x00007f8710805d02 n/a (libHSrts-ghc8.2.1.so)
#1 0x00007f8710805006 n/a (libHSrts-ghc8.2.1.so)
#2 0x00007f871081a86d n/a (libHSrts-ghc8.2.1.so)
#3 0x00007f8710820fea n/a (libHSrts-ghc8.2.1.so)
#4 0x00007f8710812abd n/a (libHSrts-ghc8.2.1.so)
#5 0x00007f871081362e scheduleWaitThread (libHSrts-ghc8.2.1.so)
#6 0x00007f871081649e hs_main (libHSrts-ghc8.2.1.so)
#7 0x0000000000578d61 n/a (xmobar)
#8 0x00007f870f996f6a __libc_start_main (libc.so.6)
#9 0x000000000042b60a n/a (xmobar)

Another occurence:

Sep 18 07:53:13 hostname systemd-coredump[27960]: Process 27823 (xmobar) of user 1000 dumped core.

Stack trace of thread 27823:
#0 0x00007f0457e08a24 base_GHCziBase_zpzp_info (libHSbase-4.10.0.0-ghc8.2.1.so)


Additional info:
* package version(s): 0.24.5-5
* config and/or log files etc.:

Config { font = "xft:Ubuntu Mono:size=10"
, additionalFonts = ["xft:Sans:size=10"]
, borderColor = "black"
, border = TopB
, bgColor = "#3c3c3c"
, fgColor = "#dfdfdf"
, alpha = 255
, position = BottomSize L 100 24
, textOffset = -1
, iconOffset = -1
, lowerOnStart = True
, pickBroadest = False
, persistent = True
, hideOnStart = False
, iconRoot = "/home/miminar/.local/share/xminad"
, allDesktops = True
, overrideRedirect = False
, commands = [ Run UnsafeStdinReader
, Run Cpu ["-L","3","-H","50",
"--normal","green","--high","red",
"--template", "<action=`mate-system-monitor --show-processes-tab`>\
\<icon=cpu-core-i7.xpm/> <ipat></action>",
"--", "--load-icon-pattern", "<icon=bar-%%.xpm/>"] 10
, Run Memory ["-t","<action=`mate-system-monitor --show-resources-tab`>\
\<icon=memory.xpm/> <usedipat></action>",
"--", "--used-icon-pattern", "<icon=bar-%%.xpm/>"] 10
, Run DiskU [ ("/", "<action=`baobab` button=1>\
\<icon=disk-usage.xpm/> / <usedipat></action>")
, ("/home",
"<icon=home.xpm/> <usedipat>")
, ("/home/miminar/Music",
"<icon=music-directory.xpm/> <usedipat>")
, ("/dev/2ndary/docker-data",
"<icon=docker.xpm/> <usedipat>")]
["--", "--used-icon-pattern", "<icon=bar-%%.xpm/>"] 20
]
, sepChar = "%"
, alignSep = "}{"
, template = "<fn=1>%UnsafeStdinReader%</fn> }{ %cpu% %memory% %disku%"
}

Previous version used to work fine, but with an update of underlying haskell libraries, it doesn't even start now.

Steps to reproduce: Pipe xmonad's output into it, change workspace once or twice and watch it crash.
This task depends upon

Closed by  Doug Newgard (Scimmia)
Friday, 15 December 2017, 18:59 GMT
Reason for closing:  Fixed
Comment by Emantor (Emantor) - Monday, 18 September 2017, 08:25 GMT
Can confirm:

Sep 18 10:20:44 dibooki systemd[1]: Started Process Core Dump (PID 9433/UID 0).
Sep 18 10:20:45 dibooki systemd[6123]: xmobar-top.service: Main process exited, code=dumped, status=11/SEGV
Sep 18 10:20:45 dibooki systemd[6123]: xmobar-top.service: Unit entered failed state.
Sep 18 10:20:45 dibooki systemd[6123]: xmobar-top.service: Failed with result 'core-dump'.
Sep 18 10:20:45 dibooki systemd-coredump[9437]: Process 9041 (xmobar) of user 1000 dumped core.

Stack trace of thread 9041:
#0 0x00007f9c1f8baf94 ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info (libHSghc-prim-0.5.1.0-ghc8.2.1.so)

Config:
Config { font = "-*-fixed-medium-*-*-*-12-*-*-*-*-*-*-*"
, bgColor = "#111111"
, fgColor = "#babdb6"
, position = TopP 0 150
, commands = [ Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = " %XMonadLog% }{"
}
Comment by Haron Prime (Haron Prime) - Tuesday, 26 September 2017, 09:06 GMT
I confirm

dmesg | grep xmobar
[ 39.164866] traps: xmobar[712] general protection ip:7fbedc951fb3 sp:7ffddee594b8 error:0 in libHSghc-prim-0.5.1.0-ghc8.2.1.so[7fbedc5ab000+3c8000]
[ 4459.500979] xmobar[1571]: segfault at 29 ip 00007fb2cf700f53 sp 00007ffd5bde6608 error 4 in libHSghc-prim-0.5.1.0-ghc8.2.1.so[7fb2cf35a000+3c8000]
Comment by Levente Polyak (anthraxx) - Tuesday, 26 September 2017, 09:21 GMT
any chance that you change monitors in some way between boot and crash?
can you attach the register values, stacktrace and current instructions from the coredump via coredumpctl?
It sounds stupid, but in some weird corner cases it helps for haskell hickups: did you try to clean-reinstall the haskell/xmobar packages?
Comment by Haron Prime (Haron Prime) - Tuesday, 26 September 2017, 09:38 GMT
I only have one monitor
xmobar reinstalled several times with all the dependent packages

coredumpctl
TIME PID UID GID SIG COREFILE EXE
Fri 2017-09-22 10:14:34 EEST 715 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 10:37:55 EEST 15273 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 10:51:03 EEST 9356 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:06:18 EEST 28077 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:07:33 EEST 28458 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:26:00 EEST 3779 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:26:42 EEST 10154 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:32:21 EEST 16095 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:32:27 EEST 16359 1000 1000 7 missing /usr/bin/xmobar
Fri 2017-09-22 13:35:10 EEST 18620 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 13:35:33 EEST 19277 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 14:50:41 EEST 21934 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 15:05:26 EEST 10288 1000 1000 7 missing /usr/bin/xmobar
Fri 2017-09-22 15:44:12 EEST 31811 1000 1000 6 missing /usr/bin/xmobar
Fri 2017-09-22 15:56:19 EEST 11746 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 19:45:44 EEST 7000 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 20:24:38 EEST 21172 1000 1000 7 missing /usr/bin/xmobar
Fri 2017-09-22 22:28:29 EEST 22585 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 22:39:55 EEST 28216 1000 1000 11 missing /usr/bin/xmobar
Fri 2017-09-22 23:44:51 EEST 18760 1000 1000 11 missing /usr/bin/xmobar
Sat 2017-09-23 11:39:14 EEST 689 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 13:20:06 EEST 3404 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 16:41:57 EEST 20031 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 16:50:51 EEST 28313 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 18:24:40 EEST 2040 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 19:38:52 EEST 30667 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 20:56:00 EEST 3097 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 21:03:04 EEST 6309 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 22:05:23 EEST 17815 1000 1000 11 present /usr/bin/xmobar
Sat 2017-09-23 22:05:28 EEST 19075 1000 1000 6 present /usr/bin/xmobar
Sun 2017-09-24 12:33:40 EEST 19792 1000 1000 11 present /usr/bin/xmobar
Sun 2017-09-24 12:33:47 EEST 860 1000 1000 11 present /usr/bin/xmobar
Sun 2017-09-24 12:38:13 EEST 1988 1000 1000 11 present /usr/bin/xmobar
Sun 2017-09-24 18:05:27 EEST 12334 1000 1000 11 present /usr/bin/xmobar
Sun 2017-09-24 20:56:55 EEST 25516 1000 1000 11 present /usr/bin/xmobar
Sun 2017-09-24 21:40:43 EEST 24906 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 10:34:12 EEST 6341 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 12:50:03 EEST 677 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 14:09:12 EEST 2303 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 14:26:39 EEST 14179 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 16:26:15 EEST 23847 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 19:07:59 EEST 27442 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 20:03:28 EEST 32078 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 21:42:55 EEST 30455 1000 1000 11 present /usr/bin/xmobar
Mon 2017-09-25 23:40:59 EEST 4906 1000 1000 11 present /usr/bin/xmobar
Tue 2017-09-26 10:46:29 EEST 712 1000 1000 11 present /usr/bin/xmobar
Tue 2017-09-26 12:00:09 EEST 1571 1000 1000 11 present /usr/bin/xmobar
Tue 2017-09-26 12:13:16 EEST 15944 1000 1000 11 present /usr/bin/xmobar
Tue 2017-09-26 12:18:24 EEST 22834 1000 1000 11 present /usr/bin/xmobar
Comment by Levente Polyak (anthraxx) - Tuesday, 26 September 2017, 09:47 GMT
that list doesn't help. you need to use coredumpctl to invoke GDB on one of the crash dumps with present data. then extract things with
'bt'
'i r'
'maintenance info sections'
'x/i $rip'
Comment by Emantor (Emantor) - Tuesday, 26 September 2017, 10:16 GMT Comment by Levente Polyak (anthraxx) - Tuesday, 26 September 2017, 10:54 GMT
Emantor has a nullptr dereference while it should be GHC classes module info function ptr. indicator that there is something borked with the dynamic linker pulling in stuff.
The general protection trap from Haron is also an indicator for wrong linkage as it shouldn't be possible that anything tries to write to a section that is not writable, however that could also occur with mismatched so's.

As I still can't reproduce anything like this on multiple setups with all of your provided configs, i still have the feeling its some partial install or borked haskell stuff laying around. Maybe try to remove the haskell/xmonad/xmobar things and afterwards install them freshly?
Any chance there are custom repositories for haskell or anything else enabled in pacman.conf or anything haskell related installed via AUR?
Maybe Felix has a better idea?

PS: greetings to stratum0
Comment by Haron Prime (Haron Prime) - Tuesday, 26 September 2017, 11:02 GMT
https://pastebin.com/h7Z3rb5z

UPD
Updated after the last crash
Comment by Emantor (Emantor) - Tuesday, 26 September 2017, 13:33 GMT
Removing and reinstalling did not fix the problem, however enabling debug info in xmobar seems to fix the issue.
For reference:
Upstream bug report: https://github.com/jaor/xmobar/issues/310
GHC xmobar 8.2.1 bug report: https://ghc.haskell.org/trac/ghc/ticket/13707
Comment by Sergiy (sugry86) - Tuesday, 26 September 2017, 18:10 GMT
I also have this issue.
Kernel 4.12.13-1-ARCH
xmonad 0.13-8
xmobar 0.24.5-6
--
dmesg | grep xmobar
[ 1488.521373] xmobar[3626]: segfault at 168530 ip 00007fc3377a405d sp 00007ffd1e1805f0 error 4 in libHSrts-ghc8.2.1.so[7fc337789000+5c000]
Comment by Haron Prime (Haron Prime) - Monday, 09 October 2017, 16:40 GMT
Compiled the git version with --enable-debug-info = 1 - no more crashes

UPD
Version 0.24.5-6 x86_64 compiled with --enable-debug-info = 1 is also stable - there are no more failures
Comment by Levente Polyak (anthraxx) - Tuesday, 12 December 2017, 18:39 GMT Comment by Michal Minář (miminar) - Wednesday, 13 December 2017, 03:49 GMT
Yes, I can confirm that the latest ghc/xmobar fixes the issue. On the other hand, I'm no longer able to build xmobar package with --enable-debug-info=1 due to:

dist/build/xmobar/xmobar-tmp/Main.dyn_o(.debug_info+0x2171): error: undefined reference to '.Lc2URI_entry_die'

But that's whole another issue.
Comment by Emantor (Emantor) - Friday, 15 December 2017, 18:37 GMT
Fixed for me as well.

Loading...