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

Issue 787754 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , iOS
Pri: 1
Type: Bug-Regression

Blocking:
issue v8:6000



Sign in to add a comment

DevTools: Support coverage pane when attached to Node.js instance

Project Member Reported by jgruber@chromium.org, Nov 22 2017

Issue description

Chrome Linux: 64.0.3269.3 (Official Build) dev (64-bit)
Node: v10.0.0-nightly20171108d597317a20

The coverage pane does not seem to work when attached to a node instance. To repro:

$ node --version
v10.0.0-nightly20171108d597317a20
$ node --inspect-brk ~/js/coverage-fib.js 
Debugger listening on ws://127.0.0.1:9229/cf4ca8be-a27f-40f8-8e10-8d4d7b4ab227
For help see https://nodejs.org/en/docs/inspector
Debugger attached.

Then open chrome at chrome://inspect and select the remot target. See attached screenshot for the current state.

At this point, I'd expect us to be able to use the coverage pane, but neither 'record' nor 'record and reload page' buttons seem to do anything. Ideally, both should work.

Nice to have: after running the script to completion, it should be possible to inspect the collected coverage information in the source view, whereas currently the source files vanish from the source view.

In Chrome 62, the 'record' button works ('record & reload' doesn't), but node segfaults.
Chrome 63 behaves like 64, both buttons are disabled.
 
coverage-pane-with-node-instance.png
125 KB View Download
coverage-fib.js
269 bytes View Download
Cc: euge...@chromium.org pfeldman@chromium.org
Labels: -Pri-2 OS-iOS Pri-1
I can reproduce this with stable (63.0.3239.132). On tip of tree (66.0.3330.0) connecting to Node simply crashes:

95397:95397:0123/135739.670518:FATAL:devtools_session.cc(135)] Check failed: !browser_only_. 
#0 0x5574485eb8fc base::debug::StackTrace::StackTrace()
#1 0x55744860be73 logging::LogMessage::~LogMessage()
#2 0x557446bf03b8 content::DevToolsSession::DispatchProtocolMessage()
#3 0x557446bdf579 content::DevToolsAgentHostImpl::DispatchProtocolMessage()
#4 0x55744a86cdfe DevToolsUIBindings::DispatchProtocolMessageFromDevToolsFrontend()
#5 0x55744a891b4a _ZN12_GLOBAL__N_114ParseAndHandleIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEbRKN4base17RepeatingCallbackIFvDpT_EEERKNSB_IFvPKNSA_5ValueEEEERKNSA_9ListValueE
#6 0x55744a891788 DispatcherImpl::Dispatch()
#7 0x55744a868930 DevToolsUIBindings::HandleMessageFromDevToolsFrontend()
#8 0x5574470d67f6 content::DevToolsFrontendHostImpl::DispatchEmbedderMessage()
#9 0x5574468695d2 blink::mojom::DevToolsFrontendHostStubDispatch::Accept()
#10 0x557448eb9e77 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#11 0x557448ebc7f6 mojo::FilterChain::Accept()
#12 0x557448ebb342 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#13 0x557448f19ec2 IPC::(anonymous namespace)::ChannelAssociatedGroupController::AcceptOnProxyThread()
#14 0x557448f17c81 _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12_GLOBAL__N_132ChannelAssociatedGroupControllerEFvN4mojo7MessageEEJ13scoped_refptrIS5_ENS0_13PassedWrapperIS7_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
#15 0x5574485ed53a base::debug::TaskAnnotator::RunTask()
#16 0x557448613886 base::internal::IncomingTaskQueue::RunTask()
#17 0x557448611cb7 base::MessageLoop::RunTask()
#18 0x5574486120d4 base::MessageLoop::DeferOrRunPendingTask()
#19 0x557448612398 base::MessageLoop::DoWork()
#20 0x5574486163e9 base::MessagePumpGlib::Run()
#21 0x55744861150c base::MessageLoop::Run()
#22 0x557448642056 base::RunLoop::Run()
#23 0x55744826ac97 ChromeBrowserMainParts::MainMessageLoopRun()
#24 0x557446b837e7 content::BrowserMainLoop::RunMainMessageLoopParts()
#25 0x557446b87223 content::BrowserMainRunnerImpl::Run()
#26 0x557446b7f5ca content::BrowserMain()
#27 0x55744823a25b content::RunNamedProcessTypeMain()
#28 0x55744823b1b7 content::ContentMainRunnerImpl::Run()
#29 0x5574482480b4 service_manager::Main()
#30 0x557448239681 content::ContentMain()
#31 0x55744612c1cd ChromeMain
#32 0x7fb6d92822b1 __libc_start_main
#33 0x55744612c02a _start

