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: bash.trace.gz
Description: GNU Zip compressed data

--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to