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

Calling server:stop crashed my system #339

Open
mweimerskirch opened this issue Aug 25, 2023 · 1 comment
Open

Calling server:stop crashed my system #339

mweimerskirch opened this issue Aug 25, 2023 · 1 comment

Comments

@mweimerskirch
Copy link

I'm using Ubuntu. Today, when trying to run "symfony serve" I got a message "The local web server is already running". Although I didn't remember starting the server yet, I tried stopping it using "symfony server:stop" and that crashed my desktop environment.

My theory is that the PID file wasn't deleted because I shut down my system without stopping the web server first and today another process was running using the same ID. So when calling "server:stop" the CLI killed some process related to my desktop environment, thereby crashing it.

I checked the code (https://github.com/symfony-cli/symfony-cli/blob/main/commands/local_server_stop.go) and that seems to be a likely explanation.

Would it make sense to check the process name first, before trying to stop the process? I could work on a pull request if that additional check makes sense.

@tucksaun
Copy link
Contributor

tucksaun commented Sep 5, 2023

hum not really a nice experience indeed 😅

this could be a good countermeasure to prevent forcibly terminate legitimate processes.
but this would still leave the processes marked as running in the CLI or have impact on the several checks in place regarding those so I believe we should also try to find a way to make sure this does not happen in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants