New issue
Advanced search Search tips

Issue 787923 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Latest Windows 10 V1709 (16299) cannot build chromium source code.

Reported by kke...@gmail.com, Nov 22 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

Steps to reproduce the problem:
mkdir m:\src & mkdir m:\src\chrome1 & cd /dm:\src\chrome1
set path=m:\src\chrome1\depot_tools;m:\src\chrome1\depot_tools\python276_bin;%path%
set DEPOT_TOOLS_WIN_TOOLCHAIN=0
set GYP_MSVS_VERSION=2017
set vs2017_install=C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
fetch chromium
gclient runhooks
pushd src
gn gen out/build
ninja -C out\build chrome  -v -d keeprsp > ..\build.log

What is the expected behavior?
build passed.

What went wrong?
I tried multiple machines. All got errors such as 

FAILED: gen/services/service_manager/public/interfaces/constants.mojom.cc gen/services/service_manager/public/interfaces/constants.mojom.h gen/services/service_manager/public/interfaces/constants.mojom.srcjar 
m:/src/chrome1/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../mojo/public/tools/bindings/mojom_bindings_generator.py --use_bundled_pylibs generate ../../services/service_manager/public/interfaces/constants.mojom -d ../../ -I ../../ -o gen --bytecode_path gen/mojo/public/tools/bindings --scrambled_message_id_salt_path ../../chrome/VERSION --allow_native_structs -g c++,java --depfile gen/services/service_manager/public/interfaces/constants__generator_constants.d --depfile_target gen/services/service_manager/public/interfaces/constants.mojom.cc --typemap gen/services/service_manager/public/interfaces/constants__type_mappings --export_attribute SERVICE_MANAGER_MOJOM_CONSTANTS_EXPORT --export_header services/service_manager/public/interfaces/constants_export.h --use_once_callback
Traceback (most recent call last):
  File "../../mojo/public/tools/bindings/mojom_bindings_generator.py", line 401, in <module>
    sys.exit(main())
  File "../../mojo/public/tools/bindings/mojom_bindings_generator.py", line 397, in main
    return args.func(args, remaining_args)
  File "../../mojo/public/tools/bindings/mojom_bindings_generator.py", line 285, in _Generate
    processor.ProcessFile(args, remaining_args, generator_modules, filename)
  File "../../mojo/public/tools/bindings/mojom_bindings_generator.py", line 174, in ProcessFile
    RelativePath(filename, args.depth))
  File "../../mojo/public/tools/bindings/mojom_bindings_generator.py", line 225, in _GenerateModule
    generator.GenerateFiles(filtered_args)
  File "m:\src\chrome1\src\mojo\public\tools\bindings\generators\mojom_java_generator.py", line 533, in GenerateFiles
    build_utils.ZipDir(zip_filename, temp_java_root)
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\contextlib.py", line 24, in __exit__
    self.gen.next()
  File "m:\src\chrome1\src\mojo\public\tools\bindings\generators\mojom_java_generator.py", line 406, in TempDir
    shutil.rmtree(dirname)
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 247, in rmtree
    rmtree(fullname, ignore_errors, onerror)
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "m:\src\chrome1\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 254, in rmtree
    os.rmdir(path)
WindowsError: [Error 145] The directory is not empty: 'c:\\users\\xxx\\appdata\\local\\temp\\tmpnpysou\\org\\chromium\\service_manager'

Did this work before? N/A 

Chrome version: 62.0.3202.94  Channel: dev
OS Version: 10.0
Flash Version: Shockwave Flash 27.0 r0

Seems python2 has some issues on Windows 10 V1709 (16299).
 
Cc: brucedaw...@chromium.org
Components: Internals>Mojo
Labels: Needs-Feedback
Bruce, do you have any suggestions here?

Thank you!
Owner: brucedaw...@chromium.org
Status: Assigned (was: Unconfirmed)
I have a 16299 machine at home that I can test with. It has a Chromium repo but I haven't built it since upgrading to 16299.

Deleting files/directories on Windows can be flaky, but this sounds more like a persistent failure. Using sysinternals' handle.exe can be helpful for understanding why a file or directory can't be deleted. Or, in some cases we have had to add retries to directory deletion.

Comment 3 by kke...@gmail.com, Nov 23 2017

Thanks guys. Are you able to repro? And is there a workaround?
Status: WontFix (was: Assigned)
The minimal repro for this is:

ninja -C out\build gen/services/service_manager/public/interfaces/constants.mojom.cc

But on my 16299 machine this succeeds just fine, as does a full build of the 'chrome' target.

I am confident that this is not a Fall Creators Update (16299) bug. More likely it is triggered by a poorly written anti-virus program that is maintaining a lock on a file or directory and preventing it from being deleted.

Since the failing line is here:

mojo\public\tools\bindings\generators\mojom_java_generator.py", line 406

the obvious workaround would be to replace the rmtree call there with 'pass'. But, that is just a hack. The real solution is to investigate to find out what file is being left behind and why. The handle.exe tool may be helpful, or procmon.exe, or perhaps some custom hacking of the python script. Since this works on all of our machines we can't help with the investigation, unfortunately.

One thing missing from your output is the ninja build status that shows how many build steps succeeded before you hit this failure. I can't tell if you failed almost immediately or if many steps succeeded. I'm not sure if that is important or not, but it could be interesting information.

I'm going to close as WontFix because we can't reproduce it. Feel free to reopen if you have more information. You could also try asking on chromium-dev@chromium.org to see if other people are having any luck building on 16299.

Comment 5 by kke...@gmail.com, Nov 23 2017

Thanks guys.

Seems it's related to Windows Defender.

During the build, with Windows Defender on, the build failed at about 100~200st among of 32725 projects.

With Windows Defender off, the build failed at about 12000st~13000st among of 32725 projects.

Seems a Windows Defender bug???

For now, I need use Windows server 2016 to build it.
I have Windows Defender on all of my computers, FWIW.

For reporting build errors I suspect it is best to not redirect the output to a file, and then copy the text that is printed, including the step number and the error output.
> set path=m:\src\chrome1\depot_tools;m:\src\chrome1\depot_tools\python276_bin;%path%

You shouldn't have to add the python276_bin directory to your path. Try not doing that? I doubt it will make a difference, but it is an unnecessary step.

Comment 8 by kke...@gmail.com, Nov 26 2017

I added python276_bin directory to path because I have python v3's exe in the path.
"redirect the output" shouldn't be the issue because same cmds runs on "1703 (OS build 15063)" without any issues.

Sign in to add a comment