New issue
Advanced search Search tips

Issue 751225 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocked on:
issue 750434

Blocking:
issue 82385



Sign in to add a comment

Keep running into 'permission denied' build errors after switching to clang

Project Member Reported by stanisc@chromium.org, Aug 1 2017

Issue description

OS: Win10

What steps will reproduce the problem?
My build keeps getting interrupted with arbitrary 'permission denied' errors. 
I did 'gn clean' after the last sync. Nothing else in my build configuration has changed as far as I am aware.
I started getting these errors after syncing the last night.

Examples of the build output:

1) D:\src\chrome\src>ninja -C out\Debug chrome
ninja: Entering directory `out\Debug'
[13884/29810] CXX obj/cc/cc/dc_layer_overlay.obj
FAILED: obj/cc/cc/dc_layer_overlay.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  @obj/cc/cc/dc_layer_overlay.obj.rsp /c ../../cc/output/dc_layer_overlay.cc /Foobj/cc/cc/dc_layer_overlay.obj /Fd"obj/cc/cc_cc.pdb"
error: unable to rename temporary 'obj/cc/cc/dc_layer_overlay.obj-3b0874b9' to output file 'obj/cc/cc/dc_layer_overlay.obj': 'permission denied'
1 error generated.
[13925/29810] CXX obj/cc/cc/nine_patch_generator.obj
ninja: build stopped: subcommand failed.

2) [6403/13749] CXX obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj
FAILED: obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  @obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj.rsp /c gen/blink/bindings/modules/v8/V8ConstrainDoubleRange.cpp /Foobj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj /Fd"obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl_cc.pdb"
error: unable to rename temporary 'obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj-606e8091' to output file 'obj/third_party/WebKit/Source/bindings/modules/v8/bindings_modules_impl/V8ConstrainDoubleRange.obj': 'permission denied'
1 error generated.
[6444/13749] CXX obj/third_party/WebKit/Source/bindings/core/v8/bindings_core_impl/V8GeneratedCoreBindings.obj
ninja: build stopped: subcommand failed.

3) [729/7306] CXX obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays/Precompile-core.cc.obj
FAILED: obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays/Precompile-core.cc.obj
../../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  @obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays/Precompile-core.cc.obj.rsp /c ../../third_party/WebKit/Source/core/win/Precompile-core.cpp /Foobj/third_party/WebKit/Source/core/typed_arrays/typed_arrays/Precompile-core.cc.obj /Fd"obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays_cc.pdb"
error: unable to rename temporary 'obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays_cc.pch-232411ff' to output file 'obj/third_party/WebKit/Source/core/typed_arrays/typed_arrays_cc.pch': 'permission denied'
1 error generated.
[770/7306] CXX obj/third_party/WebKit/Source/core/style/rendering/Precompile-core.cc.obj
ninja: build stopped: subcommand failed.
 
Summary: Keep running into 'permission denied' build errors after switching to clang (was: Keep running into 'permission denied' errors after switching to clang)
Goma isn't enabled.
gn args:

is_debug = true
is_component_build = true
enable_nacl = false
proprietary_codecs = true
ffmpeg_branding = "Chrome"
target_cpu = "x86"
remove_webcore_debug_symbols = true
Blocking: 82385
Is your disk full?
No, the disk has plenty of space.

I suspect it might be VsChromium.Server.exe that is making those files locked. I can see it accessing those types of files in PROCMON.

For example:
1:27:01.7661820 PM	VsChromium.Server.exe	35096	ReadFile	D:\src\chrome\src\out\Debug\obj\third_party\WebKit\Source\core\editing\editing\SplitElementCommand.obj-ccef8a1b	SUCCESS	Offset: 0, Length: 4,038,070, Priority: Normal

It looks like these files are not excluded from code search indexing by default. I guess Microsoft compiler doesn't generate files with these extensions in the obj directory. According to Bruce, the work around is to place a configuration file for VS Chromium in the source root.
VS-Chromium issue filed at https://github.com/chromium/vs-chromium/issues/31
Maybe clang-cl should use "obj/cc/cc/dc_layer_overlay-3b0874b9.obj" as temp name instead of "obj/cc/cc/dc_layer_overlay.obj-3b0874b9". That would fix this problem, and similar things that do stuff based on a file's extension.
Patch for comment 7: https://reviews.llvm.org/D36238
Blockedon: 750434
Components: -Infra Build
Yesterday's clang roll brought in a change to name files 'foo-12345.obj', but that got reverted upstream. Next roll will likely bring in a change that goes with 'foo-12345.obj.tmp' instead.
Just landed the .tmp change (https://reviews.llvm.org/D36413). If vs-chromium doesn't ignore .tmp files yet, it should be taught to do so.
Owner: thakis@chromium.org
Status: Fixed (was: Untriaged)

Sign in to add a comment