delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/12/17/15:08:08

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Andrew Schulman <schulman DOT andrew AT epamail DOT epa DOT gov>
Subject: Re: Cygwin 1.7 GNU screen freezing when disconnected
Date: Thu, 17 Dec 2009 15:06:36 -0500
Lines: 52
Message-ID: <772li5l3a44hueai8u9j3g1ccj2rgl06d7@4ax.com>
References: <f18b7baa0912161805p4cd2ff8cte99b19a95e204440 AT mail DOT gmail DOT com>
Mime-Version: 1.0
X-Archive: encrypt
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

> Hi,
> 
> I have the latest version of screen (4.0.3-4) and using the cygwin 1.7
> beta. My host computer has an sshd server running, and it has a screen
> session open. I then ssh into my host computer from another computer
> and attach to this session with the command:
> screen -AOUxR
> 
> Sometimes, I get disconnected from my host computer. When this
> happens, I cannot reattach to the screen session when I can reconnect
> via ssh, and my screen session on the host computer is completely
> locked up. ctrl-q, ctrl-a K, doesn't do anything and I have to kill
> screen and the program I was running in it.
> 
> These are the steps I use to reproduce this:
> 1. Open a screen session
> 2. Open a new terminal
> 3. In the new terminal, connect via ssh to myself
> 4. Attach to the previously started screen session with the command above
> 5. In a new terminal, kill the ssh process
> 
> After this, the first terminal cannot do anything anymore. My host
> computer is running Windows XP.

Karim, I'm afraid that I don't have much to offer here.  A few thoughts:

After you kill ssh, what does screen -list say?

You probably know that when you're connected to a screen session, there are
two screen processes, which communicate with each other through a socket.
When you detach, the foreground screen process exits but the background one
stays around, waiting for a new attach.  It seems that when you kill ssh,
somehow data stops flowing to or from the background screen process from
that socket.  And that unfortunately is about as deep as my knowledge of
screen goes.

strace can probably point to the problem, although I don't know if I have
the ability to find it.  Others on this list probably can.  I would think
of looking at strace output for the following:

* the background screen process (i.e., the one that stays running when you
detach from it) at the time you kill ssh, especially compared to when you
detach from it normally.

* the foreground and background screen processes when you try to reattach
after having killed ssh.  Again this might be most useful when compared to
a successful reattach after a normal detach.

If you post or link to this, I'll take a look and maybe I or someone else
can find the problem.

Andrew.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019