public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Macek <david.macek.0@gmail.com>
To: cygwin@cygwin.com
Subject: Non-Cygwin slaves inside tmux
Date: Tue, 26 May 2015 16:08:00 -0000	[thread overview]
Message-ID: <55649249.6010602@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1692 bytes --]

Hi.

My testcase: run mintty-bash, run tmux inside and run netsh inside. Try to type.

Result: horrible lags

Expected result: it's possible to type normally

I tried multiple Cygwin snapshots from the last 5 months, hoping that it could be a regression (therefore easily fixable), but all of them exhibit the same issue.

A quick Google search didn't show any similar errors, so I'm reporting here in hope someone will be able to say "yeah, that's easy, let me fix that". :)

Assuming I understand correctly the roles here -- bash does fork+exec(netsh) and Cygwin emulates that by creating a bash subprocess which creates a netsh subprocess; the bash process that is spawned to execute the native executable is creating threads and named pipes like crazy. Every few seconds a new pipe and thread pop up. All the old threads seem to be stuck in:

 #0 0x00007ffad7f3120a in ntdll!ZwWaitForSingleObject () from /cygdrive/c/Windows/SYSTEM32/ntdll.dll
 #1 0x00007ffad53b1118 in WaitForSingleObjectEx () from /cygdrive/c/Windows/system32/KERNELBASE.dll
 #2 0x0000000180134cfb in muto::acquire (this=0x639363438, ms=ms@entry=4294967295) at /usr/src/debug/cygwin-2.0.2-1/winsup/cygwin/sync.cc:87
 #3 0x00000001800f9ed9 in lock_process (exiting=false, this=) at /usr/src/debug/cygwin-2.0.2-1/winsup/cygwin/sync.h:53
 #4 commune_process (arg=0x6e7cb90) at /usr/src/debug/cygwin-2.0.2-1/winsup/cygwin/pinfo.cc:542
... several other frames which are related to Cygwin threads, I assume ...

strace shows tmux getting these:

seterrno_from_win_error: /usr/src/ports/cygwin/cygwin-2.0.2-1.x86_64/src/newlib-cygwin/winsup/cygwin/pinfo.cc:737 windows error 995

-- 
David Macek


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4234 bytes --]

             reply	other threads:[~2015-05-26 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 16:08 David Macek [this message]
2015-05-27 10:57 ` Robert Pendell
2015-05-27 16:08   ` John Hein
2015-06-04 23:11   ` David Macek
2015-06-08 13:22 ` Corinna Vinschen

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=55649249.6010602@gmail.com \
    --to=david.macek.0@gmail.com \
    --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).