Received signal 6
#0 0x5574485eb8fc base::debug::StackTrace::StackTrace()
#1 0x5574485eb3d1 base::debug::(anonymous namespace)::StackDumpSignalHandler()
#2 0x7fb6df1e00c0 <unknown>
#3 0x7fb6d9294fcf gsignal
#4 0x7fb6d92963fa abort
#5 0x5574485ea375 base::debug::BreakDebugger()
#6 0x55744860c2a4 logging::LogMessage::~LogMessage()
#7 0x557446bf03b8 content::DevToolsSession::DispatchProtocolMessage()
#8 0x557446bdf579 content::DevToolsAgentHostImpl::DispatchProtocolMessage()
#9 0x55744a86cdfe DevToolsUIBindings::DispatchProtocolMessageFromDevToolsFrontend()
#10 0x55744a891b4a _ZN12_GLOBAL__N_114ParseAndHandleIJRKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEEEEbRKN4base17RepeatingCallbackIFvDpT_EEERKNSB_IFvPKNSA_5ValueEEEERKNSA_9ListValueE
#11 0x55744a891788 DispatcherImpl::Dispatch()
#12 0x55744a868930 DevToolsUIBindings::HandleMessageFromDevToolsFrontend()
#13 0x5574470d67f6 content::DevToolsFrontendHostImpl::DispatchEmbedderMessage()
#14 0x5574468695d2 blink::mojom::DevToolsFrontendHostStubDispatch::Accept()
#15 0x557448eb9e77 mojo::InterfaceEndpointClient::HandleValidatedMessage()
#16 0x557448ebc7f6 mojo::FilterChain::Accept()
#17 0x557448ebb342 mojo::InterfaceEndpointClient::HandleIncomingMessage()
#18 0x557448f19ec2 IPC::(anonymous namespace)::ChannelAssociatedGroupController::AcceptOnProxyThread()
#19 0x557448f17c81 _ZN4base8internal7InvokerINS0_9BindStateIMN3IPC12_GLOBAL__N_132ChannelAssociatedGroupControllerEFvN4mojo7MessageEEJ13scoped_refptrIS5_ENS0_13PassedWrapperIS7_EEEEEFvvEE3RunEPNS0_13BindStateBaseE
#20 0x5574485ed53a base::debug::TaskAnnotator::RunTask()
#21 0x557448613886 base::internal::IncomingTaskQueue::RunTask()
#22 0x557448611cb7 base::MessageLoop::RunTask()
#23 0x5574486120d4 base::MessageLoop::DeferOrRunPendingTask()
#24 0x557448612398 base::MessageLoop::DoWork()
#25 0x5574486163e9 base::MessagePumpGlib::Run()
#26 0x55744861150c base::MessageLoop::Run()
#27 0x557448642056 base::RunLoop::Run()
#28 0x55744826ac97 ChromeBrowserMainParts::MainMessageLoopRun()
#29 0x557446b837e7 content::BrowserMainLoop::RunMainMessageLoopParts()
#30 0x557446b87223 content::BrowserMainRunnerImpl::Run()
#31 0x557446b7f5ca content::BrowserMain()
#32 0x55744823a25b content::RunNamedProcessTypeMain()
#33 0x55744823b1b7 content::ContentMainRunnerImpl::Run()
#34 0x5574482480b4 service_manager::Main()
#35 0x557448239681 content::ContentMain()
#36 0x55744612c1cd ChromeMain
#37 0x7fb6d92822b1 __libc_start_main
#38 0x55744612c02a _start
  r8: 0000000000000000  r9: 00007ffcce849030 r10: 0000000000000008 r11: 0000000000000246
 r12: 00007ffcce849780 r13: 000000000000005e r14: 00007ffcce849788 r15: 00007ffcce8492c9
  di: 0000000000000002  si: 00007ffcce849030  bp: 00007ffcce849270  bx: 0000000000000006
  dx: 0000000000000000  ax: 0000000000000000  cx: 00007fb6d9294fcf  sp: 00007ffcce8490a8
  ip: 00007fb6d9294fcf efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
