New issue
Advanced search Search tips

Issue 817797 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Flaky MSVC link failure

Project Member Reported by blundell@chromium.org, Mar 1 2018

Issue description

Owner: brucedaw...@chromium.org
Status: Assigned (was: Available)
Looks like a possible script bug. I'll take a look. The retrying was put in due to flaky LNK1201 failures and it's been working for a while so I'm not sure why this would start happening. Note that when we switch to lld the retry logic will no longer be needed which might make this bug irrelevant.

Output:

FAILED: v8_context_snapshot_generator.exe 
E:/b/depot_tools/win_tools-2_7_6_bin/python/bin/python.exe ../../build/toolchain/win/tool_wrapper.py link-wrapper environment.x64 False link.exe /nologo /OUT:./v8_context_snapshot_generator.exe /PDB:./v8_context_snapshot_generator.exe.pdb @./v8_context_snapshot_generator.exe.rsp
Retrying link due to error 1201
Traceback (most recent call last):
  File "../../build/toolchain/win/tool_wrapper.py", line 279, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/toolchain/win/tool_wrapper.py", line 45, in main
    exit_code = WinTool().Dispatch(args)
  File "../../build/toolchain/win/tool_wrapper.py", line 87, in Dispatch
    return getattr(self, method)(*args[1:])
  File "../../build/toolchain/win/tool_wrapper.py", line 180, in ExecLinkWrapper
    shutil.copyfile(pdb_name, pdb_name + 'failure_backup')
  File "E:\b\depot_tools\win_tools-2_7_6_bin\python\bin\lib\shutil.py", line 82, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: './v8_context_snapshot_generator.exe.pdb'
In order to try to work around crbug.com/782660 (occasional random LNK1201 errors with link.exe) I added retry logic. This retry logic would also copy the PDB to a backup location. This was added in Nov 2017 in crrev.com/c/769333. That code helped, but apparently it added a nfew failure mode if the PDB doesn't exist. So that's fun.

It would be easy enough to add an exception handler to catch this case but now that lld as the default linker has stuck for a while it's probably better to just delete this workaround. It has no value and it adds complexity.

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 18 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ac6758acc18dae70639b219e933955dfcd5f7fcb

commit ac6758acc18dae70639b219e933955dfcd5f7fcb
Author: Bruce Dawson <brucedawson@chromium.org>
Date: Mon Jun 18 18:07:43 2018

Revert "Check for LNK1201 and retry links when it occurs"

This reverts commit 798beff16c2ecc066861f848fb03611c3449ffab.

Reason for revert: The original bug has been made irrelevant by the
switch to lld, so this workaround is no longer needed. Additionally,
 crbug.com/817797  reports a failure sort of *caused* by this
workaround.

Original change's description:
> Check for LNK1201 and retry links when it occurs
>
> LNK1201 seems to be happening increasingly frequently on our debug x64
> builds for no clear reason. Subsequent builds tend to succeed so this
> change updates our link wrapper to retry links when this error is hit.
>
> This retry logic may solve the problem. If not then it gives us more
> evidence about the problem, including a backup copy of the PDB that
> might be helpful in investigating.
>
> Bug: 782660
> Change-Id: Iad60648425a01e07a20d108fcc5b74acaead9ee8
> Reviewed-on: https://chromium-review.googlesource.com/769333
> Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#516769}

R=dpranke@chromium.org,brucedawson@chromium.org

Bug: 782660, 817797 
Change-Id: Ifd03fecabdb462328898c7ef5253406cab2c570c
Reviewed-on: https://chromium-review.googlesource.com/1103377
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568070}
[modify] https://crrev.com/ac6758acc18dae70639b219e933955dfcd5f7fcb/build/toolchain/win/tool_wrapper.py

Status: Fixed (was: Assigned)
The switch to lld means that this bug was already fixed, but now the (obsolete) work around is removed as well.

Sign in to add a comment