apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@apache.org>
Subject Re: apr_stat() sometimes returning APR_INCOMPLETE (70008) on Windows 10
Date Wed, 17 Jul 2019 14:04:13 GMT
On 17.07.2019 10:18, Steve Hay wrote:
> On Tue, 16 Jul 2019 at 18:31, Steve Hay <steve.m.hay@googlemail.com> wrote:
>> On Tue, 16 Jul 2019 at 14:53, William A Rowe Jr <wrowe@rowe-clan.net> wrote:
>>> On Tue, Jul 16, 2019 at 8:10 AM Steve Hay <steve.m.hay@googlemail.com>
wrote:
>>>> I'm in the process of preparing a new mod_perl release and have run
>>>> into a few test failures on Windows 10 which are caused by apr_stat()
>>>> sometimes returning APR_INCOMPLETE (70008).
>>>>
>>>> I'm only getting this on Windows 10. If I run the same build of
>>>> everything on Windows 7 then everything is fine. I've built everything
>>>> from scratch with VS2019. I get the same behaviour with VS2015.
>>>>
>>>> I'm using apr-1.7.0 / apr-util-1.6.1. Is it worth trying the latest
>>>> dev versions?
>>>
>>> Would you retest with apr-1.6.5? Minor changes to the handling of symbolic
>>> links (junction/reparse points) on Win32 in 1.7.0 may be to blame.
>>>
>>> (Yes, I understand that you are not looking at a symlink in this case.)
>>>
>>>
>> I've built everything in a fresh directory tree in exactly the same
>> way as before but using 1.6.5 instead of 1.7.0 and it behaves the
>> same.
> An update on this: The following program reproduces the problem for
> me, using either branch of the if-block:
>
> use strict;
> use warnings FATAL => 'all';
>
> use File::Temp qw(tempfile);
>
> use APR::Finfo ();
> use APR::Pool ();
> use APR::Const -compile => qw(FINFO_NORM);
>
> my($fh, $file);
> if (0) {
>   ($fh, $file) = tempfile(DIR => '.', UNLINK => 1);
>   close $fh;
> }
> else {
>   $file = 'test.txt';
>   open $fh, '>', $file;
>   close $fh;
> }
>
> print "Testing $file\n";
>
> my $finfo = APR::Finfo::stat($file, APR::Const::FINFO_NORM, APR::Pool->new());
>
> So it's nothing specific about the way httpd.conf is created.
>
> But if I manually create a file in Windows Explorer and then point the
> above program at that file then it works OK.


I suggest you turn off your virus scanner and try again.

Windows virus scanners are notorious for blocking access to newly
created files for an unreasonable amount of time, causing downstream
operations to fail. In Subversion, we had to code an exponential-backoff
retry loop into our IO operation wrappers, but only on Windows.

-- Brane


Mime
View raw message