stumpwm/stumpwm-contrib

cpu gives divide by zero

impaktor opened this issue · 1 comments

I've been using stumpwm + cpu module for many years with no problems, but since I started using libvirt (virt-manager + KVM/QEMU) the other day, I get about 3 crashes in three hours, plus same thing on another computer.

Both running Arch Linux, one with fairly recent stump 1db36707e67c0e729f6203cfd5712dac6aebb109 and stump-contrib 86b5ebd, the other computer is a fresh install, with current master of both.

I can't get at the error message other than taking a picture. Looks like something where the cpu module divides by zero?
bug

Looking at the function current-cpu-usage, it seems like this can happen when two subsequent reads from /proc/stat report the exact same data, or when some columns are reporting very odd values.

I just pushed d68ea9e to prevent the division from happening.