Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[win] tests teardown errors #3019

Closed
pbchekin opened this issue Dec 16, 2024 · 0 comments · Fixed by #3020 or #3028
Closed

[win] tests teardown errors #3019

pbchekin opened this issue Dec 16, 2024 · 0 comments · Fixed by #3020 or #3028
Labels
bug Something isn't working windows

Comments

@pbchekin
Copy link
Contributor

2024-12-16T17:05:43.5276693Z path = 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmp8m7oga7y\\4J5CMHVJQDNFZ6I6EJCZLWGMT5X4RLXJT475LGPN52V3LJHLHLDQ'
2024-12-16T17:05:43.5277053Z onerror = <function TemporaryDirectory._rmtree.<locals>.onerror at 0x000002A17F27C160>
2024-12-16T17:05:43.5277260Z
2024-12-16T17:05:43.5277366Z     def _rmtree_unsafe(path, onerror):
2024-12-16T17:05:43.5277535Z         try:
2024-12-16T17:05:43.5277693Z             with os.scandir(path) as scandir_it:
2024-12-16T17:05:43.5277888Z                 entries = list(scandir_it)
2024-12-16T17:05:43.5278062Z         except OSError:
2024-12-16T17:05:43.5278233Z             onerror(os.scandir, path, sys.exc_info())
2024-12-16T17:05:43.5278419Z             entries = []
2024-12-16T17:05:43.5278572Z         for entry in entries:
2024-12-16T17:05:43.5278739Z             fullname = entry.path
2024-12-16T17:05:43.5278917Z             if _rmtree_isdir(entry):
2024-12-16T17:05:43.5279079Z                 try:
2024-12-16T17:05:43.5279236Z                     if entry.is_symlink():
2024-12-16T17:05:43.5279428Z                         # This can only happen if someone replaces
2024-12-16T17:05:43.5279636Z                         # a directory with a symlink after the call to
2024-12-16T17:05:43.5279845Z                         # os.scandir or entry.is_dir above.
2024-12-16T17:05:43.5280102Z                         raise OSError("Cannot call rmtree on a symbolic link")
2024-12-16T17:05:43.5280302Z                 except OSError:
2024-12-16T17:05:43.5280495Z                     onerror(os.path.islink, fullname, sys.exc_info())
2024-12-16T17:05:43.5280690Z                     continue
2024-12-16T17:05:43.5280854Z                 _rmtree_unsafe(fullname, onerror)
2024-12-16T17:05:43.5281028Z             else:
2024-12-16T17:05:43.5281167Z                 try:
2024-12-16T17:05:43.5281312Z >                   os.unlink(fullname)
2024-12-16T17:05:43.5281697Z E                   PermissionError: [WinError 5] Access is denied: 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmp8m7oga7y\\4J5CMHVJQDNFZ6I6EJCZLWGMT5X4RLXJT475LGPN52V3LJHLHLDQ\\arch_utils.pyd'

https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12355194841/job/34478248043

Environment: Windows, A770

@pbchekin pbchekin added bug Something isn't working windows labels Dec 16, 2024
@pbchekin pbchekin changed the title [win] teardown errors [win] tests teardown errors Dec 16, 2024
pbchekin added a commit that referenced this issue Dec 17, 2024
To avoid PermissionError on Windows where certain .pyd files are locked
by current Python process and cannot be deleted.

Fixes #3019.
pbchekin added a commit that referenced this issue Dec 17, 2024
More places in tests to ignore cleanup errors on Windows.

Fixes #3019.
@vlad-penkin vlad-penkin added this to the 5.1 [DGPU] Windows builds milestone Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
2 participants