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

[Bug]: Can't start 2 instances of code-server 4.14.0 for separate users #6275

Closed
4 tasks done
bilogic opened this issue Jun 19, 2023 · 7 comments · Fixed by #6278
Closed
4 tasks done

[Bug]: Can't start 2 instances of code-server 4.14.0 for separate users #6275

bilogic opened this issue Jun 19, 2023 · 7 comments · Fixed by #6278
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer

Comments

@bilogic
Copy link

bilogic commented Jun 19, 2023

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Chrome
  • Local OS: Ubuntu
  • Remote OS: Windows
  • Remote Architecture: amd64
  • code-server --version: 4.14.0

Steps to Reproduce

  1. Run /usr/bin/code-server for user 1 - ok
  2. Run /usr/bin/code-server for user 2 - fails with the following

Expected

Both instances should start

Actual

2nd instance fails to start

Logs

2nd instance tries to open the same file

[2023-06-19T16:15:12.625Z] info code-server 4.14.0 9955cd9
[2023-06-19T16:15:12.626Z] info Using user-data-dir ~/code-server/user
[2023-06-19T16:15:12.629Z] error EPERM: operation not permitted, unlink '/tmp/code-server-ipc.sock'

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

It seems that every instance is trying to write to /tmp/code-server-ipc.sock, this was not the case in 4.13.0. Is there a way to specify an alternate socket file for each instance?

@bilogic bilogic added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Jun 19, 2023
@Fmstrat
Copy link

Fmstrat commented Jun 20, 2023

Having the same issue, this totally bricked our shared development environment.

EDIT For anyone else who ends up here, a downgrade worked for my environment.

@code-asher
Copy link
Member

code-asher commented Jun 20, 2023 via email

@code-asher code-asher changed the title [Bug]: Can't start 2 instances of code-server 4.14.0 [Bug]: Can't start 2 instances of code-server 4.14.0 for separate users Jun 20, 2023
@sleexyz
Copy link
Contributor

sleexyz commented Jun 20, 2023

@code-asher Ah darn, I'll take a stab rn.

@mirekphd
Copy link

mirekphd commented Jun 26, 2023

our shared development environment.

Having two users (even if there are just two of them) access the same data folder is a rather week form of isolation. It's not just usability, but a security issue as well. Such multi-tenancy requires proper storage isolation, e.g. with PVCs in k8s.

@Fmstrat
Copy link

Fmstrat commented Jun 26, 2023

our shared development environment.

Having two users (even if there are just two of them) access the same data folder is a rather week form of isolation. It's not just usability, but a security issue as well. Such multi-tenancy requires proper storage isolation, e.g. with PVCs in k8s.

At what point did I say a shared data folder? This bug is literally about a lock file with the same filename (in tmp) being used for all users regardless of data directory.

@mirekphd
Copy link

mirekphd commented Jun 26, 2023

our shared development environment.

Having two users (even if there are just two of them) access the same data folder is a rather week form of isolation. It's not just usability, but a security issue as well. Such multi-tenancy requires proper storage isolation, e.g. with PVCs in k8s.

At what point did I say a shared data folder? This bug is literally about a lock file with the same filename (in tmp) being used for all users regardless of data directory.

It's enough to share /tmp (which admittedly is not a "data" folder, you got me there) from each user namespace between multiple users to let users overwrite each other's settings (maliciously or unwittingly) in such browser-based IDEs.

@bilogic
Copy link
Author

bilogic commented Jun 26, 2023

@mirekphd

If you are facing an issue, please provide logs
If you think the solution is wrongly implemented, please comment on the PR #6278, not here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage This issue needs to be triaged by a maintainer
Projects
None yet
5 participants