i3: Seemingly random i3 freezes (SIGSTOP)
Arch Linux, 4.12-158-ge48119a
Since September (I think), i3
randomly freezes.
Sending SIGCONT
to i3 makes it responsive.
It seems I’m not the only one: https://marc.ttias.be/arch-general/2016-09/msg00067.php
I’ll try to get more info…
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 37 (18 by maintainers)
Commits related to this issue
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (socket is i... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
- Kill misbehaving subscribed clients instead of hanging This change only affects clients that are subscribed to events, which should be the main cause of our problems. In the common case (no buffered... — committed to orestisfl/i3 by orestisfl 6 years ago
I’ve had random freezes of i3 when I started it using dbus-launch like so:
Apparently dbus tried to read from stdin from the tty that I ran startx from. Since the .xinitrc was run as a background job, the read caused the whole process group to be stopped by SIGTTIN. The workaround was to redirect stdin from /dev/null like so:
So maybe it helps to add </dev/null to the script or add the line
to redirect stdin for all processes after it.
This is old and possibly not directly related, but it’s the closest hit to my (workaround solved) problem, so thought it might be useful to somebody. I use i3-input to switch workspaces, and once every couple of days it hangs. Keyboard input is stolen, but mouse still works. Multi-monitor setup, seems to be related to typing too fast, but that’s a guess, no peripherals involved.
I tried ssh-ing in from another machine and looking for things to kill, nothing. So for ages I just used to reboot the machine. Yesterday I discovered that if someone Skypes me, which on my machine shows a popup in the top right of the screen, the keyboard unlocks and everything is fine again.
Perhaps that’s a clue, or at least useful to someone. (sorry if this is a thread hijack, I scoured the internet looking for a solution)
I think the problem in the script is that the event IPC connection is not closed upon
KeyboardInterrupt
.I filed issue #2999 to improve i3’s behavior when IPC clients misbehave.
In the go.i3wm.org/i3 Go package, users must call Next() in a loop (i3 might block until the next call to
Next()
) and Close() once done. A good way to do this is to use defer to ensure thatClose
is called:If receiving all events is not a requirement, one can receive events in a different goroutine and discard events when the processing goroutine is busy:
Turns out xinit starts both the X server and .xinitrc in separate process groups, in the background:
Xorg’s and i3’s
pgid
are different from xinit’s while xinit being the foreground (STAT shows +).It probably has to do this so it can exit if any of the two processes exit. It then kills the other and exits itself.
Note though that I don’t start i3 using dbus-launch anymore. It’s not needed anymore because it’s now automatically started by the systemd user daemon (which happens by default these days on Arch I think).
Solution to this is starting startx with exec, so it replaces your shell. So you get back to the login prompt if your X session crashes.