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

Open
unera opened this Issue Apr 15, 2018 · 20 comments

Comments

Projects
None yet
6 participants
@unera

unera commented Apr 15, 2018

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

@i3bot

This comment has been minimized.

i3bot commented Apr 15, 2018

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.

@unera

This comment has been minimized.

unera commented Apr 15, 2018

Please reopen the ticket. 4.15 version hangs up, too:

logfile: https://logs.i3wm.org/logs/5660082654150656.bz2

$ i3 --moreversion 2>&- || i3 --version
Binary i3 version: 4.15 (2018-03-10) © 2009 Michael Stapelberg and contributors
Running i3 version: 4.15 (2018-03-10) (pid 5895)o abort…)
Loaded i3 config: /home/unera/.i3/config (Last modified: Ср 07 мар 2018 21:56:48, 3330659 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

@i3bot i3bot added 4.15 and removed unsupported-version labels Apr 15, 2018

@unera

This comment has been minimized.

unera commented Apr 15, 2018

$ 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

@Airblader Airblader reopened this Apr 15, 2018

@Airblader

This comment has been minimized.

Member

Airblader commented Apr 15, 2018

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.

@unera

This comment has been minimized.

unera commented Apr 15, 2018

You said it also happens with i3status

time ago I opened the same ticket #1904 (i3 4.10)

I used i3status then.

The ticket was fixed and I used 4.10.
Last week I upgraded i3 to 4.13 (Debian/stable), then (Now) to 4.15.

statusbar hangs up again.

The bar often hangs after suspend/resume, but from time to time hangs if CPU usage reaches 100%.
Alt-Shift-r (i3 restart) solve the problem.

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
}
@Airblader

This comment has been minimized.

Member

Airblader commented Apr 16, 2018

Thanks for the confirmation that you can reproduce it with i3status, too.

@Airblader Airblader added the bug label Apr 16, 2018

@orestisf1993

This comment has been minimized.

Member

orestisf1993 commented Apr 28, 2018

Does your i3bar update correctly? ie, do the workspace buttons update?

@unera

This comment has been minimized.

unera commented Apr 28, 2018

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).

@orestisf1993

This comment has been minimized.

Member

orestisf1993 commented Apr 28, 2018

Can you run i3status from the command line and see if you can get it to freeze?

@unera

This comment has been minimized.

unera commented May 1, 2018

Can you run i3status from the command line and see if you can get it to freeze?

I run 2 terminals:

  1. i3status -c .i3/status
  2. i3blocks

Then suspend/resume my laptop until i3bar hangs.

i3status/i3blocks in console continue work, but i3blocks in i3bar hangs.

See screenshot

ss

workspace buttons, tray icons are clickable.

@unera

This comment has been minimized.

unera commented May 19, 2018

Is there any chanсe the somebody will pay attention with my ticket?

ss

@orestisf1993

This comment has been minimized.

Member

orestisf1993 commented May 19, 2018

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.

@unera

This comment has been minimized.

unera commented May 19, 2018

I did pay attention to your ticket and regularly check my bar for hangs. Unfortunately, these issues are not easy to reproduce.

The problem is well reproducible on 3 (three) my computers.

I use:

  • Debian/stable,
  • sysvint (not systemd),
  • uswsusp,
  • laptop-mode-tools
  • acpi

each pm-suspend start has ~30% chance to see the bug.

@unera

This comment has been minimized.

unera commented May 19, 2018

Also version 4.10 never hangs.

@unera

This comment has been minimized.

unera commented May 19, 2018

Additional information:

Now my i3block has hung up.

I looked through ps ax, found the situation:


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.

@unera

This comment has been minimized.

unera commented Jun 29, 2018

Hi!

I've just installed Debian/i3 to new laptop and the bug is reproducible, too.

@unera

This comment has been minimized.

unera commented Jul 25, 2018

Additional information:

statusbar hangs up, too if:

  1. run i3 with i3status
  2. change system time (one-two hours back)
@stapelberg

This comment has been minimized.

Member

stapelberg commented Oct 7, 2018

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 strace -f -p $(pidof i3bar) -y -o /tmp/st -s 2048 and toggle hide mode/bar mode again, then provide the contents of /tmp/st please?

statusbar hangs up, too if:

  1. run i3 with i3status
  2. change system time (one-two hours back)

That’s likely a separate problem. Can you file a separate issue for that please?

@szborows

This comment has been minimized.

szborows commented Nov 6, 2018

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?

@szborows

This comment has been minimized.

szborows commented Nov 6, 2018

I was able to reproduce it with following scenario:

  1. Switch to single display (laptop one)
  2. Go fullscreen
  3. Suspend
  4. Un-suspend (restore?)
  5. Before switching back to non-fullscreen mode switch desktop configuration (I'm using xrandr for this)
  6. The process is stopped forever now. Even going back to non-fullscreen mode doesn't help.

EDIT: this is how output of my strace run looks like (IP addresses replaced with Xes)

5854  write(1<pipe:[40605]>, ",[{\"full_text\":\"\"},{\"\":\"\",\"full_text\":\"\342\231\252 20%\",\"name\":\"volume\",\"instance\":\"Master\",\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"MEM 9.4G/15.6G (61%)\",\"short_text\":\"61%\",\"name\":\"memory\",\"separator\":false,\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"HOME 9.8G\",\"short_text\":\"9.8G\",\"color\":\"#FF0000\",\"name\":\"disk\",\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"W: X.X.X.X\",\"short_text\":\"X.X.X.X\",\"color\":\"#00FF00\",\"name\":\"iface\",\"instance\":\"wlp2s0\",\"separator\":false,\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"E: down\",\"short_text\":\"down\",\"color\":\"#FF0000\",\"name\":\"iface\",\"instance\":\"eth0\",\"separator\":false,\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"BAT 98% CHR\",\"short_text\":\"98% CHR\",\"name\":\"battery\",\"separator_block_width\":15,\"markup\":\"none\"},{\"\":\"\",\"full_text\":\"2018-11-06 09:52:09\",\"name\":\"time\",\"separator_block_width\":15,\"markup\":\"none\"}]\n", 951) = 951
5854  rt_sigtimedwait([INT USR1 USR2 ALRM TERM CHLD IO RT_2 RT_3 RT_4 RT_5 RT_6 RT_7 RT_8 RT_9 RT_10 RT_11 RT_12 RT_13 RT_14 RT_15 RT_16 RT_17 RT_18 RT_19 RT_20 RT_21 RT_22 RT_23 RT_24 RT_25 RT_26 RT_27 RT_28 RT_29 RT_30 RT_31 RT_32], 0x7fff569f3260, NULL, 8) = -1 EINTR (Interrupted system call)
5854  --- SIGSTOP {si_signo=SIGSTOP, si_code=SI_USER, si_pid=5849, si_uid=1000} ---
5854  --- stopped by SIGSTOP ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment