Open dj95 opened 4 months ago
Hey, I did not intend to close this bug but github likes to hijack workflows. So @dj95 - I think this should be fixed by https://github.com/zellij-org/zellij/pull/3664 - would you mind checking and letting me know?
No worries.
I rebuild zellij in the main branch and tried to start a layout with the https location, but zellij is not starting anymore.
./target/release/zellij -l crash.kdl
Cache is cleared and the layout is the one from the first comment. This is the complete log, that is printed:
ERROR |zellij::sessions | 2024-10-11 16:03:07.298 [main ] [src/sessions.rs:121]: Failed to read session_info cache folder: ""/Users/daniel/Library/Caches/org.Zellij-Contributors.Zellij/0.41.0/session_info"": Os { code: 2, kind: NotFound, message: "No such file or directory" }
ERROR |zellij::sessions | 2024-10-11 16:03:07.298 [main ] [src/sessions.rs:121]: Failed to read session_info cache folder: ""/Users/daniel/Library/Caches/org.Zellij-Contributors.Zellij/0.41.0/session_info"": Os { code: 2, kind: NotFound, message: "No such file or directory" }
INFO |zellij_client | 2024-10-11 16:03:07.298 [main ] [zellij-client/src/lib.rs:182]: Starting Zellij client!
INFO |zellij_server | 2024-10-11 16:03:07.311 [main ] [zellij-server/src/lib.rs:449]: Starting Zellij server!
WARN |zellij_utils::kdl | 2024-10-11 16:03:07.314 [main ] [zellij-utils/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file
WARN |zellij_utils::kdl | 2024-10-11 16:03:07.314 [main ] [zellij-utils/src/kdl/mod.rs:695]: Converting new tab action without arguments, original action saved to .bak.kdl file
ERROR |zellij_client::stdin_ansi| 2024-10-11 16:03:07.315 [stdin_handler] [zellij-client/src/stdin_ansi_parser.rs:124]: Failed to open STDIN cache file: Os { code: 2, kind: NotFound, message: "No such file or directory" }
INFO |zellij_server | 2024-10-11 16:03:07.315 [main ] [zellij-server/src/lib.rs:1378]: Compiling plugins using Cranelift
INFO |zellij_server::plugins | 2024-10-11 16:03:07.316 [wasm ] [zellij-server/src/plugins/mod.rs:231]: Wasm main thread starts
WARN |zellij_utils::ipc | 2024-10-11 16:03:07.359 [router ] [zellij-utils/src/ipc.rs:233]: Error in IpcReceiver.recv(): InvalidMarkerRead(Error { kind: UnexpectedEof, message: "failed to fill whole buffer" })
ERROR |zellij_client | 2024-10-11 16:03:07.359 [router ] [zellij-client/src/lib.rs:414]: Received empty message from server
Maybe I can pinpoint the commit this weekend, at which the download breaks.
Edit: without the http location the layout seems to work.
Hum... I'm unfortunately not reproducing this. Just a guess: could it be that you compiled Zellij with cargo x build --release
or some such? This could mean that the built-in plugins were not compiled for the latest API and might explain the crash.
Could you try with either cargo x run -- -l ./crash.kdl
or with cargo x install /path/to/release; /path/to/release -l ./crash.kdl
? If you still get the crash I'd be very much interested to dig into this further when you have the time.
Thanks for the super quick response!
I compiled it with cargo xtask build -r
and executed the binary afterwards. Let me try your suggestion tomorrow. Maybe it's some macOS specific thing. But I never got them with building zellij with cargo xtask build
before. Just with brew
Alright, I think I might have found the issue. I couldn't reproduce this exactly, but if I deleted the cache folder and started Zellij with this layout I sometimes got a case in which the plugin itself did not load. The difference in error behavior could be due to platform differences...
I issued a fix for this in https://github.com/zellij-org/zellij/pull/3665 and merged it to main. Could you give it another spin when you have the time?
Unfortunately, it still crashes. When bisecting the changes, it comes to this commit, that introduces the crashes: https://github.com/zellij-org/zellij/commit/ba2772e31ca062cba5c2b2b881fdb68e0093216e
Not sure where it exactly comes from. The cache just contains a .part
file, that's empty. The log does not say anything unfortunately.
It dies at the let res = client.send_async(request).await?;
. In case it is interesting for you, this is the stack trace of the crashing thread:
Edit This is the command I used for running zellij:
cargo x run -- -l crash.kdl --debug --config /dev/null
Hey @dj95 - thanks for following through. I might have to use you a little bit for troubleshooting here, as I am unfortunately not reproducing. I have a suspicion that this can be solved by: https://github.com/zellij-org/zellij/issues/3036#issuecomment-2024214955 (i.e. that it's an issue with the curl version that is being vendored during the compilation process). As a first step, could you follow the relevant instructions in the comment and give it a go to see if it helps?
Just to update those following, the issue on macOS was solved through #3668 - thanks @dj95 !
When a plugin is loaded via http multiple times in parallel, the plugin breaks for zellij. On the first glance, it does not look like a common issue, but it is commonly reproduced with status bar plugins. When a user defines a layout with multiple tabs, on a clean cache zellij will start the download multiple times and corrupts the file.
Basic information
zellij --version
: v0.40.1stty size
: 20 140uname -av
orver
(Windows): Linux 57ffe693fca0 6.5.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 27 00:18:38 UTC 2024 aarch64 GNU/LinuxExcerpt from the zellij log:
Minimal reproduction
Loading the following layout will show the error line at the bottom. Removing all tabs except one, clearing the cache and loading the layout will work.
Other relevant information
I got several reports of plugins not loading via https, which might be caused by this issue:
https://github.com/dj95/zjstatus/issues/72 https://github.com/dj95/zjstatus/issues/73