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

Corrupted Statusbar tips cache causes panic #1944

Open
Tracked by #1568
raphCode opened this issue Nov 16, 2022 · 5 comments · May be fixed by #1956
Open
Tracked by #1568

Corrupted Statusbar tips cache causes panic #1944

raphCode opened this issue Nov 16, 2022 · 5 comments · May be fixed by #1956

Comments

@raphCode
Copy link
Contributor

raphCode commented Nov 16, 2022

If the file /tmp/zellij-<uid>/status-bar-tips.cache is corrupted, zellij won't start up or existing sessions crash when a new tab is opened:

Error occurred in server:

  × Thread 'wasm' panicked.
  ├─▶ Originating Thread(s)
  │       1. ipc_server: NewClient
  │       2. pty_thread: NewTab
  │       3. screen_thread: NewTab
  │       4. plugin_thread: Load
  │
  ├─▶ At zellij-server/src/wasm_vm.rs:670:5
  ╰─▶
A panic occured in a plugin
PanicInfo {
    payload: Any { .. },
    message: Some(
        called Result::unwrap() on an Err value: Serde(Error("trailing characters", line: 1, column: 238)),
    ),
    location: Location {
        file: "default-plugins/status-bar/src/tip/utils.rs",
        line: 40,
        col: 83,
    },
    can_unwind: true,
}

I experienced the corruption sometimes when starting multiple zellij sessions in parallel.

@raphCode
Copy link
Contributor Author

I just hit a different panic in the same line, so the PathBuf there might fail too.
My build is at dc92290

PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: IoPath(Os { code: 29, kind: Uncategorized, message: "I/O error" }, "/tmp/status-bar-tips.cache"),
    ),
    location: Location {
        file: "default-plugins/status-bar/src/tip/utils.rs",
        line: 40,
        col: 83,
    },
    can_unwind: true,
}

@rdeaton rdeaton linked a pull request Nov 18, 2022 that will close this issue
@imsnif
Copy link
Member

imsnif commented Feb 27, 2023

I think @har7an already solved this, right?

@har7an
Copy link
Contributor

har7an commented Mar 5, 2023

@imsnif I don't think so. A quick look at the code there suggests I didn't improve the error handling over simple unwrap statements (yet). My other "stability" PR was concerned with the ~/.cache/zellij folder, but the status bar tips cache is located in /tmp, so that won't help here I'm afraid. @raphCode would you mind trying to reproduce this with current main to see what happens now?

@raphCode
Copy link
Contributor Author

raphCode commented Mar 8, 2023

Confirmed crash on 5cb3fb4.

@ondrej-ivanko
Copy link

I had the same error as @raphCode. It started happening since 2 days ago.

It happens on first zellij startup and then never again. I suspect it might related to when my laptop ungracefully shutsdown and maybe the status-bar-tips.cache is not correctly cleaned up. Also the location in panic msg points to /tmp/status-bar-tips.cache, while in fact the cache appears to be in /tmp/zellij-1000/ dir on my filesystem.

zellij.log

status-bar-tips.cache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants