Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmonad segfaults! #328

Open
2 of 3 tasks
l29ah opened this issue Sep 9, 2021 · 14 comments
Open
2 of 3 tasks

xmonad segfaults! #328

l29ah opened this issue Sep 9, 2021 · 14 comments

Comments

@l29ah
Copy link

l29ah commented Sep 9, 2021

Problem Description

Outrageous!

Steps to Reproduce

I don't know, todays master segfaults in a few seconds worth of running time, each time. Reverting to eb48bb4 fixes it. The backtrace seems useless.

Configuration File

Oh god please no. https://github.com/l29ah/xmonad-config

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version 5da25c5
    • With xmonad-contrib version 0c6fdf4
@liskin
Copy link
Member

liskin commented Sep 10, 2021

If that's an actual segfault, that seems quite unlikely to be caused by a change in Haskell code…
Can you perhaps try to bisect this to a single commit that introduces the crash?

Oh god please no. https://github.com/l29ah/xmonad-config

Why no?

@geekosaur
Copy link
Contributor

I'd also ask what version of GHC; there are some crashing bugs in 8.10.5 that are fixed in 8.10.7, for example.

@l29ah
Copy link
Author

l29ah commented Sep 10, 2021

How can i ask xmonad to use the library that i just built instead of the system-wide installed one?

ghc 9.0.1

@l29ah
Copy link
Author

l29ah commented Sep 10, 2021

Okay, in fact it also reproduces in earlier xmonad revisions. gdb says:

#0  0x0000000000d99869 in xmonadzm0zi16zi99999zm1NVWfzz55W6QFvQzzDgdWm3D_XMonadziCore_zdfLayoutClassLayoutWord64zuzdchandleMessage_info ()

And there's minimal reproducing config:

import XMonad
import XMonad.Layout.Fullscreen

main = xmonad $ fullscreenSupport def

Also it seems to only trigger when i have tkabber running.

@liskin
Copy link
Member

liskin commented Sep 11, 2021

Interesting indeed. Before we attempt to reproduce it, though, may I ask a couple other questions:

  1. did you just start using tkabber, which started triggering the crashes, or is this a result of a system upgrade or something?
  2. if this is a result of system upgrade, what packages did get upgraded and to what versions?
  3. even if not, it'd be good to know what versions of dependencies you have (and what distro and architecture and so on), because a SEGV is quite unlikely to be caused by any Haskell code in xmonad, and is more likely to be an issue in the X11 bindings or perhaps a memory corruption in Xlib or somewhere that happens to crash some time later

@l29ah
Copy link
Author

l29ah commented Sep 11, 2021

No, i'm using tkabber for ages, but i relatively recently (50 days ago) started using fullscreenSupport, and some time later switched to xmonad master to accommodate for ghc 9.0.1.
I don't know if it's a result of system upgrade as my system upgrades each night automatically, much more frequently than i recompile&restart xmonad.
Which dependencies? Gentoo GNU/Linux on amd64 here, x11-libs/libX11 1.7.2, dev-haskell/x11 1.10.

@l29ah
Copy link
Author

l29ah commented Sep 11, 2021

Also now that i think about it, tkabber is quite unique as it spawns >50 windows here, so might be just the sheer amount of windows blowing through some buffer; will need to check for that.

@l29ah
Copy link
Author

l29ah commented Sep 11, 2021

Also sometimes the segfault is triggered by itself a couple of seconds after xmonad starts, sometimes it needs some workspace switching.

@l29ah
Copy link
Author

l29ah commented Sep 11, 2021

And when it segfaults right away, seems like it will segfault right away at the next xmonad start.

l29ah added a commit to l29ah/xmonad-config that referenced this issue Oct 27, 2021
@laMudri
Copy link

laMudri commented Oct 30, 2021

This sounds a bit like a problem I've been having for a long time (maybe a year or so) with Zoom, which I've tended to think has something to do with fullscreen. Segfaults tend to happen when switching workspaces to a Zoom window.

@liskin
Copy link
Member

liskin commented Nov 1, 2021

I've never seen my xmonad crash with Zoom, nor with anything else, so we may need a bit more details. As @geekosaur suggested in IRC today, testing with a different GHC version may be worth it, as 9.0.1 has bad reputation.
If this is still reproducible with other GHC versions, we should definitely look into it, but we'll need a reliable reproducer. It will sound a bit crazy but it worked well in the past: if you can reproduce this in a VM somehow and then send that VM to me, I can boot it in QEMU and debug it there.

@turboMaCk
Copy link

I remember having issues with xmonad crashing (can't recall if it was segfault) several years ago. In my case it turned out to be problem with manage hooks which lead to dbus messages piling up in some buffer Unfortunately I don't remember details. Anyway my recommendation would be to check manage hooks. You can also try if XMonad.Hooks.EwmhDesktops doesn't fix the issue.

@duplode
Copy link

duplode commented Feb 11, 2022

Though this is a completely anecdotal report (I don't have anything like a proper reproduction), I'll post it just in case it turns out to be of any use. After spending most of 2021 with development versions of xmonad and xmonad-contrib from January 2021 (at this and this commit, respectively; here is my configuration at the time), I started getting segfaults shortly after (though, oddly, not immediately after) upgrading both packages to 0.17. After upgrading xmobar from 0.37 to 0.41, the problem appears to have gone away (ten days and counting, while before I didn't get even five minutes without a segfault).

@geekosaur
Copy link
Contributor

ghc 9.0.1 is covered by the GHC RTS bug bgamari and I are trying to track down which leads to nextEvent smashing the heap. See #389.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants