Skip to content
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

Scrolling (too quickly) causes zellij session to be detached and it must be killed to continue. #2063

Closed
rob-p opened this issue Jan 3, 2023 · 16 comments

Comments

@rob-p
Copy link

rob-p commented Jan 3, 2023

First, thank you for zellij; it's great!

The problem I am having is that when I have a terminal with a long history (i.e. a lot of text), and I scroll up too quickly, I get booted out of my zellij session. After this, I am unable to reattach it, and I can't even start a new session until I kill the existing sessions. I can see the session out of which I have been booted, and it shows up in ps with the status Sl. I tried e.g. sending it a CONT signal, but to no avail.

In the cases where this has happened to me (it's occurred several times), I was scrolling up using the mouse, and each time I was scrolling quickly. It doesn't seem to happen when I scroll slowly, or when I scroll back using the keyboard bindings.

Also, perhaps strangely, processes attached to the unconnectable session are still going (I had a jupyter notebook in one tab, and I was still able to interact with the kernel, even though I couldn't reattach the zellij session from which it was launched).

Basic information

zellij --version: zellij 0.34.3
stty size: 72 258
uname -av or ver(Windows): Linux newton 5.4.0-132-generic #148-Ubuntu SMP Mon Oct 17 16:02:06 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

@imsnif
Copy link
Member

imsnif commented Jan 3, 2023

As mentioned on Discord, sorry for the experience and thanks for looking into this! Did you get some sort of error message when it happened? Did you see something in the logs (by default they're in /tmp/zellij-/zellij-log/zellij.log)?

@rob-p
Copy link
Author

rob-p commented Jan 3, 2023

Thanks for the super-quick response. I did not get any message when this happened, I was just booted back to the terminal from which I launched Zellij. My /tmp was cleaned since this last happened, so I don't have that log, but if it occurs again, I'll capture any log output ASAP.

@rob-p
Copy link
Author

rob-p commented Jan 3, 2023

Ok, it happened again! I am attaching the tail of the log below.

zellij_tail.log

@imsnif
Copy link
Member

imsnif commented Jan 3, 2023

Hum... nothing useful in the log, I'm afraid. Is there a way you can consistently reproduce this? Even semi-consistently? If so I can try to give you a version with some extra logging or some such.

Also, when you got booted to your terminal, did you see any message? Even just the "Bye from Zellij" prompt?

@rob-p
Copy link
Author

rob-p commented Jan 5, 2023

Hi @imsnif,

So yes, I can reproduce this reliably. I start a zellij session, navigate to a directory with many files / subdirectories and ls a few times (really anything to create a scroll buffer). Then, I attempt to scroll up very quickly with the mouse. This reliably creates the un-recoverable hang on my system.

I do get a message when zellij drops me back to the terminal where I started it:

Error occurred in server:
Buffer full

In the most recent re-creation of this, the tail of my log looks like so:

INFO   |zellij_client            | 2023-01-04 22:50:42.266 [main      ] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.3/src/lib.rs:140]: Starting Zellij client!
INFO   |zellij_server            | 2023-01-04 22:50:42.270 [main      ] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.34.3/src/lib.rs:213]: Starting Zellij server!
INFO   |zellij_client::input_hand| 2023-01-04 22:50:42.325 [input_handler] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.3/src/input_handler.rs:151]: sending done loading
INFO   |zellij_client::input_hand| 2023-01-04 22:50:42.325 [input_handler] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.3/src/input_handler.rs:155]: done sent done loading
INFO   |zellij_server::plugins   | 2023-01-04 22:50:42.333 [wasm      ] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.34.3/src/plugins/mod.rs:61]: Wasm main thread starts
INFO   |zellij_utils::input::plug| 2023-01-04 22:50:42.336 [wasm      ] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-utils-0.34.3/src/input/plugins.rs:139]: Plugin 'tab-bar.wasm' exists in the 'PLUGIN DIR' at '/home/rob/.local/share/zellij/plugins/' but is being ignored
INFO   |zellij_utils::input::plug| 2023-01-04 22:50:42.387 [wasm      ] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-utils-0.34.3/src/input/plugins.rs:139]: Plugin 'status-bar.wasm' exists in the 'PLUGIN DIR' at '/home/rob/.local/share/zellij/plugins/' but is being ignored
INFO   |zellij_client::input_hand| 2023-01-04 22:50:42.825 [input_handler] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.3/src/input_handler.rs:158]: sending done loading
INFO   |zellij_client::input_hand| 2023-01-04 22:50:42.825 [input_handler] [/home/rob/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.3/src/input_handler.rs:162]: done sent done loading

As you can see, zellij was only open briefly, since I started this session just to repro this bug. So, this is the entirety of the log for this session.

@mclark4386
Copy link

mclark4386 commented Feb 11, 2023

Just got this same thing in iterm2 in MacOS. Happy to help however I can! Version 0.34.4 btw.

@hudon
Copy link

hudon commented Feb 11, 2023

Same issue with steps here: #2041 (comment)

@JamesPatrickGill
Copy link

Im also having this same behaviour - MacOS with kitty term. I will add that additionally I am seeing before this occurs that attempting to scroll can be difficult full stop with focus repeatedly drawn to my prompt as I attempt to scroll upwards - making it impossible to scroll up, and then the crash occurs.

