New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i3status/blocks bar hangs up from time to time #3242
Comments
Sorry, we can only support the latest major version. Please upgrade from 4.13 to 4.15, verify the bug still exists, and re-open this issue. |
Please reopen the ticket. 4.15 version hangs up, too: logfile: https://logs.i3wm.org/logs/5660082654150656.bz2 $ i3 --moreversion 2>&- || i3 --version The i3 binary you just called: /usr/bin/i3 |
$ cat .i3/blocks
# i3blocks config file
#
# Please see man i3blocks for a complete reference!
# The man page is also hosted at http://vivien.github.io/i3blocks
#
# List of valid properties:
#
# align
# color
# command
# full_text
# instance
# interval
# label
# min_width
# name
# separator
# separator_block_width
# short_text
# signal
# urgent
# Global properties
separator_block_width=15
[ticket]
command=test -r ~/.ticket && cat ~/.ticket
interval=1
color=#7777FF
[wifi]
instance=wlan0
interval=2
command=/usr/share/i3blocks/wifi
label=WiFi
min_width='100%'
separator=false
[wifi]
instance=wlp1s0
interval=2
command=/usr/share/i3blocks/wifi
label=W
min_width='100%'
separator=false
[wifi-name]
interval=2
command=sudo wpa_cli status|grep -i ^ssid=|sed 's/^ssid=//i'
[iface]
instance=wlan0
interval=2
command=/usr/share/i3blocks/iface
label=IP
[volume]
label=♪
instance=Master
command=/usr/share/i3blocks/volume
interval=1
signal=10
[temperature]
label=t
interval=10
command=/usr/share/i3blocks/temperature
separator=false
[cpu]
label=CPU
command=/usr/share/i3blocks/cpu_usage -w 30 -c 70
interval=2
separator=false
min_width=' 100.00% '
align=right
[battery]
label=⚡
command=/usr/share/i3blocks/battery
interval=30
[time]
command=date +' %A, %d %b %H:%M:%S '
interval=1
color=#8888ff
[lock]
command=bash ~/.scripts/lockscreen-bar
interval=once
color=#ee7777
[LANG]
command=~/.scripts/i3block-layout
interval=1 |
You said it also happens with i3status. Does it happen with the default i3status config? If not, which config are you using here? I'm not too concerned with i3blocks causing this. i3blocks has open issues regarding freezes. |
time ago I opened the same ticket #1904 (i3 4.10) I used i3status then. The ticket was fixed and I used 4.10. statusbar hangs up again. The bar often hangs after suspend/resume, but from time to time hangs if CPU usage reaches 100%. PS: I switched my i3 to i3status, https://logs.i3wm.org/logs/5731644862365696.bz2 the bar hangs, too: my i3status config: # i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = true
interval = 1
output_format = "i3bar"
}
order += "wireless wlan0"
order += "wireless wlan1"
order += "run_watch DHCP"
order += "battery 0"
# order += "load"
order += "cpu_usage"
order += "volume_master"
order += "tztime local"
cpu_usage {
format = "%usage"
}
wireless wlan0 {
format_up = "W: (%quality at %essid) %ip"
format_down = ""
}
wireless wlan1 {
format_up = "W: (%quality at %essid) %ip"
format_down = ""
}
battery 0 {
format = "%status %percentage %remaining"
}
run_watch DHCP {
pidfile = "/var/run/dhclient*.pid"
}
tztime local {
format = " %A, %d %b %H:%M:%S "
}
load {
format = "%1min"
}
disk "/" {
format = "%avail"
}
volume master {
format = "♪ %volume"
format_muted = "♪ muted (%volume)"
device = "default"
mixer = "Master"
mixer_idx = 0
}
volume master {
format = "♪ %volume"
format_muted = "♪ muted (%volume)"
device = "default"
mixer = "PCM"
mixer_idx = 0
} |
Thanks for the confirmation that you can reproduce it with i3status, too. |
Does your i3bar update correctly? ie, do the workspace buttons update? |
While i3bar hangs, I can switch (by mouse and by keyword) through workspaces, I can watch systray icons (ex. telegram icon on screenshot). Only bar (i3block/i3status) hangs until Alt-Shift-r (i3 restart). |
Can you run i3status from the command line and see if you can get it to freeze? |
I run 2 terminals:
Then suspend/resume my laptop until i3bar hangs. i3status/i3blocks in console continue work, but i3blocks in i3bar hangs. See screenshot workspace buttons, tray icons are clickable. |
I did pay attention to your ticket and regularly check my bar for hangs. Unfortunately, these issues are not easy to reproduce. If you have any idea why this is happening you are more than welcome to write a patch. |
The problem is well reproducible on 3 (three) my computers. I use:
each pm-suspend start has ~30% chance to see the bug. |
Also version 4.10 never hangs. |
Additional information: Now my i3block has hung up. I looked through 11938 ? T 0:00 /bin/sh -c i3blocks -c ~/.i3/blocks
11939 ? T 0:02 i3blocks -c /home/unera/.i3/blocks
then I did: kill -CONT 11939 And my i3block began work without i3 restart. So: i3 hangs because it received SIGSTOP, but SIGCONT was lost somewhere. |
Hi! I've just installed Debian/i3 to new laptop and the bug is reproducible, too. |
Additional information: statusbar hangs up, too if:
|
SIGSTOP/SIGCONT are only sent when i3bar goes into hide mode (so that the child process doesn’t unnecessarily compute updates which are invisible anyway). Are you using i3bar’s hide mode? If yes, can you try going into hide mode and back to bar mode when you have the problem and see if that gets the process unstuck? If no, can you run
That’s likely a separate problem. Can you file a separate issue for that please? |
I confirm what @unera reports: it also happens on my machine, usually after suspending it. I'm using systemd. Sending SIGCONT to the process helps too. Maybe the problem happens only when you go fullscreen and then suspend? |
I was able to reproduce it with following scenario:
EDIT: this is how output of my strace run looks like (IP addresses replaced with Xes)
|
Py3status have the same problem. See ultrabug/py3status#941. |
Same issue for me. I use |
Any news on when this will be fixed? |
Once @dfoxfranke (or somebody else) moves pull request #3761 forward. If you’re in a hurry, I recommend you build your own version of i3 with that pull request applied. |
I don't like this feature and how it is implemented. Signals aren't reliable form of communication. More importantly, the possibility of erroneously suspending a status bar really isn't worth the hassle of having that feature. To makes matters worse, i3bar does not offer a way to opt-out of suspension. A process can't intercept SIGSTOP, so status bar implementations that expect to run at all times are screwed. You are right, I am "in hurry", so I can send a pull request, that removes the code, sending SIGSTOP/SIGCONT. I don't want to take over #3761 and invest effort in fixing this feature only for it to get broken again later (and breaking it is apparently too easy). |
I’m not convinced that removing the code is the best option. If you don’t want to contribute a proper fix, that’s okay. But we definitely want to try fixing this issue before we remove the feature. |
Are you sure, that you aren't overestimating practical usefulness of SIGSTOP? When people expect to preserve charge of notebook's battery, they suspend. This is more reliable that SIGSTOP and actually shuts down all processes, that can cause power drain. Saving power when lid is closed (without suspending!) sounds like somewhat obscure use case, that comes in play once in a while, but does not make big difference. Yet you are triggering the behaviour in question for all devices — even ones without a battery. If you have concrete concerns about power use of i3status, wouldn't it be better to fix the specific problems with it? That would actually decrease power use for everyone and at all times — not just when lid is closed or monitor is shut down. |
I agree, but that’s not the use-case for the SIGSTOP feature. Instead, the following two scenarios were the main motivation:
|
I don't have strong opinions, but we could also just stop the process and spawn a new one rather than suspend(?) |
This bug report isn't about suspension method. The problem is: i3bar sometimes suspends i3status and never resumes it again. The method does not matter, because the status bar isn't being resumed at all. |
I've tried #3761 and it doesn't fix the issue - especially when using a compositing manager, i3status is pretty much stuck forever after changing display configuration, unless I SIGCONT it manually. I would prefer a simple way to disable the SIGSTOP feature completely, as it's useless for me. Other applications I have always running use several magnitudes more CPU / battery in idle than i3bar/i3status ... |
I ran into a similar issue, and I managed to turn off sig stop/count by setting the stop_signal/cont_signal options of the i3bar protocol: https://i3wm.org/docs/i3bar-protocol.html |
I was using My |
This is upstream bug in i3. All i3 status bars, no matter the implementation language, are equally vulnerable to it. There is nothing that can be done about it by i3status or it's alternatives. |
Following the reproduction instructions from i3#3242 (comment) For me, i3#3242 happened when the following sequence executed: 1. Fullscreening window correctly calls `stop_child()` in https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685 2. Xrandr change, `reconfig_windows()` is called and `output->visible` is set to `true` in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791 3. When the window's fullscreen is disabled, `handle_visibility_notify()` returns in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677 because previously `output->visible` was set to `true` To fix this, I call `cont_child()` more leniently since it is a no-op when the child is not stopped. Fixes i3#3242 Closes i3#3761
Please see if #3996 fixes your issue |
Following the reproduction instructions from #3242 (comment) For me, #3242 happened when the following sequence executed: 1. Fullscreening window correctly calls `stop_child()` in https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685 2. Xrandr change, `reconfig_windows()` is called and `output->visible` is set to `true` in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791 3. When the window's fullscreen is disabled, `handle_visibility_notify()` returns in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677 because previously `output->visible` was set to `true` To fix this, I call `cont_child()` more leniently since it is a no-op when the child is not stopped. Fixes #3242 Closes #3761
Thanks for fixing (?) this. In case this issue resurfaces again, is it possible to somehow make it more obvious, that status bar is hung and the status line isn't being updated? Can i3 somehow fill the window of suspended status bar with solid color until it is repainted? |
I don't see the value in going out of our way to implement that. I can put some debug log messages though. |
Mentioned in i3#3242
Following the reproduction instructions from #3242 (comment) For me, #3242 happened when the following sequence executed: 1. Fullscreening window correctly calls `stop_child()` in https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685 2. Xrandr change, `reconfig_windows()` is called and `output->visible` is set to `true` in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791 3. When the window's fullscreen is disabled, `handle_visibility_notify()` returns in this line: https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677 because previously `output->visible` was set to `true` To fix this, I call `cont_child()` more leniently since it is a no-op when the child is not stopped. Fixes #3242 Closes #3761
@orestisfl |
The bar is still paused, just continued more liberally |
i3bar has a "power savings" feature that pauses the bar when it is hidden or obscured by a fullscreen app. However this becomes a problem for some users who use status line generators such as i3status-rust that have blocks that need to run at all times. A hacky way to prevent this from happening is to set stop_signal to a signal that won't cause the status line generator program to stop, however I do not believe that is a good solution. This PR adds an option on the i3 side to allow the user to disable this feature in the first place. This has surprised users a fair amount of time over the past few years, to show a few: greshake/i3status-rust#503 greshake/i3status-rust#694 (comment) https://faq.i3wm.org/question/4631/dont-sigstop-when-in-hide-mode.1.html i3#3242 (comment) https://www.reddit.com/r/i3wm/comments/gm6yfh/is_there_a_painless_way_to_keep_i3bar_children/
From time to time i3status/blocks bar hangs up.
I think the bar hangs often after suspend/resume. If CPU usage reaches 100% the bar hangs up, too.
Example: Now is 10:57, but the bar did hang at 10:39:
PS:
Binary i3 version: 4.13 (2016-11-08) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.13 (2016-11-08) (pid 5895)o abort…)
Loaded i3 config: /home/unera/.i3/config (Last modified: Ср 07 мар 2018 21:56:48, 3329319 seconds ago)
The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3
https://logs.i3wm.org/logs/5703935746637824.bz2
The text was updated successfully, but these errors were encountered: