From: Eliot Moss <moss@cs.umass.edu>
To: Andrew Schulman <schulman.andrew@epa.gov>, cygwin@cygwin.com
Subject: Re: /dev/p* causes shell crash in i686
Date: Wed, 9 Sep 2020 10:54:39 -0400 [thread overview]
Message-ID: <8e84f7d0-70c8-d633-6c1b-4a5fe19e5c7b@cs.umass.edu> (raw)
In-Reply-To: <t5hhlflqrdbbgdn8rb8s62ao4fra9ajd9c@4ax.com>
[-- Attachment #1: Type: text/plain, Size: 2363 bytes --]
On 9/9/2020 8:08 AM, Andrew Schulman via Cygwin wrote:
> Here's a strange one. In bash in i686, try to run:
>
> ls /dev/ptmx
>
> I only get about as far as:
>
> ls /dev/p
>
> and then my terminal window vanishes. This happens:
>
> * In fish or bash.
> * On two different hosts that I've tried.
> * In mintty or a system terminal. In the system terminal, sometimes the
> command works normally the first time, but fails the 2nd time; or I have to
> press <TAB> after `ls /dev/p`, then the terminal vanishes.
> * With other commands that treat their arguments as files, not text. So for
> example, I can't finish typing `cat /dev/ptmx` or `test -r /dev/ptmx`
> before the terminal window vanishes, but `echo /dev/ptmx` works normally.
>
> It doesn't happen:
>
> * In x86_64 - only i686.
> * In scripts - only interactively.
>
> Is anyone else able to reproduce this? I've tried to capture an strace log,
> but I've failed so far. The strace seems to stop the crash. Still trying.
>
> I thought this could be a BLODA problem, but the two hosts I tried are
> running different virus scanners (McAfee and Windows Defender).
>
> Cygwin 3.1.7-1, all packages up-to-date. Output of cygcheck -svr attached.
Yes, I saw this happen as well. However, the problem is not ls but in
filename completion in a shell. I see it with echo as well as ls. It seems
to be filename completion generally, and probably has to do with directory and
file status calls.
Indeed, I see it in 32-bit cygwin but not 64 bit. The cygwin dll version is
3.1.7.
So I view this as a righteous bug report.
I tried an strace of bash then the tab completion. At /dev/pt I got this:
14458190 [main] bash 325 fhandler_pty_master::setup_pseudoconsole: CreatePseudoConsole() failed.
00000032
ptmx pty0
(The last line is the actual completion output.)
At /dev/ptm I got:
94511283 [main] bash 325 fhandler_pty_master::setup_pseudoconsole: CreatePseudoConsole() failed.
00000032
x
(The final x is the completion of /dev/ptm to /dev/ptmx.)
When strace'd, the bash didn't die (as a top-level one does), but we got those
useful messages. After allowing ls /dev/ptmx to print its output, I exited
the bash. I attach the strace output (gzipped). I'm guessing this behavior
is down inside the stat64 call on /dev/ptmx, but I'm not sure.
Regards to all -- Eliot Moss
[-- Attachment #2: bash.trace.gz --]
[-- Type: application/x-gzip, Size: 100956 bytes --]
next prev parent reply other threads:[~2020-09-09 14:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 12:08 Andrew Schulman
2020-09-09 14:54 ` Eliot Moss [this message]
2020-09-09 21:49 ` Corinna Vinschen
2020-09-10 19:15 ` Andrew Schulman
2020-09-10 19:19 ` Ken Brown
2020-09-10 19:31 ` Thomas Wolff
2020-09-10 19:38 ` Ken Brown
2020-09-10 19:41 ` Thomas Wolff
2020-09-10 19:44 ` Brian Inglis
2020-09-10 19:38 ` Brian Inglis
2020-09-10 22:37 ` Andrew Schulman
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=8e84f7d0-70c8-d633-6c1b-4a5fe19e5c7b@cs.umass.edu \
--to=moss@cs.umass.edu \
--cc=cygwin@cygwin.com \
--cc=schulman.andrew@epa.gov \
/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).