Once this occurs I can't seem to get zellij working from any terminal without a system restart btw.

@mclark4386
Copy link

Im also having this same behaviour - MacOS with kitty term. I will add that additionally I am seeing before this occurs that attempting to scroll can be difficult full stop with focus repeatedly drawn to my prompt as I attempt to scroll upwards - making it impossible to scroll up, and then the crash occurs.

Once this occurs I can't seem to get zellij working from any terminal without a system restart btw.

You can use something like htop or the Activity Monitor to find and kill the hung zellij server that's in the background.

@kescobo
Copy link

kescobo commented Mar 11, 2023

I was just working on opening an issue for this exact same thing, when I thought I should check if others are experiencing it. Pasting what I had already written in case it's helpful, but basically same behavior (large scroll buffer, fast scrolling, unrecoverable crash). I tend to use zellij for long-running processes on a remote server, and this has lost me a lot of work in the past couple of weeks :-( (mostly I blame my MX master mouse because it allows me to scroll so fast 😅, and my own idiocy because I keep forgetting)

Logs and description
❯ cat /tmp/zellij-1000/zellij-log/zellij.log -p
INFO   |zellij_client            | 2023-03-10 21:38:29.893 [main      ] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.4/src/lib.rs:140]: Starting Zellij client!
INFO   |zellij_server            | 2023-03-10 21:38:29.894 [main      ] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.34.4/src/lib.rs:213]: Starting Zellij server!
INFO   |zellij_client::input_hand| 2023-03-10 21:38:29.947 [input_handler] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.4/src/input_handler.rs:151]: sending done loading
INFO   |zellij_client::input_hand| 2023-03-10 21:38:29.947 [input_handler] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.4/src/input_handler.rs:155]: done sent done loading
INFO   |zellij_server::plugins   | 2023-03-10 21:38:29.959 [wasm      ] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-server-0.34.4/src/plugins/mod.rs:61]: Wasm main thread starts
INFO   |zellij_utils::input::plug| 2023-03-10 21:38:29.963 [wasm      ] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-utils-0.34.4/src/input/plugins.rs:139]: Plugin 'tab-bar.wasm' exists in the 'PLUGIN DIR' at '/home/kevin/.local/share/zellij/plugins/' but is being ignored
INFO   |zellij_utils::input::plug| 2023-03-10 21:38:29.972 [wasm      ] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-utils-0.34.4/src/input/plugins.rs:139]: Plugin 'status-bar.wasm' exists in the 'PLUGIN DIR' at '/home/kevin/.local/share/zellij/plugins/' but is being ignored
INFO   |zellij_client::input_hand| 2023-03-10 21:38:30.448 [input_handler] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.4/src/input_handler.rs:158]: sending done loading
INFO   |zellij_client::input_hand| 2023-03-10 21:38:30.448 [input_handler] [/home/kevin/.cargo/registry/src/github.com-1ecc6299db9ec823/zellij-client-0.34.4/src/input_handler.rs:162]: done sent done loading

Basic information

  • zellij --version: zellij 0.34.4
  • stty size: 103 125
  • uname -av or ver(Windows): Linux vkclab-ada 6.0.6-76060006-generic #202210290932~1669062050~22.04~d94609a SMP PREEMPT_DYNAMIC Mon N x86_64 x86_64 x86_64 GNU/Linux (pop!_OS)

☝️ that's for the server where the crash occurred, my local system is OpenSUSE Tumbleweed

❯ uname -av
Linux localhost.localdomain 6.2.1-1-default #1 SMP PREEMPT_DYNAMIC Mon Feb 27 11:39:51 UTC 2023 (69e0e95) x86_64 x86_64 x86_64 GNU/Linux

❯ alacritty --version
alacritty 0.11.0

Further information

# fish shell
while test -f .profile
      echo (random)
      sleep 0.001
  end

I let that run for about 10 sec, then ctrl C. Then scroll up rapidly, zellij crashes with:

Error occurred in server:
Buffer full

And I can't reconnect or even start a new session unless I kill the zellij process.

@imsnif
Copy link
Member

imsnif commented Mar 11, 2023

Hey @kescobo - I'm really sorry for this experience. Losing work sucks and please do not blame yourself! This is a Zellij bug.

That being said, this should be very much mitigated (hopefully to the level of non-existence) in version 0.35.1 and above. There's also some pretty nice features added that will hopefully delight you as well. Maybe give it a try?

@kescobo
Copy link

kescobo commented Mar 11, 2023

Oh man, I see I'm several versions behind on the server 🤦. I have not been good about updating then. Thanks for the fix! I'll try to test it next week.

@kescobo
Copy link

kescobo commented Mar 12, 2023

Actually tested just now using the same procedure above - no crash 🎉

@hudon
Copy link

hudon commented Mar 12, 2023

Installed 0.35.2 on both local and remote, and I can no longer reproduce this bug #2041 (comment). Thank you so much!!

@mclark4386
Copy link

Same! Thank you!

@har7an
Copy link
Contributor

har7an commented Apr 22, 2023

Seems to have been fixed by #2068, feel free to reopen this issue if the problems occur again.

@har7an har7an closed this as completed Apr 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants