New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 708803 link

Starred by 3 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

landmines shouldn't blow away args.gn

Project Member Reported by dcheng@chromium.org, Apr 5 2017

Issue description

I synced on Windows, and I guess there was a landmine for some PCH issue? I was unpleasantly surprised when it blew away one of my out directories entirely (luckily I had a similar args.gn config in another output dir and was able to copy that over)
 
We should try to use landmines less frequently - they can be painful on developer machines. Maybe we need a build-machine only way of doing landmines?

What was the output of the directory deletion. Did you  crbug.com/627656 ? Landmines are not "supposed" to fully delete your output directories, but that is one known time when they do.
Ah... I didn't pay close enough attention the first time.

gclient sync failed the first time with this message:

________ running 'C:\src\depot_tools\python276_bin\python.exe src/build/landmines.py' in 'C:\src\chrome'
Clobbering due to:
--- old_landmines       Wed Oct 12 15:58:07 2016
+++ new_landmines       Wed Apr 05 15:25:43 2017
@@ -17,0 +18 @@
+Clobber Windows to fix strange PCH-not-rebuilt errors.
Traceback (most recent call last):
  File "src/build/landmines.py", line 138, in <module>
    sys.exit(main())
  File "src/build/landmines.py", line 132, in main
    clobber_if_necessary(landmines, options.src_dir)
  File "src/build/landmines.py", line 71, in clobber_if_necessary
    clobber.clobber(out_dir)
  File "C:\src\chrome\src\build\clobber.py", line 120, in clobber
    delete_build_dir(path)
  File "C:\src\chrome\src\build\clobber.py", line 83, in delete_build_dir
    with open(gn_args_file, 'w') as f:
IOError: [Errno 13] Permission denied: 'C:\\src\\chrome\\src\\out\\Debug\\args.gn'
Error: Command 'C:\\src\\depot_tools\\python276_bin\\python.exe src/build/landmines.py' returned non-zero exit status 1 in C:\src\chrome
Hook ''C:\src\depot_tools\python276_bin\python.exe' src/build/landmines.py' took 29.18 secs

I'm not entirely sure why it failed to write back the args.gn file, but I guess that would explain the entire directory vanishing.
Components: -Infra Build
Cc: brettw@chromium.org
+1, we shouldn't use landmines generally, as a lengthy comment in get_landmines.py points out. Looks like this one was added in https://codereview.chromium.org/2769283002 to work around MSVC PCH issues.

Comment 5 by wfh@chromium.org, Jun 20 2017

Labels: -Pri-2 Pri-1
I don't think it's entirely reasonable to say the solution to this bug is just not to use landmines - since there are legitimate reasons why landmines are used (otherwise it wouldn't exist at all).

I think we need to make landmines more robust for failure, as I just lost the args.gn for six build directories and had to rebuild them manually. Perhaps always keeping a backup of the args.gn somewhere safe (even if it's just a directory in %temp%) so it can be manually recovered if the script fails?

Sign in to add a comment