wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.11k stars 771 forks source link

Wezterm Freeze when trying to close tab after long session #6190

Open z0l1 opened 1 week ago

z0l1 commented 1 week ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20240203-110809-5046fc22

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

I found this version to be the latest.

My issue seems very similar to the following https://github.com/wez/wezterm/issues/3895 except my system doesn't freeze, only wezterm.

I am using zsh with ohmyzsh.

I am using wezterm for a nodejs building process that watches the files and builds automatically on change. When I leave from work I usually just log out of windows so this process can run for days without stopping.

I am using multiple panes and multiple tabs.

Logs logs are from $HOME\.local\share\wezterm I also skimmed through the logs (also linked them) but I don't think they are useful. They only contain warnings related to zsh linux paths not working as initial cwd-s for the new panes (I think).

To Reproduce

I find it really hard to reproduce. It happens randomly (to me it seems random) after my long sessions when I try to close my second tab (which does not contain the long running process).

Configuration

my wezterm.lua. I don't feel like it is relevant, but I'll just leave it here

local wezterm = require("wezterm")
local config = wezterm.config_builder()

config.color_scheme = 'rose-pine'
config.font = wezterm.font('GoMono Nerd Font Mono')

config.default_prog = { "C:\\Program Files\\Git\\bin\\bash.exe -i -l" }
-- config.default_prog = { "C:\\Program Files\\Git\\bin\\sh.exe" }

local my_cwd = "C:\\work\\"
-- config.default_cwd = "/c/work/"
config.default_cwd = my_cwd

config.keys = {
    {
        key = "l",
        mods = "ALT|SHIFT",
        action = wezterm.action.SplitHorizontal({
            cwd = my_cwd
        }),
    },
    {
        key = "j",
        mods = "ALT|SHIFT",
        action = wezterm.action.SplitVertical({
            cwd = my_cwd
        }),
    },
    {
        key = "h",
        mods = "ALT|SHIFT",
        action = wezterm.action.CloseCurrentPane({ confirm = true }),
    },

    {
        key = "n",
        mods = "ALT|SHIFT",
        action = wezterm.action.RotatePanes("Clockwise"),
    },
    {
        key = "p",
        mods = "ALT|SHIFT",
        action = wezterm.action.RotatePanes("CounterClockwise"),
    },

    {
        key = "w",
        mods = "ALT|SHIFT",
        action = wezterm.action.CloseCurrentPane({ confirm = true }),
    },

    {
        key = "m",
        mods = "ALT|SHIFT",
        action = wezterm.action.PaneSelect({
            -- mode = "SwapWithActive",
            alphabet="jkl;asdf"
        })
    },

}

return config

Expected Behavior

No response

Logs

===================== wezterm-gui.exe-log-38764.txt ===================== 14:42:25.724 WARN mux::domain > Directory "/c/work/[my-git-folder-name]" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3)

===================== wezterm-gui.exe-log-29000.txt ===================== 09:45:31.381 WARN mux::domain > Directory "/c/work/[my-git-folder-name]" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 07:59:59.139 WARN mux::domain > Directory "/c/work/[my-git-folder-name]" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 12:47:17.841 INFO wezterm_gui::termwindow > clicking [my-git-repo-url] 12:47:21.349 INFO wezterm_gui::termwindow > clicking https://nodejs.org/api/errors.html#errors_common_system_errors) 16:03:46.136 INFO wezterm_gui::termwindow > clicking http://127.0.0.1:8010/

===================== wezterm-gui.exe-log-45928.txt ===================== 16:03:01.073 WARN mux::domain > Directory "/c/work" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 16:03:35.700 WARN mux::domain > Directory "/c/work" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 16:03:44.922 WARN mux::domain > Directory "/c/work" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 16:03:52.169 WARN mux::domain > Directory "/c/work" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3) 16:03:56.407 WARN mux::domain > Directory "/c/Users/[my-username]" is not readable and will not be used for the command we are spawning: The system cannot find the path specified. (os error 3)

Anything else?

Please just tell me if you need anything else. I am happy to share anything, run some analysis tool alongside wezterm or share any other detailed configuration/log I have missed.

I really like the product but this random freezing/crashing makes me really anxious anytime I am about to close something.

metalinspired commented 2 days ago

Happens sporadically to me too. Kubuntu 24.04 using Wayland