Skip to content

Tests teardown errors on Windows #4349

@pbchekin

Description

@pbchekin

https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/15267912762/job/42936838237

2025-05-27T06:51:30.8120300Z ______________________ ERROR at teardown of test_fn_dump ______________________
2025-05-27T06:51:30.8122870Z [gw7] win32 -- Python 3.9.13 C:\ar\_work\intel-xpu-backend-for-triton\intel-xpu-backend-for-triton\.venv\Scripts\python.exe
2025-05-27T06:51:30.8123609Z 
2025-05-27T06:51:30.8124279Z path = 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmps9fm8iqe\\76SOBA6P253WQ732L4766I6KHMNRKVQHLSL5XGTQAMSWWTYOGMXA'
2025-05-27T06:51:30.8125018Z onerror = <function TemporaryDirectory._rmtree.<locals>.onerror at 0x00000177D4F28AF0>
2025-05-27T06:51:30.8125404Z 
2025-05-27T06:51:30.8125586Z     def _rmtree_unsafe(path, onerror):
2025-05-27T06:51:30.8126009Z         try:
2025-05-27T06:51:30.8126317Z             with os.scandir(path) as scandir_it:
2025-05-27T06:51:30.8126653Z                 entries = list(scandir_it)
2025-05-27T06:51:30.8126987Z         except OSError:
2025-05-27T06:51:30.8127310Z             onerror(os.scandir, path, sys.exc_info())
2025-05-27T06:51:30.8127651Z             entries = []
2025-05-27T06:51:30.8130430Z         for entry in entries:
2025-05-27T06:51:30.8130935Z             fullname = entry.path
2025-05-27T06:51:30.8132788Z             if _rmtree_isdir(entry):
2025-05-27T06:51:30.8134675Z                 try:
2025-05-27T06:51:30.8136317Z                     if entry.is_symlink():
2025-05-27T06:51:30.8137212Z                         # This can only happen if someone replaces
2025-05-27T06:51:30.8138408Z                         # a directory with a symlink after the call to
2025-05-27T06:51:30.8140240Z                         # os.scandir or entry.is_dir above.
2025-05-27T06:51:30.8140775Z                         raise OSError("Cannot call rmtree on a symbolic link")
2025-05-27T06:51:30.8141348Z                 except OSError:
2025-05-27T06:51:30.8141794Z                     onerror(os.path.islink, fullname, sys.exc_info())
2025-05-27T06:51:30.8142420Z                     continue
2025-05-27T06:51:30.8142832Z                 _rmtree_unsafe(fullname, onerror)
2025-05-27T06:51:30.8143239Z             else:
2025-05-27T06:51:30.8143567Z                 try:
2025-05-27T06:51:30.8143908Z >                   os.unlink(fullname)
2025-05-27T06:51:30.8144900Z E                   PermissionError: [WinError 5] Access is denied: 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmps9fm8iqe\\76SOBA6P253WQ732L4766I6KHMNRKVQHLSL5XGTQAMSWWTYOGMXA\\__triton_launcher.cp39-win_amd64.pyd'
2025-05-27T06:51:09.7955452Z ___________________ ERROR at teardown of test_compile_stats ___________________
2025-05-27T06:51:09.7955832Z 
2025-05-27T06:51:09.7956809Z path = 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmp4z_ctvgt\\JUPGTR6TKKEMUT7CYNFUVJOJYFSRKMM6RICRYRZQ33YG4TEFSSGQ'
2025-05-27T06:51:09.7957789Z onerror = <function TemporaryDirectory._rmtree.<locals>.onerror at 0x0000023427594CA0>
2025-05-27T06:51:09.7958052Z 
2025-05-27T06:51:09.7958199Z     def _rmtree_unsafe(path, onerror):
2025-05-27T06:51:09.7958420Z         try:
2025-05-27T06:51:09.7958698Z             with os.scandir(path) as scandir_it:
2025-05-27T06:51:09.7959210Z                 entries = list(scandir_it)
2025-05-27T06:51:09.7959612Z         except OSError:
2025-05-27T06:51:09.7959903Z             onerror(os.scandir, path, sys.exc_info())
2025-05-27T06:51:09.7960200Z             entries = []
2025-05-27T06:51:09.7960496Z         for entry in entries:
2025-05-27T06:51:09.7960855Z             fullname = entry.path
2025-05-27T06:51:09.7961156Z             if _rmtree_isdir(entry):
2025-05-27T06:51:09.7961442Z                 try:
2025-05-27T06:51:09.7961729Z                     if entry.is_symlink():
2025-05-27T06:51:09.7962066Z                         # This can only happen if someone replaces
2025-05-27T06:51:09.7962456Z                         # a directory with a symlink after the call to
2025-05-27T06:51:09.7962824Z                         # os.scandir or entry.is_dir above.
2025-05-27T06:51:09.7963214Z                         raise OSError("Cannot call rmtree on a symbolic link")
2025-05-27T06:51:09.7963586Z                 except OSError:
2025-05-27T06:51:09.7964083Z                     onerror(os.path.islink, fullname, sys.exc_info())
2025-05-27T06:51:09.7964427Z                     continue
2025-05-27T06:51:09.7964804Z                 _rmtree_unsafe(fullname, onerror)
2025-05-27T06:51:09.7965137Z             else:
2025-05-27T06:51:09.7965518Z                 try:
2025-05-27T06:51:09.7965875Z >                   os.unlink(fullname)
2025-05-27T06:51:09.7966620Z E                   PermissionError: [WinError 5] Access is denied: 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmp4z_ctvgt\\JUPGTR6TKKEMUT7CYNFUVJOJYFSRKMM6RICRYRZQ33YG4TEFSSGQ\\__triton_launcher.cp39-win_amd64.pyd'
2025-05-27T06:51:41.0125524Z ___________ ERROR at teardown of test_remark_swp_op_before_operands ___________
2025-05-27T06:51:41.0126741Z [gw7] win32 -- Python 3.9.13 C:\ar\_work\intel-xpu-backend-for-triton\intel-xpu-backend-for-triton\.venv\Scripts\python.exe
2025-05-27T06:51:41.0127089Z 
2025-05-27T06:51:41.0128349Z path = 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmph9wudz9n\\FGNVRLJ7CIJZQL2SJN6QXZJZTY74ENNW7BT645ED5GLXJRMNUUDQ'
2025-05-27T06:51:41.0129062Z onerror = <function TemporaryDirectory._rmtree.<locals>.onerror at 0x0000023D3F682A60>
2025-05-27T06:51:41.0129474Z 
2025-05-27T06:51:41.0130118Z     def _rmtree_unsafe(path, onerror):
2025-05-27T06:51:41.0131607Z         try:
2025-05-27T06:51:41.0132237Z             with os.scandir(path) as scandir_it:
2025-05-27T06:51:41.0132731Z                 entries = list(scandir_it)
2025-05-27T06:51:41.0133512Z         except OSError:
2025-05-27T06:51:41.0134568Z             onerror(os.scandir, path, sys.exc_info())
2025-05-27T06:51:41.0134927Z             entries = []
2025-05-27T06:51:41.0135324Z         for entry in entries:
2025-05-27T06:51:41.0136233Z             fullname = entry.path
2025-05-27T06:51:41.0138184Z             if _rmtree_isdir(entry):
2025-05-27T06:51:41.0138497Z                 try:
2025-05-27T06:51:41.0140301Z                     if entry.is_symlink():
2025-05-27T06:51:41.0140679Z                         # This can only happen if someone replaces
2025-05-27T06:51:41.0141717Z                         # a directory with a symlink after the call to
2025-05-27T06:51:41.0142092Z                         # os.scandir or entry.is_dir above.
2025-05-27T06:51:41.0143160Z                         raise OSError("Cannot call rmtree on a symbolic link")
2025-05-27T06:51:41.0144886Z                 except OSError:
2025-05-27T06:51:41.0147150Z                     onerror(os.path.islink, fullname, sys.exc_info())
2025-05-27T06:51:41.0148482Z                     continue
2025-05-27T06:51:41.0148806Z                 _rmtree_unsafe(fullname, onerror)
2025-05-27T06:51:41.0152450Z             else:
2025-05-27T06:51:41.0152730Z                 try:
2025-05-27T06:51:41.0153616Z >                   os.unlink(fullname)
2025-05-27T06:51:41.0154871Z E                   PermissionError: [WinError 5] Access is denied: 'C:\\Users\\vagrant\\AppData\\Local\\Temp\\tmph9wudz9n\\FGNVRLJ7CIJZQL2SJN6QXZJZTY74ENNW7BT645ED5GLXJRMNUUDQ\\__triton_launcher.cp39-win_amd64.pyd'

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions