xmonad/xmonad-contrib

xmonad crash if too many windows opened in BinarySpacePartition

geekosaur opened this issue · 3 comments

Problem Description

I suspect either a lazy division by zero forced in X.O.windows, or a zero-size window. (The binary regression into the upper left corner of the screen was amusing until xmonad crashed. My taskbar counted 30 windows when xmonad stopped updating the EWMH properties it uses, so it apparently got them all opened before crashing; see "reproduce" below.)

Steps to Reproduce

I ran for f in *; do display "$f"; done in a directory with 30 image files in it. Presumably opening 30 xterms would also work.

Configuration File

module Main (main) where

import XMonad
import XMonad.Layout.BinarySpacePartition

main :: IO ()
main = xmonad def { layoutHook = emptyBSP }

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version 0.17.1 (commit d0f12af if using git)
    • With xmonad-contrib version 0.17.1 (commit fd5970f if using git)

Note

I'm still trying to diagnose this better locally; I inadvertently tripped it last night before bed, and couldn't find any smoking guns in the session log this morning.

I can't reproduce this. I ran for i in {0..50}; do xterm & done with that given config but—while xmonad slowed down to a crawl, which is maybe a bug in itself—observed no crash

I'm wondering if it's the OOM killer. I reproduced it again with a smaller image viewer, but things actually worked for a while until I tried to focus a window and my swap suddenly filled up and xmonad died again. Which makes little sense to me because I don't see a reason for xmonad to have suddenly started using that much memory, unless I've perhaps somehow found a bug in the dbus binding. But that doesn't make much sense either.

Or maybe it needs EwmhDesktops to reproduce or something, but then I don't see why it would have worked for a while.

I may set up a VM to play with this in, so I don't OOM my system again.

I have reproduced this exactly once so far, and still have nothing to show for it.

Slightly more common is that I now have a BSP layout with 8 windows in it, and occasionally when switching to it xmonad hangs for up to a minute. So I'm pretty sure something is wrong with BSP but I still have no idea what.