You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nightly, all Windows builds: PermissionError: [WinError 5] Access is denied: 'c:/build' #5749
C:\Users\b\AppData\Local\Temp\buildkite-script-219452124.bat
--
| Traceback (most recent call last):
| File "bazelci.py", line 1255, in <module>
| sys.exit(main())
| File "bazelci.py", line 1242, in main
| args.build_only, args.test_only, args.monitor_flaky_tests)
| File "bazelci.py", line 365, in execute_commands
| clone_git_repository(git_repository, platform)
| File "bazelci.py", line 601, in clone_git_repository
| root = downstream_projects_root(platform)
| File "bazelci.py", line 313, in downstream_projects_root
| os.makedirs(path)
| File "C:\python3\lib\os.py", line 211, in makedirs
| makedirs(head, exist_ok=exist_ok)
| File "C:\python3\lib\os.py", line 211, in makedirs
| makedirs(head, exist_ok=exist_ok)
| File "C:\python3\lib\os.py", line 221, in makedirs
| mkdir(name, mode)
| PermissionError: [WinError 5] Access is denied: 'c:/build'
| 🚨 Error: The command exited with status 1
ERROR_ACCESS_DENIED is a versatile, generic error, and MSDN does not document it in detail.
In my experience with CreateDirectoryW, which I believe os.makedirs ultimately calls, the error may indicate:
no permission to create directories in the root of a drive
Catching the PermissionError, then checking os.isdir(path). If another process concurrently created the directory, there's a chance the directory remained, though there's also a chance that it was removed again after os.makedirs threw but before we checked os.isdir. Still, checking os.isdir in the catch-block increases the likelihood of a figuring out what happened.
Verifying that the process can write in the root of the drive.
I’ve moved C:\build (slow persistent SSD) to D:\build (fast local SSD) recently. We probably just have to update these projects. Sorry, I wasn’t aware that anyone hardcodes that path...
Activity
laszlocsomor commentedon Aug 3, 2018
ERROR_ACCESS_DENIEDis a versatile, generic error, and MSDN does not document it in detail.In my experience with
CreateDirectoryW, which I believeos.makedirsultimately calls, the error may indicate:https://github.com/bazelbuild/continuous-integration/blob/8f09765be3f8a15c2b64ae6a8621aae3885ed0a3/buildkite/bazelci.py#L312-L313
laszlocsomor commentedon Aug 3, 2018
I suggest one or more of:
PermissionError, then checkingos.isdir(path). If another process concurrently created the directory, there's a chance the directory remained, though there's also a chance that it was removed again afteros.makedirsthrew but before we checkedos.isdir. Still, checkingos.isdirin the catch-block increases the likelihood of a figuring out what happened.philwo commentedon Aug 3, 2018
I’ve moved C:\build (slow persistent SSD) to D:\build (fast local SSD) recently. We probably just have to update these projects. Sorry, I wasn’t aware that anyone hardcodes that path...
philwo commentedon Aug 3, 2018
@buchgr FYI, maybe we have to change this simply in bazelci.py?
dslomov commentedon Aug 6, 2018
@buchgr @philwo still failing
philwo commentedon Aug 6, 2018
Fixed in bazelbuild/continuous-integration@efc69af
jin commentedon Aug 8, 2018
Perfect, thanks @philwo. Verified in https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/372 (the later nightlies are failing due to bazelci.py changes)