Skip to content

tmux fails on openSUSE when tempfs folder doesn't exist #1092

Closed

Description

@bitcrazed

Running tmux 2.5 on a freshly opened openSUSE 42.3 instance (installed via zypper, default config) on Windows 10 WSL.

> uname -sp && tmux -V && echo $TERM
Linux x86_64
tmux 2.5
xterm-256color

tmux crashes when run from a freshly opened openSUSE instance:

> tmux
can't create socket: No such file or directory

Took a look at the strace and noticed that tmux is trying to open a file in /run/tmux, but failing.

Immediately after installing tmux:

> ls /run
lock  shm  tmux  user  zypp.pid

After closing openSUSE session and re-opening:

> ls /run
lock  shm  user

If we manually create /run/tmux tmux opens fine.

Since we clear tempfs when we shutdown an instance, this affects all our users running openSUSE.

Note: Tried to capture a log as per CONTRIBUTING instructions, but cannot:

> tmux -Ltest kill-server
can't create socket: No such file or directory
> tmux -vv -Ltest -f/dev/null new
can't create socket: No such file or directory

Activity

  1. nicm commented on Sep 27, 2017

    @nicm
    Member

    This issue does not include enough information. Please read the CONTRIBUTING file.

  2. bitcrazed commented on Sep 27, 2017

    @bitcrazed
    Author

    Hey @nicm - updated description above with a little info.

  3. nicm commented on Sep 27, 2017

    @nicm
    Member

    It sounds like you have modified tmux so that it puts sockets in /run/tmux instead of _PATH_TMP (usually /tmp). If you do this, you need to make sure the directory exists. tmux will not (and should not) attempt to create it.

  4. nicm commented on Sep 27, 2017

    @nicm
    Member

    For the period where Debian tried to move tmux sockets to /var/run/tmux, they had a boot script to create the directory with the right permissions, doesn't SuSE have similar?

  5. bitcrazed commented on Sep 29, 2017

    @bitcrazed
    Author

    Hey @nicm: Sorry - was swamped at SUSECON the last few days.

    So, we dug into this and it turns out that it's likely our fault (I work on the WSL team at Microsoft):

    Many systemd distros are adopting the new /run folder replacing /var/run as a place to store transient info at startup, because /var/run is mounted later in the startup process.

    SUSE also has a policy that sockets etc. get created under /run, which is on tmpfs, which WSL:
    a) Nukes when we shut-down a distro instance
    b) Does not initialize when the distro starts-up

    This combination of factors means that:

    1. Tools & apps like tmux have no socket at startup
    2. We need to figure out a way to allow distro owners to execute some init steps (e.g. call system-tmpfiles) when a distro instance is started:
      image

    Closing this issue - we'll go figure out a fix at our end! :)

  6. nicm commented on Sep 29, 2017

    @nicm
    Member
  7. bitcrazed commented on Sep 30, 2017

    @bitcrazed
    Author

    Yep - sorry - should have been clearer.

    If we run system-tmpfiles --create, the tmux folder will be created correctly.

    Have just filed an issue for us to track the fix for this: microsoft/WSL#2530

  8. ray13eezy commented on Aug 12, 2019

    @ray13eezy

    Just wanted to provide one additional tidbit of info for anybody else who comes across this thread - in the comment above from the WSL team, the command you need to run is systemd-tmpfiles --create (note that it is systemd and not system).

    Hope this helps.

  9. lock commented on Feb 14, 2020

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  10. locked and limited conversation to collaborators on Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions