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

starting with layout causes 100% CPU usage #2893

Open
cgahr opened this issue Oct 25, 2023 · 2 comments
Open

starting with layout causes 100% CPU usage #2893

cgahr opened this issue Oct 25, 2023 · 2 comments

Comments

@cgahr
Copy link

cgahr commented Oct 25, 2023

How to reproduce

Starting zellij with the following layout causes 100% usage:

layout split_direction="vertical" {
    pane 
    pane split_direction="horizontal" {
        pane size="80%"
        pane size="20%"
    }
}

Log:

Command used:

$ zellij --debug --layout=test

Received empty message from server

This command crashes without pressing Ctrl + q.
Log:

WARN   |zellij_utils::input::layo| 2023-10-25 22:38:04.626 [main      ] [zellij-utils/src/input/layout.rs:962]: Failed to read swap layout file: /home/cgahr_mpi/.config/zellij/layouts/test.swap.kdl. Error: Os { code: 2, kind: NotFound, message: "No such file or directory" } 
INFO   |zellij_client            | 2023-10-25 22:38:04.634 [main      ] [zellij-client/src/lib.rs:152]: Starting Zellij client! 
INFO   |zellij_server            | 2023-10-25 22:38:04.642 [main      ] [zellij-server/src/lib.rs:245]: Starting Zellij server! 
INFO   |zellij_server            | 2023-10-25 22:38:04.700 [main      ] [zellij-server/src/lib.rs:913]: Compiling plugins using Cranelift 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:806]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:907]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:806]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:815]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:907]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:815]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:826]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:907]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:826]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:837]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:907]: Server ready, retrying sending instruction. 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:837]: Server not ready, trying to place instruction in retry queue... 
WARN   |zellij_server::route     | 2023-10-25 22:38:04.701 [server_router] [zellij-server/src/route.rs:837]: Server not ready, trying to place instruction in retry queue... 
INFO   |zellij_server::plugins   | 2023-10-25 22:38:04.702 [wasm      ] [zellij-server/src/plugins/mod.rs:137]: Wasm main thread starts 
ERROR  |???                      | 2023-10-25 22:38:04.713 [screen    ] [zellij-server/src/panes/tiled_panes/mod.rs:822]: a non-fatal error occured

Caused by:
    0: failed to resize tab vertically
    1: Ran out of room for spans 
WARN   |zellij_utils::ipc        | 2023-10-25 22:38:11.949 [router    ] [zellij-utils/src/ipc.rs:222]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }) 
ERROR  |zellij_client            | 2023-10-25 22:38:11.951 [router    ] [zellij-client/src/lib.rs:348]: Received empty message from server 

Basic information

zellij --version: zellij 0.38.2
stty size: 52 106
uname -av: Linux cgahr-ThinkPad-T14-Gen-1 6.2.0-35-generic #35~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Oct 6 10:23:26 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
alacritty --version: alacritty 0.12.3

@imsnif
Copy link
Member

imsnif commented Oct 25, 2023

I agree we should error on this instead of crashing, but I think what you want is:

layout {
    pane split_direction="vertical" {
        pane 
        pane split_direction="horizontal" {
            pane size="80%"
            pane size="20%"
        }
    }
}

@cgahr
Copy link
Author

cgahr commented Oct 29, 2023

Yeah, I quickly realized that my config is wrong.

But erroring out would probably be better.

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

2 participants