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

Zombies #7510

Closed
lnicola opened this issue Feb 1, 2021 · 4 comments · Fixed by #7512
Closed

Zombies #7510

lnicola opened this issue Feb 1, 2021 · 4 comments · Fixed by #7512
Labels
S-actionable Someone could pick this issue up and work on it right now

Comments

@lnicola
Copy link
Member

lnicola commented Feb 1, 2021

Looks like we still have a zombie process left:

image

And we're spawning ourselves?

Only works with proc macros (and maybe output dir loading) enabled.

@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Feb 1, 2021
@lnicola
Copy link
Member Author

lnicola commented Feb 1, 2021

strace: Process 185136 attached
[pid 185136] execve("/home/me/.cargo/bin/rust-analyzer", ["/home/grayshade/.cargo/bin/rust-"..., "proc-macro"], 0x55d4f7ed4b00 /* 67 vars */) = 0
strace: Process 185137 attached
strace: Process 185138 attached
strace: Process 185139 attached
[pid 185139] execve("/usr/local/bin/cargo", ["cargo", "check", "--workspace", "--message-format=json", "--manifest-path", "/home/me/Projects/hello/C"..., "--all-targets"], 0x55d4f7ed4b00 /* 67 vars */) = -1 ENOENT (No such file or directory)
[pid 185139] execve("/usr/bin/cargo", ["cargo", "check", "--workspace", "--message-format=json", "--manifest-path", "/home/me/Projects/hello/C"..., "--all-targets"], 0x55d4f7ed4b00 /* 67 vars */) = 0
[pid 185139] execve("/home/me/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo", ["/home/me/.rustup/toolchai"..., "check", "--workspace", "--message-format=json", "--manifest-path", "/home/me/Projects/hello/C"..., "--all-targets"], 0x55e4516b9c50 /* 72 vars */) = 0
strace: Process 185140 attached
[pid 185140] +++ exited with 0 +++
[pid 185139] +++ exited with 0 +++
[pid 185097] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=185139, si_uid=1000, si_status=0, si_utime=5, si_stime=1} ---
strace: Process 185141 attached
[pid 185141] execve("/home/me/.cargo/bin/rust-analyzer", ["/home/me/.cargo/bin/rust-"..., "proc-macro"], 0x55d4f7ed4b00 /* 67 vars */) = 0
strace: Process 185142 attached
[pid 185137] +++ exited with 0 +++
[pid 185136] +++ killed by SIGKILL +++

Look at 185136, the proc macro server: we start a new one (185141), then kill 185136 without reaping it.

@lnicola
Copy link
Member Author

lnicola commented Feb 1, 2021

We don't wait for the child at https://github.com/rust-analyzer/rust-analyzer/blob/84c324b3dd84a191defcc490a6308a5f5c16a7f5/crates/proc_macro_api/src/process.rs#L122-L126, but I'm not sure why we run the server twice.

@lnicola
Copy link
Member Author

lnicola commented Feb 1, 2021

CC @edwin0cheng I think we're calling switch_workspaces twice.

@edwin0cheng
Copy link
Member

@lnicola that's intentional, but I forget we should only allow one proc-macro server. (#7514)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants