greshake / i3status-rust

Very resourcefriendly and feature-rich replacement for i3status, written in pure Rust
GNU General Public License v3.0
2.88k stars 475 forks source link

i3status-rust freezes i3 #163

Closed srid closed 6 years ago

srid commented 6 years ago

Whenever I use i3status-rust I noticed that my i3 would freeze more than twice a day. Investigating I came across this issue: https://github.com/i3/i3/issues/2539

I don't have this problem when using the default i3 bar.

mihaimorariu commented 6 years ago

I confirm that I had the same issue and reverting to the default bar made i3 not freeze anymore.

greshake commented 6 years ago

Leave a pastebin link (or similar) to both your configs please

srid commented 6 years ago

https://gist.github.com/srid/8a481ffc16abba9461fa599e3b9d3c92

mihaimorariu commented 6 years ago

https://pastebin.com/BiNJgdia

atheriel commented 6 years ago

Can you try removing the focused_window block and see if the crashes persist?

srid commented 6 years ago

@atheriel That fixes it as well!

atheriel commented 6 years ago

Well, "fixes" is a bit strong -- we've just narrowed the crashes to a particular block. The focused_window block is the only one that uses i3's IPC system, which is why I had a sneaking suspicion it was the cause. It's possible that we are sending some sort of misbehaving message to i3 that crashes it.

We use the i3ipc crate for IPC, so it's possible that this reflects an upstream bug. However, we're on quite an old version of that crate, so it's also possible that this issue has been fixed and we simply need to upgrade our lockfile. Yet the last time I tried to do this I had severe dependency resolution issues in cargo.

The fact that some users are seeing i3 crashes does raise the priority on getting that sorted out.

greshake commented 6 years ago

I'll handle this. We don't send any messages , we just respond to window events..

greshake commented 6 years ago

Found it. i3 4.15 contains IPC changes: https://i3wm.org/downloads/RELEASE-NOTES-4.15.txt We probably just need to update the i3ipc crate

greshake commented 6 years ago

I couldn't recreate the issue for any version, but I updated the i3ipc version, seems to still work. Please test if this fixes the issue

mihaimorariu commented 6 years ago

I have been using the bar without the focus_window block, no freezes so far. I will now add it again and see if I still encounter the problem.

mihaimorariu commented 6 years ago

With focus_window disabled, I have not experienced i3 freezes anymore. However, I have noticed that it occasionally crashes with message 'Error: status_command exited unexpectedly (exit 101)'. With focus_window enabled, I once got the same error and had to restart i3, because the terminals were no longer responding to keyboard inputs. Once I did that, everything worked fine.

mihaimorariu commented 6 years ago

I am not sure if this information is relevant or needed, but I am using Arch Linux and the bar is installed via this AUR package: https://aur.archlinux.org/packages/i3status-rust-git.

atheriel commented 6 years ago

Can anyone check if this issue persists with the fix @greshake attempted (ie. you will need a version less than 1 week old)?

srid commented 6 years ago

I'd be happy to test if someone created a nix derivation for the fixed version. :-P

greshake commented 6 years ago

Since there is no more talk here, and the bar is running with focused_window on my laptop without issues for almost a week, I will close this ticket over the weekend if there is no more feedback. Cheers :+1: