Skip to content

GLFW crashes entire julia session after re-attaching in tmux #230

@lassepe

Description

@lassepe

Migrating from MakieOrg/Makie.jl#3092

I frequently use GLMakie from within a remote tmux ssh session via x-forwarding. That generally works quite well; however, it does not survive re-attaching. Indeed, the issue can be reproduced with a plain GLFW window:

Steps to reproduce:

  1. Connect to a ssh remote, e.g., ssh <user@hostname>
  2. run tmux on the remote
  3. Start a Julia REPL on the remote, run using GLFW; GLFW.Window()
  4. Detach from the tmux session using CTRL+b, d
  5. Disconnect from ssh client using exit
  6. Re-connect to ssh client ssh <user@hostname>
  7. Re-attach to tmux session tmux -u attach-session
  8. Open another window GLFW.Window().

Step 8 here fails reliably with

XIO:  fatal IO error 2 (No such file or directory) on X server "localhost:10.0"
      after 212 requests (212 known processed) with 1111 events remaining.

Note: this error is slightly different from the one originally reported in MakieOrg/Makie.jl#3092 (here we now have "No such file or directory").

I verified that the DISPLAY variable is set correctly upon re-attaching. I suspect, however, that maybe some socket is moved/re-created upon re-attaching which invalidates some GLFW internal state? In fact, if I start a fresh Julia session and load GLFW after re-attaching, things work as expected.

Thoughts/Questions

  1. Ideally, GLFW should be robust to this kind of re-attaching.
  2. Even if GLFW itself cannot recover, it would be desirable to not kill the REPL upon this error.
  3. As a temporary workaround, is there some kind of "reset"-function that I can call to reset the internal state of GLFW upon re-attaching?

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