[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10470: MSYS: race in directory access?
From: |
Peter Rosin |
Subject: |
bug#10470: MSYS: race in directory access? |
Date: |
Wed, 11 Jan 2012 20:27:28 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Stefano Lattarini skrev 2012-01-11 18:31:
> Hi Peter, sorry for the delay.
No rush!
>>>>> We could enhance your original workaround like this:
>>>>>
>>>>> am__remove_distdir = \
>>>>> { test ! -d "$(distdir)" \
>>>>> || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
>>>>> - && rm -fr "$(distdir)"; }; }
>>>>> + && if rm -fr "$(distdir)"; then :; else \
>>>>> +## On MSYS (1.0.17) it is not possible to remove a directory that is
>>>>> +## in use; so, if the first rm fails, we sleep some seconds and retry,
>>>>> +## to give pending processes some time to exit and "release" the
>>>>> +## directory before we removed. See automake bug#10470.
>>>>> + sleep 5 && rm -fr "$(distdir)"; fi; }; }
>>>>> am__post_remove_distdir = $(am__remove_distdir)
>>>>> endif %?TOPDIR_P%
>>>
>>>> This works, best so far! Committable, if you ask me.
>>>>
>>
> Could you try the attached test case to see if it can reliably expose the
> problem on MSYS/MinGW? If yes, I'll prepare a patch shortly.
If I (try to) mend the race (the "rm -rf foo.d" reliably beats the "cd foo.d"
in the subshell) by adding a "sleep 1" before the "rm -rf foo.d" the test
passes (exit zero). So, I guess no, the probelm is not exposed by the test.
Did you mean "$my_sleep &" in the foo.test script? If add that &, the test
fails in much the same way as we've seen previously in this bug report.
...
rm: cannot remove directory `distcheck-pr10470-1.0/_build': Permission denied
make: *** [distcheck] Error 1
...
Cheers,
Peter
- bug#10470: MSYS: race in directory access?, (continued)
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/10
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/10
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/10
- bug#10470: MSYS: race in directory access?, Eric Blake, 2012/01/10
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/10
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/10
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/10
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/10
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/10
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/11
- bug#10470: MSYS: race in directory access?,
Peter Rosin <=
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/12
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/12
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/13
- bug#10470: MSYS: race in directory access?, Peter Rosin, 2012/01/13
- bug#10470: MSYS: race in directory access?, Stefano Lattarini, 2012/01/13