New issue
Advanced search Search tips

Issue 749117 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug



Sign in to add a comment

When running with CHROME_IPC_LOGGING=1, Chrome crashes when opening a file

Reported by lenny.kh...@gmail.com, Jul 26 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Steps to reproduce the problem:
1. Start Chromium with CHROME_IPC_LOGGING=1
2. Try to open a file by double clicking from Finder
3. Chrome crashes

What is the expected behavior?
Chrome does not crash

What went wrong?
Chrome crashes (see attached stack trace)

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 59.0.3071.115  Channel: n/a
OS Version: OS X 10.13.0
Flash Version: Shockwave Flash 26.0 r0
 
ipc_logging.crash
12.8 KB Download
Actually I believe this happens when opening any file:// URL, not just when opening from Finder.
Labels: Needs-Milestone
Cc: pnangunoori@chromium.org
Labels: Needs-Feedback
Tested on reported #59.0.3071.115 and unable to reproduce the issue. Attached is the screencast for reference.

Tried to open the test file using the keyboard controls command+o and pasting the URL 'file:///Users/pnangunoori/Downloads/test2.html' in omni box.

@lenny.khazan -- Could you please look into this and provide us the consistent steps to reproduce this issue.

Thanks in advance.

749117.mov
6.4 MB Download
@pnangunoori: Apologies, I should have clarified that CHROME_IPC_LOGGING is an environment variable, I don't think Chromium supports that as a CLI flag (I'm not seeing the IPC messages show up for you in Terminal).
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 2 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pnangunoori@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: TE-NeedsTriageHelp
Adding the label 'TE-NeedsTriageHelp' for further investigation.

Labels: -Needs-Milestone Needs-TestConfirmation

Comment 8 by shrike@chromium.org, Aug 10 2017

Components: Internals>Mojo
Labels: -Needs-TestConfirmation -TE-NeedsTriageHelp
Status: Untriaged (was: Unconfirmed)
[MacTriage] Hitting DCHECK at host_port_pair.cc:72.

Comment 9 by tapted@chromium.org, Aug 27 2017

Owner: thestig@chromium.org
Status: Assigned (was: Untriaged)
[mac triage]

std::string HostPortPair::HostForURL() const {
  // TODO(rtenneti): Add support for |host| to have '\0'.
  if (host_.find('\0') != std::string::npos) {
    std::string host_for_log(host_);
    size_t nullpos;
    while ((nullpos = host_for_log.find('\0')) != std::string::npos) {
      host_for_log.replace(nullpos, 1, "%00");
    }
    LOG(DFATAL) << "Host has a null char: " << host_for_log;
  }
  // Check to see if the host is an IPv6 address.  If so, added brackets.
  if (host_.find(':') != std::string::npos) {
    DCHECK_NE(host_[0], '[');
*   return base::StringPrintf("[%s]", host_.c_str());
  }

  return host_;
}

DCHECK added in r53403 - maybe we can just remove it?
Labels: OS-Chrome OS-Linux OS-Windows
Hmm, it's been a while since I touched that code.
Well, the input that's failing the DCHECK is "[2607:f8b0:4001:c20::68]". Seems wrong to turn that into "[[2607:f8b0:4001:c20::68]]". Someone is probably calling set_host() with the wrong input host. The comment for HostPortPair::host_ (written by me) says |host_| should not contain brackets for IPv6 addresses.
Cc: eroman@chromium.org mmenke@chromium.org
The set_host() in content::RenderFrameImpl::DidCommitProvisionalLoad() is the most obvious culprit. Not sure if we want to HostPortPair to allow brackets in |host_|, or to add more DCHECKs to prevent set_host("[ipv6_addr]") and fix the callers.
My own preference is to fix callers - a caller that puts in a hostname with braces is likely a caller that expects to get out a hostname in the same format.

Sign in to add a comment