zed icon indicating copy to clipboard operation
zed copied to clipboard

Re run the task, the process will not end

Open Avey777 opened this issue 9 months ago • 6 comments

Summary

1、The number of task processes will continue to increase . 2、Close the task terminal, the process has not ended

{
    "label": "core-api",
    "tags": ["core-api veb_livereload"],
    "command": "v -d veb_livereload watch -d log_debug run main.v",
    "args": ["-f", "etc/config_dev.toml"],
    "env": {},
    "cwd": "$ZED_WORKTREE_ROOT/core-api",
    "use_new_terminal": false,
    "allow_concurrent_runs": false,
    "reveal": "always",
    "hide": "never",
    "shell": "system",
    "show_summary": true,
    "show_output": true
  }

Steps to trigger the problem:

Image

Actual Behavior: Every reload adds a process Expected Behavior: There is only one process

Zed Version and System Specs

0.179.2

Avey777 avatar Mar 27 '25 08:03 Avey777

  1. Please provide your system specs as requested by the template ("zed: copy system specs" from the command palette)
  2. Does this happen with all tasks or just this one?
  3. What's your system shell?
  4. Can you provide a minimal set of steps necessary to reproduce? I'm wondering whether this might be your task process spawning something else which doesn't get cleaned up.

notpeter avatar Mar 27 '25 12:03 notpeter

  1. Please provide your system specs as requested by the template ("zed: copy system specs" from the command palette)
  2. Does this happen with all tasks or just this one?
  3. What's your system shell?
  4. Can you provide a minimal set of steps necessary to reproduce? I'm wondering whether this might be your task process spawning something else which doesn't get cleaned up.

All right. I'll send out the source code tomorrow.

Avey777 avatar Mar 27 '25 13:03 Avey777

OS(linux):

Image


source code:vprod-we.zip

You need to install the V language environment and the zed-v plugin

v

Image


https://github.com/user-attachments/assets/bef03ac7-b772-4e25-b4b8-3d1e14178d64

Avey777 avatar Mar 28 '25 01:03 Avey777

  1. Please provide your system specs as requested by the template ("zed: copy system specs" from the command palette)
  2. Does this happen with all tasks or just this one?
  3. What's your system shell?
  4. Can you provide a minimal set of steps necessary to reproduce? I'm wondering whether this might be your task process spawning something else which doesn't get cleaned up.

@notpeter I provided evidence that this happened in all tasks

Avey777 avatar Mar 29 '25 07:03 Avey777

When will this issue be fixed?

Avey777 avatar Apr 07 '25 05:04 Avey777

I encountered this after upgrading to 0.184.8 today: rerun doesn't kill the process created before and fail my new task because the port is still in use. If i remember correctly, the version I used before was something like 0.183.x. But this issue was created before the new release, so I don't know if my problem is related to this issue.

  1. Can you provide a minimal set of steps necessary to reproduce? I'm wondering whether this might be your task process spawning something else which doesn't get cleaned up.

I have a simpler set of steps to reproduce using vim:

  1. create this task:
    {
    	"label": "test kill",
    	"command": "vim",
    	"use_new_terminal": false,
    	"allow_concurrent_runs": false
    }
    
  2. run it multiple times
  3. I get multiple instance of vim:
$ ps aux | grep vim
jax        19458  0.0  0.0 151468 11632 pts/2    Ss+  10:23   0:00 /bin/fish -i -c vim
jax        19471  0.0  0.1  25760 16844 pts/2    S<l+ 10:23   0:00 vim
jax        19474  0.0  0.0 151468 11644 pts/3    Ss+  10:23   0:00 /bin/fish -i -c vim
jax        19487  0.0  0.1  25760 16760 pts/3    S<l+ 10:23   0:00 vim
jax        19490  0.0  0.0 151468 11576 pts/4    Ss+  10:23   0:00 /bin/fish -i -c vim
jax        19503  0.0  0.1  25760 16984 pts/4    S<l+ 10:23   0:00 vim
jax        19505  0.0  0.0 151468 11532 pts/5    Ss+  10:23   0:00 /bin/fish -i -c vim
jax        19518  0.0  0.1  25760 16808 pts/5    S<l+ 10:23   0:00 vim
jax        20008  0.0  0.0   9788  6072 pts/0    S+   10:27   0:00 grep --color=auto vim

And here's my system specs:

Zed: v0.184.8 (Zed) OS: Linux Wayland
cachyos unknown Memory: 15.4 GiB
Architecture: x86_64 GPU: NVIDIA GeForce MX450 || NVIDIA || 540.144

jaxvanyang avatar May 01 '25 02:05 jaxvanyang

For the latest case,

https://github.com/zed-industries/zed/pull/29786 should provide a fix, being released today.

Not sure about the OP case, but would appreciate a retest after the release.

SomeoneToIgnore avatar May 02 '25 13:05 SomeoneToIgnore

@SomeoneToIgnore My problem confirmed fixed, thanks!

jaxvanyang avatar May 05 '25 00:05 jaxvanyang