xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
584 stars 274 forks source link

xmonad crash if too many windows opened in BinarySpacePartition #753

Open geekosaur opened 2 years ago

geekosaur commented 2 years ago

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

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.

slotThe commented 1 year ago

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

geekosaur commented 1 year ago

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.

geekosaur commented 1 year ago

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.