mobile-shell / mobile-shell/mosh

Session establishment hangs with OS X 10.11 client and FreeBSD server

Open
#833 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OS X
Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

My boss at $dayjob had this issue, so I spent a while on it:

On his OS X 10.11.1 MBP, talking to a FreeBSD 9.3 or 10.3 server, Homebrew's mosh 1.2.6_3 will hang during session startup, most of the time. Examination shows that the mosh script is waiting for ssh, which has a half-closed TCP session (the server has closed its end) and is waiting for Godot. This appears to be a problem with the OS X bundled ssh 6.9p1 client, but is annoyingly hard to debug:

  • Only happens on OS X 10.11 (perhaps only on this specific machine). Even running the 10.11 client on OS X 10.12 works fine. But the Homebrew 7.3p1 ssh client also hangs on the 10.11 machine.
  • ssh only hangs when run by the Mosh perl script (or my cut-down debug version of it).
  • ssh only hangs when talking to a FreeBSD server. OS X and Linux servers are fine.
  • Only happens when run with --ssh-pty (the default).
  • --experimental-remote-ip does not affect the problem-- it happens whether or not ssh is using Mosh's fake-proxy.

Fortunately, we discovered that using -f in place of -n on the ssh command line solves the problem. @glance, was there a reason to use -n and not -f here?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the Mosh Perl script's SSH invocation, especially the default --ssh-pty path and its use of -n. Reproduce the session-startup hang with the OS X 10.11 client and FreeBSD server, compare -n with -f, and verify that the selected behavior no longer leaves SSH waiting during startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, perl
Domain
cli, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.