Calling _exit(1). Core file will not be generated.

Note that this means that code coverage simply does not work with Node.js right now.
Cc: kozyatinskiy@chromium.org
For the record, #1 only happens when Chrome is compiled with dcheck_always_on=true. If it's set to false, I can connect to Node.js, but still not record coverage.

Comment 5 by kozy@chromium.org, Jan 23 2018

Cc: -kozyatinskiy@chromium.org caseq@chromium.org
Owner: kozy@chromium.org
Since @caseq is OOO, I will fix it.
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 23 2018

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

commit 8af9bb9a8b8223c62640d0b6d6bfc1569f8ed6be
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Tue Jan 23 20:53:37 2018

[DevTools] fixed coverage in Node.js frontend

We should not check for resource tree model when inspecting Node.js
target.

R=dgozman@chromium.org

Bug:  chromium:787754 
Change-Id: I04503a249acc05182524da40f83765e6ad7c37a5
Reviewed-on: https://chromium-review.googlesource.com/881468
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531342}
[modify] https://crrev.com/8af9bb9a8b8223c62640d0b6d6bfc1569f8ed6be/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js

Comment 7 by kozy@chromium.org, Jan 23 2018

Labels: -Type-Bug Merge-Request-65 Type-Bug-Regression
Status: Fixed (was: Assigned)
Awesome. Thanks!
Status: Verified (was: Fixed)
Thanks Alexey! Just checked the latest node nightly with Chrome ToT and coverage appears to work (even block coverage shows up). See also the attached screenshot.
Screenshot from 2018-01-24 14-42-05.png
164 KB View Download
Project Member

Comment 10 by sheriffbot@chromium.org, Jan 24 2018

Labels: -Merge-Request-65 Hotlist-Merge-Approved Merge-Approved-65
Your change meets the bar and is auto-approved for M65. Please go ahead and merge the CL to branch 3325 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Pls merge your change to M65 branch 3325 ASAP so we can pick it up for tomorrow's dev release. Thank you.
Project Member

Comment 12 by bugdroid1@chromium.org, Jan 24 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1b1313fdeb260e742dd6b99491fb6c6d33bfec44

commit 1b1313fdeb260e742dd6b99491fb6c6d33bfec44
Author: Alexey Kozyatinskiy <kozyatinskiy@chromium.org>
Date: Wed Jan 24 22:59:14 2018

[DevTools] fixed coverage in Node.js frontend

We should not check for resource tree model when inspecting Node.js
target.

R=dgozman@chromium.org
TBR=kozyatinskiy@chromium.org

(cherry picked from commit 8af9bb9a8b8223c62640d0b6d6bfc1569f8ed6be)

Bug:  chromium:787754 
Change-Id: I04503a249acc05182524da40f83765e6ad7c37a5
Reviewed-on: https://chromium-review.googlesource.com/881468
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#531342}
Reviewed-on: https://chromium-review.googlesource.com/884729
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#74}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/1b1313fdeb260e742dd6b99491fb6c6d33bfec44/third_party/WebKit/Source/devtools/front_end/coverage/CoverageView.js

Sign in to add a comment