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

[process] On Linux, when Theia is closed from the UI, its process is not killed #5644

Open
federicobozzini opened this issue Jul 4, 2019 · 9 comments
Labels
bug bugs found in the application electron issues related to the electron target help wanted issues meant to be picked up, require help OS/Linux issues related to the Linux OS

Comments

@federicobozzini
Copy link
Contributor

Description

On Linux, when Theia is run from the terminal and the application gets closed by the user from the UI, the Theia process is kept alive. Ctrl C is needed to kill the process.

Reproduction Steps

Try to compile and run Theia on desktop (on Linux) by using yarn start and then click on the X icon to close the program. The process in the Terminal is not killed.

OS and Theia version:

Diagnostics:

Not sure if referred to the main Theia process or to subprocess but this is the output printed when Theia gets closed from the UI:

process WARN This process was not registered or was already unregistered. [ID: 0]

@akosyakov
Copy link
Member

Electron? in browser it does not make sense to kill the server.

@federicobozzini
Copy link
Contributor Author

Yes exactly, with the electron version.

@akosyakov akosyakov added bug bugs found in the application electron issues related to the electron target labels Jul 4, 2019
@akosyakov
Copy link
Member

I've marked as a bug, but someone needs to verify whether it is a case. @kittaakos ?

@kittaakos
Copy link
Contributor

electron version.

@federicobozzini, was it a bundled electron application or you have started the electron example from the terminal?

@kittaakos kittaakos added the OS/Linux issues related to the Linux OS label Jul 5, 2019
@federicobozzini
Copy link
Contributor Author

The latter, the electron example run from the terminal.

@kittaakos
Copy link
Contributor

Thanks for the update. We have to check whether the same happens with a bundled application too.

@kittaakos
Copy link
Contributor

We have to check whether the same happens with a bundled application too.

No; it works.

kittaakos@ubuntu:~/dev/theia-apps/theia-electron/dist/linux-unpacked$ ./theia-electron 
root INFO Theia app listening on http://localhost:46857.
root INFO Git askpass helper is listening on http://127.0.0.1:43581.
root INFO Using Git [2.22.0] from the PATH. (/usr/bin/git)
root WARN Collided keybinding is ignored;  {"command":"outlineView:toggle","keybinding":"ctrlcmd+shift+s"}  collided with  {"command":"file.saveAs","keybinding":"ctrl+shift+s"}
root WARN Could not register keybinding:
  {"command":"outlineView:toggle","keybinding":"ctrlcmd+shift+s"}
Error: "ctrlcmd+shift+s" is in collision with something else [scope:0]
root WARN Collided keybinding is ignored;  {"command":"passthrough","keybinding":"ctrl+k","context":"terminalActive"}  collided with  {"command":"terminal:clear","keybinding":"ctrlcmd+k","context":"terminalActive"}
root WARN Could not register keybinding:
  {"command":"passthrough","keybinding":"ctrl+k","context":"terminalActive"}
Error: "ctrl+k" is in collision with something else [scope:0]
root WARN e.onStart is slow, took: 229.99999999956344 ms
root INFO [nsfw-watcher: 67759] Started watching: /home/kittaakos/.theia
root INFO [nsfw-watcher: 67759] Started watching: /home/kittaakos/.theia
root INFO [nsfw-watcher: 67759] Stopped watching: /home/kittaakos/.theia
root WARN e.onStart is slow, took: 702.1999999997206 ms
root INFO Checking whether '--no-optional-locks' can be used with the current Git executable. Minimum required version is '2.15.0'.
root INFO '--no-optional-locks' is a valid Git option for the current Git version: '2.22.0'.
root INFO Started watching the git repository: file:///home/kittaakos/.nvm
root INFO Config file tasks.json does not exist under file:///home/kittaakos
kittaakos@ubuntu:~/dev/theia-apps/theia-electron/dist/linux-unpacked$

It's not the best for sure, but it works from the bundled application.

@kittaakos kittaakos added the help wanted issues meant to be picked up, require help label Jul 5, 2019
@arekzaluski
Copy link
Contributor

@kittaakos I confirm that it works correctly for bundled Theia on Linux. For some reason https://github.com/theia-ide/theia-apps/tree/master/theia-electron was failing to build for me so I quickly added electron-builder to master of theia and generated AppImage installer. Closing windows in AppImage is killing all Theia processes correclty. I confirm however that this issue exists in development.

@kittaakos
Copy link
Contributor

was failing to build for

I had memory issues as well. I had to build and package with:

NODE_OPTIONS=--max_old_space_size=4096 yarn build

Closing windows in AppImage is killing all Theia processes correclty. I confirm however that this issue exists in development.

I experienced the exact same behavior. Thank you for verifying it, @arekzaluski.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application electron issues related to the electron target help wanted issues meant to be picked up, require help OS/Linux issues related to the Linux OS
Projects
None yet
Development

No branches or pull requests

4 participants