Re: Clearing O_NONBLOCK from a pipe may lose data

2015-02-26 Thread Lasse Collin
On 2015-02-24 Corinna Vinschen wrote: > On Feb 24 16:16, Lasse Collin wrote: > > I'm going to release xz 5.2.1 in a day or two. Should that release > > have a workaround for this Cygwin bug? The workaround would avoid > > using O_NONBLOCK on stdout. It adds a race condit

Re: Unexpected EINVAL from pthread_join

2015-02-24 Thread Lasse Collin
On 2015-02-24 Corinna Vinschen wrote: > On Feb 24 15:54, Lasse Collin wrote: > > Many other pthread functions are similar in sense that they must > > never return EINTR. A bug similar to the one in pthread::join exist > > in pthread_mutex::lock. If SA_RESTART isn

Re: Clearing O_NONBLOCK from a pipe may lose data

2015-02-24 Thread Lasse Collin
On 2015-02-24 Corinna Vinschen wrote: > On Feb 24 08:16, Thomas Wolff wrote: > > Am 23.02.2015 um 13:23 schrieb Corinna Vinschen: > > >On Feb 23 11:56, Corinna Vinschen wrote: > > >>On Feb 22 22:07, Lasse Collin wrote: > > >>>Alternative idea: Wo

Re: Unexpected EINVAL from pthread_join

2015-02-24 Thread Lasse Collin
d_mutex::lock. If SA_RESTART isn't used, signals can make multiple threads get a lock on the same mutex at the same time. A test program is attached. Adding cw_sig_restart to the cygwait call in pthread_mutex::lock fixes this. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode // gcc -std

Unexpected EINVAL from pthread_join

2015-02-22 Thread Lasse Collin
handling the return value assumes that only WAIT_OBJECT_0 and WAIT_CANCELED are possible. The default section of the switch statement has a comment "should never happen" and it returns EINVAL. It might be that the problem occurs only when SA_RESTART isn't used. -- Lasse Collin

Re: Clearing O_NONBLOCK from a pipe may lose data

2015-02-22 Thread Lasse Collin
(I have now subscribed to the list to get everyone's replies. Sorry for breaking the message thread.) Eric Blake wrote: > On 02/20/2015 01:21 PM, Lasse Collin wrote: > > The above Cygwin behavior would make it very easy to add a > > workaround to xz for the pipe-data-loss p

Re: Clearing O_NONBLOCK from a pipe may lose data

2015-02-20 Thread Lasse Collin
the workaround idea will cause trouble in the future when the bug in Cygwin gets fixed. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

Clearing O_NONBLOCK from a pipe may lose data

2015-02-18 Thread Lasse Collin
.0, I investigated that first. There also seems to be something wrong with xz 5.2.0 in threaded mode under Cygwin which needs more investigation (random pthread_join() failures cause assertion failures if xz was built with --enable-debug). -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode // gcc -

Re: Antivirus strikes back (probably) (Was: Intermittent failures retrieving process exit codes)

2013-12-01 Thread Lasse Collin
On 2013-11-26 Denis Excoffier wrote: > On 2013-11-25 à 21:58 +02:00, Lasse Collin wrote: > > If you haven't already tried, please compile both 5.1.2alpha and > > 5.1.3alpha from source while keeping everything else unchanged, and > > see if the bug really only occurs

Re: Intermittent failures retrieving process exit codes

2013-11-25 Thread Lasse Collin
gwin or Windows. If you haven't already tried, please compile both 5.1.2alpha and 5.1.3alpha from source while keeping everything else unchanged, and see if the bug really only occurs with 5.1.3alpha. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode -- Problem reports: