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 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: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive: encrypt X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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