delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/09/15/11:32:42

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
Message-ID: <4C90E715.7000900@gmail.com>
Date: Wed, 15 Sep 2010 11:32:37 -0400
From: Geo Pertea <geo DOT pertea AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.9) Gecko/20100825 Thunderbird/3.1.3
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: 1.7.7-1: tcsh occasionally hanging
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

  Since upgrading to cygwin 1.7 recently I have been experiencing 
sporadic failures of  cygwin tcsh initialization: when opening new shell 
terminals (I start Cygwin using mintty.exe -e /bin/tcsh) they sometimes 
hang indefinitely. I have the same cygwin setup installed on two 
computers (both with Windows XP SP3 32bit), and both of them are 
experiencing this with different frequencies: for the faster, dual-core 
PC it happens very rarely, but on the slower, single-CPU one the hanging 
was almost constant, and disabling my .cshrc script didn't help at all. 
Using ProcessExplorer I noticed that the hanging tcsh process was also 
spawning 'cut' and 'sed' processes hanging there (sometimes just one of 
them, other times both were still there). I did have cygwin 1.7.7-1 at 
the time I was investigating this, and I was able to isolate the problem 
to this particular block in the /etc/profile.d/complete.tcsh script:

     if ( -r "$HOME/.ssh/known_hosts" ) then
          set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ ` >& /dev/null
          set f=`cat "$HOME/.ssh/known_hosts" | cut -f 1 -d \ | sed -e 
's/,/ /g'` >& /dev/null
          set hosts=($hosts $f)
       endif

I do have quite a large list of hosts in the ~/.ssh/known_hosts file and 
I want to keep that way. However, in order to prevent tcsh from hanging 
I had to comment out the block above. Note that on the other, faster PC 
there was no need to do the same (even though the known_hosts file is 
about the same size), so my suspicion is that in tcsh with 1.7 there are 
some issues with pipe handling, perhaps a race condition somewhere that 
triggers more often on slower PCs.

-Geo

--
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