This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygwin.dll: bug with select on Windows console

On 1/8/16 11:29 AM, Corinna Vinschen wrote:
> On Jan  7 13:18, John Hood wrote:
>> Sorry about forgetting the testcase (which was good, actually, that
>> version had a bug).  I've attached it here.  This takes a single
>> argument, the timeout value for select() in microseconds.  A value of
>> 1000000 is fine for testing this issue.  Type at it, or just bang on the
>> keyboard with random keystrokes, and it will report the results from
>> select() and the characters read.  On a Windows console, it should
>> report an error within a few seconds.  Moving the mouse cursor over the
>> Windows console window while typing seems to provoke the error as well. 
> No chance.  I tried this for a good hour now with the unpatched Cygwin
> DLL on 32 bit W7 and 64 bit W10 in 32 and 64 bit in a Windows console,
> and I can't provoke this error.  It just works for me.

My apologies for sending you down a wrong path.  Try again with
"socket-t 1000", which only waits 1ms.  I don't know what I was thinking
when I said the 1s timeout works fine.  I have 3 machines available; on
two the problem occurs within 1-2s of typing or mousing, and the last
might take a couple of minutes.  Don't spend too long trying to
reproduce this-- let me know and I'll try and figure out what other
variables might be at play.  One possibility is that my main Windows
machine is relatively slow.  It has an AMD E-350 CPU, which is
netbook-grade.  At one point I noticed that select() takes over 1ms to
execute, which affects its check for a timeout in the loop over
the ready check.  But then I saw that longer timeout values suffered the
problem as well, and the other two machines are faster Intel Core/Xeon
CPUs, Sandy Bridge or better.

>> On mintty or any other pty, the error never occurs.
>> I've been unable to build Cygwin from Git on my 32-bit install on Win7,
>> thanks to various header mismatches and missing packages-- I think the
>> latest was a mingw-gcc header, but I can't check that machine now.  The
>> FAQ entry on how to build Cygwin is quite incomplete.  Are there any
>> better directions for building Cygwin?
> What exactly is failing?  If you installed all the packages mentioned in
> the FAQ entry, plus building outside the source tree as outlined, you
> should be fine.  Alternatively, install the cygport package and the
> 2.4.0-0.16 source package and build that via

It appears I had not installed all the packages because I didn't have
the setup command line syntax right, and didn't know it.  setup
apparently does not do any validation of its command line arguments:

  setup-x86.exe -M -P "docbook-xsl xmlto"

fails to install any packages, and

  setup-x86.exe -M -P docbook-xsl xmlto

only installs the first.  Neither give any indication that the command
line is incorrect.



Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]