From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: Race condition hangs on multiple mintty/tcsh? Brad Wetmore
Date: Thu, 6 Aug 2020 20:48:35 +0200 [thread overview]
Message-ID: <97552ff1-8aca-cbd0-db22-d59c381ed6c6@towo.net> (raw)
In-Reply-To: <BYAPR07MB59421E727E0CC742E4A4DA41B6480@BYAPR07MB5942.namprd07.prod.outlook.com>
Am 06.08.2020 um 20:07 schrieb Brad Wetmore via Cygwin:
> [I apologize if this doesn't thread correctly: I've been getting the digest, and can't respond directly. And I have no idea how my name ended up in the Subject line: Rookie Move!]
>
> More debug information, and a workaround/solution:
>
> I am running:
>
> Windows 10 Version 1909, fully patched.
> Cygwin v3.1.6-1
> Openssh v8.3p1-1
> mintty v3.2.0-1
> tcsh v6.22.02-1
>
> The issue seems to be a race condition setting up ssh-agent, and then immediately starting up the the mintty/tcsh terminals. My guess is that something in ssh-agent is not fully setup yet, and is causing read hiccups in mintty.
>
> My startup script looks like:
>
> #!/bin/sh
>
> if [ -z "$SSH_AGENT_PID" ] ; then
> echo "Starting ssh-agent"
> eval $(ssh-agent)
> ssh-add
> #sleep 3
> fi
>
> C:/cygwin64/bin/mintty.exe -i /usr/share/mintty/icon/wsl.ico \
> --position 0,0 --size 80x24 --fg black --bg white /bin/tcsh &
> #sleep 1
> ...9 more invocations deleted...
>
> Without the sleep 3 after starting ssh-agent, I see one of three conditions:
>
> 1. The mintty window is created, but immediately crashes printing a dozen or so "Use "exit" to leave tcsh" before it does. At least that I think it says, it happens fast! ;)
>
> 2. The mintty window is created, and is ready for input. On the first keypress, it prints a dozen or so "Use "exit" to leave tcsh" and crashes.
>
> 3. The mintty window is created, and hangs. No prompt.
>
> I get conditions #1/2 when I don't pause between mintty invocations.
> I get condition #2 when I pause for 1 second between mintty invocations.
>
> If I pause for 3 seconds after starting ssh-agent, then everything works as expected.
>
> Note this issue occurs only during the first setup of 10 terminals. Running it again does not tickle the issue, probably because ssh-agent is fully up.
>
> Hope this helps.
You had previously reported the issue without ssh involved. Does this
make it reproducible more often? Otherwise let's not make things
unnecessarily complicated.
next prev parent reply other threads:[~2020-08-06 18:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 22:13 Brad Wetmore
2020-08-04 10:02 ` Thomas Wolff
2020-08-05 22:56 ` Thomas Wolff
2020-08-05 23:23 ` Kevin Schnitzius
2020-08-06 11:46 ` Thomas Wolff
2020-08-06 13:31 ` Thomas Wolff
2020-08-06 14:26 ` Corinna Vinschen
2020-08-06 14:33 ` Thomas Wolff
2020-08-07 15:34 ` Takashi Yano
2020-08-11 4:59 ` Takashi Yano
2020-08-11 9:37 ` Corinna Vinschen
2020-08-11 10:02 ` Takashi Yano
2020-08-11 10:30 ` Corinna Vinschen
2020-08-11 17:37 ` Thomas Wolff
2020-08-12 20:27 ` Thomas Wolff
2020-08-06 18:07 ` Brad Wetmore
2020-08-06 18:48 ` Thomas Wolff [this message]
2020-08-06 19:25 ` Brad Wetmore
2020-08-13 3:08 ` Brad Wetmore
2020-08-25 18:45 ` Brad Wetmore
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=97552ff1-8aca-cbd0-db22-d59c381ed6c6@towo.net \
--to=towo@towo.net \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).