[PATCH] D88850: [lit, windows] Fix the search for git tools on Windows to check the path first

Stella Stamenova via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 10:51:27 PDT 2020


stella.stamenova added a comment.

In D88850#2315053 <https://reviews.llvm.org/D88850#2315053>, @aganea wrote:

> In D88850#2314943 <https://reviews.llvm.org/D88850#2314943>, @stella.stamenova wrote:
>
>> In D88850#2312893 <https://reviews.llvm.org/D88850#2312893>, @aganea wrote:
>>
>>> @stella.stamenova Strangely, your initial bug description sounds like a deadlock initiated by `tar_version.communicate()` in https://github.com/llvm/llvm-project/blob/f7941d98091827b8d0b6fdabb731e38c99f44b13/lld/test/lit.cfg.py#L110
>>> Are the lit tests using python 3.6 and not the 2.7 that you seem to have installed as well? In any case, I wonder if setting `stderr=open(os.devnull)` at lld/test/lit.cfg.py#L108, would fix the issue? Or perhaps just check the 'Threads' tab in Process Explorer on tar.exe, see why it is blocked.
>>
>> It does, doesn't it! But it's not. If I manually kill tar.exe, then any of the tests that use the git tools time out and fail as well, because all of the tools hang similarly. I attached a debugger to tar.exe after it hung and it is getting an access violation when trying to call GetCommandLineA, so I ran the tests as a different user and they passed. It looks like the tools that come with git can't run successfully under an account that has restricted permissions while the tools that come with GnuWin32 can (also, any other tools we are using in the tests run just fine under the same restricted account, the git tools are the exception). This makes me question whether using the git tools by default is the right choice - the failure was not obvious and not easy to track down. Granted, it is not one that will likely happen on a developer machine, but anyone who is trying to set up automated testing on Windows might (and likely should) be using a restricted account. If we do decide to proceed with using the git tools by default, this should at least be documented and gnuwin32 should be an alternative. Thoughts?
>
> Thanks for investigating! Isn't that related to access rights to the binaries, rather than an issue with the Git tools?

I haven't had time to dig deeper into this, but I don't think it's an issue of access *to* the binaries. The same process that runs the tests, runs git before that and it succeeds. I suppose the git installation could set different permissions on the different paths in the install, but I checked them and they appear to be uniform.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88850/new/

https://reviews.llvm.org/D88850



More information about the llvm-commits mailing list