delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/11/15/13:54:20

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:mime-version:content-type:from
:in-reply-to:date:cc:content-transfer-encoding:message-id
:references:to; q=dns; s=default; b=B+lx/6fu7ii9nW3ah5BkQN+1GODg
nEzLR5UQ0y5OsGNUZUEJZ1SxObVs96ie9cmYsnlaIUK8jXg1tQbS4ORT9tpmafTo
VoVi+v34ZEw4xMTaUSvoRieNyyjNJaM8ABHUPc41PgoC7kgP0svVoZuaMOi1j0Eq
IVxL6rP1GT5ctdY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:mime-version:content-type:from
:in-reply-to:date:cc:content-transfer-encoding:message-id
:references:to; s=default; bh=snefuzKaWahAPvDn0JpuzlChVTg=; b=u7
3c5RRfGCVS0CoX4iFOUBRyqvgLrbCEnQ4vhAxd6wpS1kOsoHWixtv5uxqBdeaK/q
EJbjzvFs3dHDAtJ9HF5TLyvJUoWTVRIFNjjHed3QUc+Je0AQOrYgTqAhFhqWNR8e
r8movXyQnx/hLcCVA4UbeFbep2Rg/Wge37k2YYB5M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,URIBL_BLOCKED autolearn=no version=3.3.2
X-HELO: smtp2-g21.free.fr
Subject: Re: Intermittent failures retrieving process exit codes
Mime-Version: 1.0 (Mac OS X Mail 7.0 \(1822\))
From: Denis Excoffier <cygwin AT Denis-Excoffier DOT org>
In-Reply-To: <52844B2E.5050902@coverity.com>
Date: Fri, 15 Nov 2013 19:53:26 +0100
Cc: lasse DOT collin AT tukaani DOT org
Message-Id: <EFA04305-A94A-46F4-BCCE-8FB3ADA45E72@Denis-Excoffier.org>
References: <50C2498C DOT 2000003 AT coverity DOT com> <50C276AC DOT 9090301 AT mailme DOT ath DOT cx> <50D401EF DOT 9040705 AT coverity DOT com> <52844B2E DOT 5050902 AT coverity DOT com>
To: Tom Honermann <thonermann AT coverity DOT com>,
Cygwin Mailing List <cygwin AT cygwin DOT com>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id rAFIsGjD018387

On 2013-11-14 05:01, Tom Honermann wrote:
> On 12/21/2012 01:30 AM, Tom Honermann wrote:
>> 
>> The workaround I implemented within Cygwin was simple and sloppy.  I
>> added a call to Sleep(1000) immediately before the call to ExitThread()
>> in wait_sig() in winsup/cygwin/sigproc.cc.  Since this thread (probably)
>> doesn't exit until the process is exiting anyway, the call to Sleep()
>> does not adversely affect shutdown.  The thread just gets terminated
>> while in the call to Sleep() instead of exiting before the process is
>> terminated or getting terminated while still in the call to
>> ExitThread().  A better solution might be to avoid the thread exiting at
>> all (so long as it can't get terminated while holding critical
>> resources), or to have the process exiting thread wait on it.  Neither
>> of these is ideal.  Orderly shutdown of multi-threaded processes is
>> really hard to do correctly on Windows.

I experience on Windows 7 (not on XP) some problems that may be related.
I would like to test your workaround, but sigproc.cc has much changed since
then, there is now an exit_thead function with the comment "Exit the current
thread very carefully.". I tried to insert Sleep(1000) at the end of
exit_thread, immediately before "ExitThread (0)", but this yielded no
change at all.

Could someone be kind enough to update the workaround for modern sigproc.cc?

Very briefly, my problem is that when i "tar xf —use-compress-program=xz", i
get:
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
and the last file of the archive is truncated at some 512bytes block. This
occurs on Windows 7 (not on XP); with xz-5.1.3alpha (not with xz-5.1.2alpha or
xz-5.0.5); never on most tar.xz files; almost always on some (rare) tar.xz files
(one notable example is bc-1.06.95.tar.bz2 bunzip2’ed and then xz’ed); depends
on the .tar file itself, not on the option (like -9e, -0) used to create the
.tar.xz; never with "tar tf"; and with all tar’s i have tested. The return code
of all the involved xz -d commands is always zero though. Perhaps after all, this
is unrelated?

Thank you.

Regards,

Denis Excoffier.
--
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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019