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

Issue 648185 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

RelaunchChromeBrowserWithNewCommandLineIfNeeded spam in debug.log

Project Member Reported by grt@chromium.org, Sep 19 2016

Issue description

MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded is called as chrome.exe is going away. It looks for the function named RelaunchChromeBrowserWithNewCommandLineIfNeeded in the main dll and calls it if found. This function is present in chrome.dll, but not in chrome_watcher.dll or chrome_child.dll. I don't think renderers shutdown cleanly, so they probably never reach MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded. I think the watcher does, though. These log messages are confusing since they lead the reader into thinking that there's something wrong. Could you somehow get rid of them? Perhaps the message should only be logged if the function isn't found for the browser process? Or maybe MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded should exit without doing anything for all procs other than the browser process. Thanks.
 
Status: Started (was: Assigned)
Where do logs show up for other processes? Is it in a sibling file to chrome_debug.log? 

I'm trying to repro and not able to find the spam. 

Comment 3 by grt@chromium.org, Sep 19 2016

My canary's debug.log looks like this:

[0916/034155:ERROR:main_dll_loader_win.cc(182)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded
[0916/034155:ERROR:main_dll_loader_win.cc(182)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded
[0916/034155:ERROR:main_dll_loader_win.cc(182)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded
[0916/034156:ERROR:main_dll_loader_win.cc(182)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded
[0916/034156:ERROR:main_dll_loader_win.cc(182)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded

on and on and on. I must confess that I've never caught it in the act, but I figured from staring at the code that this must be something other than the browser process. Ah, it can't be the watcher since the watcher doesn't set dll_. So it must be another child process that does die an orderly death. Maybe a first step would be to log the process type in that message so we'd know for certain that it's not the browser process (which would be bad, I think).
Starting by logging the process type SGTM, I'll send the CL for that.

Additional noob questions: 
- do you launch your canary with some flags (e.g. --enable-logging)? I don't have a debug.log
- what's the difference between debug.log and chrome_debug.log?

Comment 5 by grt@chromium.org, Sep 20 2016

Thanks. To answer your questions:
- I don't use any special flags. chrome.log is dropped next to chrome.exe. Simple inspection of the code tells me that this shouldn't happen (see https://cs.chromium.org/chromium/src/chrome/common/logging_chrome.cc?dr&q=file:logging_chrome%5C.cc+NDEBUG&sq=package:chromium&l=125). Except that logging is torn down during shutdown (see https://cs.chromium.org/chromium/src/chrome/app/chrome_main_delegate.cc?type=cs&q=processexiting+file:chrome_main_delegate%5C.cc&sq=package:chromium&l=941). I think that any LOG invocation after CleanupChromeLogging will result in a debug.log next to chrome.exe.
- I think (but am not certain) that chrome_debug.log is what you get if you run chrome.exe with --enable-logging.
Project Member

Comment 6 by bugdroid1@chromium.org, Sep 20 2016

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

commit c5442858e4f80adbd8afe5dfcfee95b4aba1d487
Author: manzagop <manzagop@chromium.org>
Date: Tue Sep 20 23:08:35 2016

Investigate RelaunchChromeBrowserWithNewCommandLineIfNeeded log spam

BUG= 648185 

Review-Url: https://codereview.chromium.org/2351533004
Cr-Commit-Position: refs/heads/master@{#419889}

[modify] https://crrev.com/c5442858e4f80adbd8afe5dfcfee95b4aba1d487/chrome/app/main_dll_loader_win.cc

Summarizing status:
- proceeding with adhoc investigation: hoping grt@ gets more of the log spam on canary to identify the case he's hitting
- we're holding off until then on the change to early exit from RelaunchChromeBrowserWithNewCommandLineIfNeeded if not in the browser process.

Comment 8 by grt@chromium.org, Sep 26 2016

Gotcha!

[0926/024723:ERROR:main_dll_loader_win.cc(185)] Could not find exported function RelaunchChromeBrowserWithNewCommandLineIfNeeded (utility process)
Great! 

Assuming you're familiar with the utility process, does this hint at some issue? (If you're not familiar, I can have a quick look.)

Basically, should we go ahead with the discussed fix?

Comment 10 by grt@chromium.org, Sep 28 2016

I wonder what it is that is launching 10 utility procs every 24h on my canary Chrome...

Anyway, yes, it seems that renderers are likely terminated by the browser proc and therefore never reach the Relaunch code. Utility procs aren't (at least under some circumstances). Maybe a good option is for MainDllLoader::RelaunchChromeBrowserWithNewCommandLineIfNeeded to look like this:

...
  if (relaunch_function) {
    relaunch_function();
  } else if (ProcessTypeUsesMainDll(process_type_) {
    LOG(DFATAL) << "...";
  }

where ProcessTypeUsesMainDll is the logic on line 89. I propose DFATAL so that developers get popped into a debugger if the relaunch function is ever not found in chrome.dll. What do you think?
Sgtm! Sending you that as a CL.
Project Member

Comment 12 by bugdroid1@chromium.org, Sep 28 2016

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

commit 70545eff7b8d5b7502e652965d673f88f871d33a
Author: manzagop <manzagop@chromium.org>
Date: Wed Sep 28 19:29:20 2016

Remove RelaunchChromeBrowserWithNewCommandLineIfNeeded log spam

Only a subset of processes are expected to have a
RelaunchChromeBrowserWithNewCommandLineIfNeeded function. Only log a
message for those processes.

BUG= 648185 

Review-Url: https://codereview.chromium.org/2381543002
Cr-Commit-Position: refs/heads/master@{#421603}

[modify] https://crrev.com/70545eff7b8d5b7502e652965d673f88f871d33a/chrome/app/main_dll_loader_win.cc

I am also getting this now. Windows 10 Insider Build 14955 - Chrome Version 54.0.2840.71 m


debug.log
12.5 KB View Download

Comment 14 by grt@chromium.org, Oct 31 2016

The messages should be gone as of Chrome 55.
Status: Fixed (was: Started)

Sign in to add a comment