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

#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 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: -------------------------------------+------------------------------------- Markus Trippelsdorf on `ghc-devs` reports that 8.2.1-rc2 produces crashing `xmobar` executables. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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: | -------------------------------------+------------------------------------- Description changed by bgamari: @@ -3,0 +3,14 @@ + {{{ + Program received signal SIGSEGV, Segmentation fault. + 0x0000000000873aa8 in ghczmprim_GHCziClasses_eqChar_info () + }}} + or: + {{{ + Program received signal SIGSEGV, Segmentation fault. + 0x0000000000873f98 in ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info + () + (gdb) bt + #0 0x0000000000873f98 in + ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info () + #1 0x0000000000000000 in ?? () + }}} New description: Markus Trippelsdorf on `ghc-devs` reports that 8.2.1-rc2 produces crashing `xmobar` executables. {{{ Program received signal SIGSEGV, Segmentation fault. 0x0000000000873aa8 in ghczmprim_GHCziClasses_eqChar_info () }}} or: {{{ Program received signal SIGSEGV, Segmentation fault. 0x0000000000873f98 in ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info () (gdb) bt #0 0x0000000000873f98 in ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info () #1 0x0000000000000000 in ?? () }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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: | -------------------------------------+------------------------------------- Description changed by bgamari: @@ -3,0 +3,1 @@ + @@ -7,1 +8,3 @@ - or: + + or: + New description: Markus Trippelsdorf on `ghc-devs` reports that 8.2.1-rc2 produces crashing `xmobar` executables. {{{ Program received signal SIGSEGV, Segmentation fault. 0x0000000000873aa8 in ghczmprim_GHCziClasses_eqChar_info () }}} or: {{{ Program received signal SIGSEGV, Segmentation fault. 0x0000000000873f98 in ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info () (gdb) bt #0 0x0000000000873f98 in ghczmprim_GHCziClasses_zdfEqModulezuzdszdczeze_info () #1 0x0000000000000000 in ?? () }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 trippels): Not sure if it matters, but I built the latest xmobar git tree with -O2. {{{ ~ % cat .xmobarrc Config { font = "xft:Consolas:size=8" , bgColor = "#fafafa" , fgColor = "#606060" , position = BottomSize C 100 0 , lowerOnStart = True , hideOnStart = False , persistent = False , commands = [ Run Weather "EDDT" ["-t","<tempC>°C <rh>%"] 18000 , Run Network "eth0" ["-t","<rx> <tx>","-w","4"] 10 , Run Cpu ["-t","<total>%","-L","3","-H","50","-- normal","blue","--high","red"] 10 , Run Date "%a %b %_d %H:%M" "date" 10 , Run Com "/home/markus/cputemp" [] "temp" 100 , Run Com "/home/markus/loadav" [] "loadav" 100 , Run StdinReader ] , sepChar = "%" , alignSep = "}{" , template = "%StdinReader% }{%cpu% | %loadav% | %temp%°C | %eth0% | %EDDT% | %date%" } }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 trippels): {{{ markus@x4 xmobar % cat /home/markus/cputemp cat /sys/bus/pci/drivers/k10temp/0000:00:18.3/hwmon/hwmon1/temp1_input | awk '{printf "%.1f", $1/1000}' markus@x4 xmobar % cat /home/markus/loadav cat /proc/loadavg | cut -d " " -f 1,2,3 markus@x4 xmobar % cabal install --flags="with_xft with_utf8" }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 trippels): Also happens when build with -O1. Unfortunately, it can take several hours to hit the crash. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 bgamari): I left your xmobar configuration (build with `-O1` from git) running under gdb for around 24 hours and I never observed a crash. Perhaps you could cite the dependency versions you are using? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 trippels): {{{ markus@x4 xmobar % cabal install --flags="with_xft with_utf8" --dry-run --allow-newer Resolving dependencies... In order, the following would be installed (use -v for more details): data-default-class-0.1.2.0 data-default-instances-containers-0.0.1 dlist-0.8.0.2 data-default-instances-dlist-0.0.1 mtl-2.2.1 network-2.6.3.1 old-locale-1.0.0.7 data-default-instances-old-locale-0.0.1 data-default-0.7.1.1 X11-1.8 regex-base-0.93.2 regex-posix-0.95.2 regex-compat-0.95.1 stm-2.4.4.1 text-1.2.2.1 parsec-3.1.11 network-uri-2.6.1.0 HTTP-4000.3.6 utf8-string-1.0.1.1 X11-xft-0.3.1 xmobar-0.24.4 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 bgamari): trippels, I've tried building against the libraries that you cite with `-O2` but sadly I'm still not seeing the crashes. What distribution are you using? Perhaps you could provide your binary? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 trippels): Sorry, but I've switched back to 8.0.2 and everything works fine again. The xmobar binary is too big to attach (even compressed). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => infoneeded Comment: Hmm, alright. Sorry for the crashes. I would love to look at a core dump of your crashing executable (and perhaps the executable itself) if you get a chance. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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 trippels): Core dumps are disabled on my machine. And I have deleted the old crashing xmobar binary. Sorry, but I will not debug this any further and will just stay on 8.0.2 for the future. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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 trippels): https://github.com/jaor/xmobar/issues/310 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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: | -------------------------------------+------------------------------------- Changes (by rezb1t): * Attachment "xmobar.coredump.xz" added. xmobar coredump after segfault, with GHC 8.2.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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 rezb1t): Hi there! I noticed you needed a coredump some time ago, and was only now able to get one, as it was difficult to reproduce this bug using my setup. It has only happened to me a handful of times so far, probably 3-4 since GHC 8.2.1 came out. I am using NixOS latest unstable, GHC 8.2.1, and xmonad with xmobar. This coredump was truncated down to 500kb but if you need a larger one, let me know and I will do my best to get you one. Thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:13 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: infoneeded 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 Emantor): Hello, I just produced an unstripped version of xmobar, here is the coredump from coredumpctl. Unfortunately it is bigger than the allowed upload limit, you can download it [https://magratgarlick.emantor.de/xmobar_dump.xz here]. I also built a version with the configure option `--with-debug-info=1`, weirdly I could not reproduce the crashes with that binary. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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: | -------------------------------------+------------------------------------- Changes (by Emantor): * status: infoneeded => new -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 bgamari): Do you think you could include the executable as well? Unfortunately it's hard to do much with the coredump without at least the symbol table. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:16 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Emantor): Sure, here is a new dump from a newly compiled executable which shows the same error. [https://magratgarlick.emantor.de/xmobar_bin_with_dump.tar.xz Download link] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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):
The crash is quite rare and sporadic. I've had it run for 1-3 days
without crashing.
GDB:
{{{
0x7ffff55ffcdd
0x7ffff55ffce0
movzx ecx,WORD PTR [rdx+0x2e] 0x7ffff55ffce4 test cx,0x20b
print/x $rdx # variable "bd" 0x6300000000
backtrace #0 evacuate (p=p@entry=0x4200266b98) at rts/sm/Evac.c:583 #1 0x00007ffff55ff155 in scavenge_block (bd=0x4200201980) at rts/sm/Scav.c:548 #2 0x00007ffff561495e in scavenge_find_work () at rts/sm/Scav.c:2132 #3 scavenge_loop () at rts/sm/Scav.c:2195 #4 0x00007ffff561b08f in scavenge_until_all_done () at rts/sm/GC.c:1020 #5 GarbageCollect (collect_gen=collect_gen@entry=1, do_heap_census=do_heap_census@entry=false, gc_type=gc_type@entry=0, cap=cap@entry=0x7ffff5648a00 <MainCapability>, idle_cap=idle_cap@entry=0x0) at rts/sm/GC.c:406 #6 0x00007ffff560da3d in scheduleDoGC (pcap=pcap@entry=0x7fffffffdba8, task=task@entry=0x5c28d0, force_major=force_major@entry=false) at rts/Schedule.c:1822 #7 0x00007ffff560e6fb in schedule (task=0x5c28d0, initialCapability=<optimized out>) at rts/Schedule.c:558 #8 scheduleWaitThread (tso=<optimized out>, ret=ret@entry=0x0, pcap=pcap@entry=0x7fffffffdc08) at rts/Schedule.c:2551 #9 0x00007ffff560fed8 in rts_evalLazyIO (cap=cap@entry=0x7fffffffdc08, p=p@entry=0x5ad4a0, ret=ret@entry=0x0) at rts/RtsAPI.c:530 #10 0x00007ffff561086e in hs_main (argc=1, argv=0x7fffffffddd8, main_closure=0x5ad4a0, rts_config=...) at rts/RtsMain.c:64 #11 0x0000000000578fe1 in main () }}}
Built using GHC from https://downloads.haskell.org/~ghc/8.2.1/ghc-8.2.1-x86_64-deb8-linux.tar.xz installed on Arch Linux with ncurses5-compat-libs. xmobar was built with: {{{ cabal install --disable-executable-stripping --with- ghc=/opt/ghc-8.2.1/bin/ghc \ -f 'with_utf8 with_xft with_iwlib with_xpm with_inotify' constraints: HTTP ==4000.3.7, X11 ==1.8, array ==0.5.2.0, base ==4.10.0.0, binary ==0.8.5.1, bytestring ==0.10.8.2, containers ==0.5.10.2, data-default ==0.7.1.1, data-default-class ==0.1.2.0, data-default-instances-containers ==0.0.1, data-default-instances-dlist ==0.0.1, data-default-instances-old-locale ==0.0.1, deepseq ==1.4.3.0, directory ==1.3.0.2, dlist ==0.8.0.3, filepath ==1.4.1.2, ghc-prim ==0.5.1.0, integer-gmp ==1.0.1.0, mtl ==2.2.1, network ==2.6.3.2, network-uri ==2.6.1.0, old-locale ==1.0.0.7, parsec ==3.1.11, process ==1.6.1.0, regex-base ==0.93.2, regex-compat ==0.95.1, regex-posix ==0.95.2, rts ==1.0, stm ==2.4.4.1, text ==1.2.2.2, time ==1.8.0.2, transformers ==0.5.2.0, unix ==2.7.2.2, utf8-string ==1.0.1.1 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Emantor): I can make it crash on demand by switching workspaces/windows using the XmonadLog Plugin, i'd say its one out of three times. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 bgamari): Sadly I can't get a backtrace out of the coredump even with the executable. However, the dump in comment:17 is quite interesting as it implicates the `Eq Module` instance in `GHC.Classes`. Unfortunately this is much different from the crash seen in comment:18. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#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 bgamari): Thanks Rufflewind; I left an `xmobar` instance running in the background all of last week but sadly I still have yet to see a crash. I'll try your reproducer shortly. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:22 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 andrewchen): You can reliably reproduce the crash by sending the xmobar window a lot of events, e.g. using xdotool to send a lot of mouse button presses, or as some members on github has pointed out, dragging other windows over the xmobar window, thus sending Expose events. You also need to have at least 1 monitor in your xmobarrc (e.g. have `Run Swap [] 10` in commands). The stack traces I got weren't very helpful, but most of them segfaulted on values read from the memory area used for return data from XNextEvent. Also see discussion here: https://ghc.haskell.org/trac/ghc/ticket/14346 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:23 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 bgamari): I wonder if any of the number of correctness fixes that we have merged recently will address this. Particularly I wonder about #14361. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:24 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13707: xmobar crashes with segmentation faults? -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: highest | Milestone: 8.2.1 Component: Compiler | Version: 8.2.1-rc2 Resolution: fixed | 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: | -------------------------------------+------------------------------------- Changes (by trippels): * status: new => closed * resolution: => fixed Comment: Fixed by "base: Make Foreign.Marshal.Alloc.allocBytes[Aligned] NOINLINE". Took some time, but thanks. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13707#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC