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

"session_serialization false" not functioning as expected #2995

Open
YoureMySoul opened this issue Dec 8, 2023 · 2 comments
Open

"session_serialization false" not functioning as expected #2995

YoureMySoul opened this issue Dec 8, 2023 · 2 comments

Comments

@YoureMySoul
Copy link

Issue description

While monitoring the processes, I noticed that Zellij was continuously writing to the storage, unlike most programs. I identified the specific files being written. However, when I attempted to disable the 'Session Resurrection', it didn't work as expected.

Both the command-line argument and the configuration option are not working.

I use the fatrace command to identify which files are being written to:

[debug_zellij@archlinux ~] $ sudo fatrace -f W -t
00:17:22.389825 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:23.391909 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:23.392063 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:24.393154 zellij(78974): W   /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:24.393196 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:25.393847 zellij(78974): W   /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:25.393999 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:26.395120 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:26.395295 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:27.396470 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:27.396627 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:28.397757 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:28.397915 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:29.399049 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:29.399202 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:30.400436 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:30.400606 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:31.401889 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:31.402071 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:32.411035 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:32.411174 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:33.412431 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:33.412569 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:34.413885 zellij(78974): WO  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
00:17:34.414043 zellij(78974): CW  /home/debug_zellij/.cache/zellij/0.39.2/session_info/inventive-hill/session-metadata.kdl
^C%  

Thank you for creating this amazing program. I truly appreciate and enjoy using it.

Minimal reproduction

zellij --config=/dev/null options --session-serialization false

Basic information

zellij --version: zellij 0.39.2

uname -av: Linux archlinux 6.6.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 04 Dec 2023 00:29:19 +0000 x86_64 GNU/Linux

@YoureMySoul
Copy link
Author

For the last three weeks, I have been using this workaround:

diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs
index 05794495..2b50e1df 100644
--- a/zellij-utils/src/consts.rs
+++ b/zellij-utils/src/consts.rs
@@ -43,9 +43,9 @@ const fn system_default_data_dir() -> &'static str {
 lazy_static! {
     pub static ref ZELLIJ_PROJ_DIR: ProjectDirs =
         ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap();
-    pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.cache_dir().to_path_buf();
+    pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.runtime_dir().expect("[TEMPORARY]: YOU HAVE CHANGED THIS. DONT FORGET!. WHEN IN DOUBT, REINSTALL!").to_path_buf();
     pub static ref ZELLIJ_SESSION_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR
-        .cache_dir()
+        .runtime_dir().expect("[TEMPORARY]: YOU HAVE CHANGED THIS. DONT FORGET!. WHEN IN DOUBT, REINSTALL!")
         .to_path_buf()
         .join(format!("{}", Uuid::new_v4()));
     pub static ref ZELLIJ_PLUGIN_PERMISSIONS_CACHE: PathBuf =

@pedromfedricci
Copy link
Contributor

Very likely the same problem as #3127.

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