Skip to content

Process V8 profiler output not working (new v8.10.0) #19199

Description

@antoniobusrod
  • Version: v8.10.0
  • Platform: linux x64
  • Subsystem: Ubuntu 17.10 artful

After generate log statistical profiling information (node --prof), process V8 profiler output generated (node --prof-process isolate-0xnnnnnnnnnnnn-v8.log) doesn't output anything to standard ouput. It seems it consumes almost all CPU available.

I've been testing with example from Easy profiling for Node.js Applications.

It works fine with previous v8.9.4 version. You can use Simple profiling repository to test it.

Activity

  1. changed the title [-]Process V8 profiler not working (new v8.10.0)[/-] [+]Process V8 profiler output not working (new v8.10.0)[/+] on Mar 7, 2018
  2. addaleax commented on Mar 7, 2018

    @addaleax
    Member

    I guess that makes the V8 6.2 update a prime candidate for causing this … /cc @nodejs/v8

  3. MylesBorins commented on Mar 13, 2018

    @MylesBorins
    Contributor
  4. gibfahn commented on Mar 14, 2018

    @gibfahn
    Member

    It works fine with previous v8.9.4 version. You can use Simple profiling repository to test it.

    Can you explain more about how to reproduce with that repository?

    This is what I get when I run the steps from the readme on a vagrant box (on a macOS machine):

    Node v8.10.0

    image

    Node v8.9.4

    image

    I set up the VM with:

    vagrant init ubuntu/artful64
    vagrant up
    vagrant ssh

    And then used nvm to install node 8.10.0.

  5. guymguym commented on Mar 15, 2018

    @guymguym
    Contributor

    One observation that might help:

    The issue happens when I use node --prof with v8.10.0 to record the profiling information and then --prof-process gets stuck with either v8.10.0 or v8.9.4.

    However, when I use v8.9.4 to create the profiler file, both versions succeed with --prof-process...

  6. guymguym commented on Mar 22, 2018

    @guymguym
    Contributor

    any idea how to push this forward?
    more info needed?

  7. gibfahn commented on Mar 22, 2018

    @gibfahn
    Member

    I think we need someone from the V8 team to take a look at it (cc/ @nodejs/v8 again).

  8. psmarshall commented on Mar 29, 2018

    @psmarshall
    Contributor

    It looks like the .log files produced by node v8.9.4 have a newline at the end, and the ones produced by v8.10.0 don't.

    I built a debug build of v8.10.0 and interrupted it in the debugger while it was hanging. It seems to be calling filesystem read in an infinite loop. I guess something expects a newline at the end of the file.

    None of the log files I can generate to cause the hanging end with 0xa and all of the ones that work end with 0xa.

    Not sure where that expectation is happening though, also not sure whether the v8 profiler output changed or if node itself writes the file.

  9. antoniobusrod commented on Apr 2, 2018

    @antoniobusrod
    Author

    Hi @psmarshall is right, I've repeated the test using v8.11.1 and it failed as I described in this issue. However, If I manually add an empty line at the end of isolate-0xnnnnnnnnnnnn-v8.log, it works.

  10. charlesdarkwind commented on Apr 8, 2018

    @charlesdarkwind

    @psmarshall thanks a lot!

  11. archcorsair commented on May 1, 2018

    @archcorsair

    Ran into the same issue, checked the isolate-0xnnnnnnnnnnnn-v8.log file for a missing newline. Interestingly, mine already had a newline... So I added another and it worked fine after! Strange, but thought I'd share.

  12. psmarshall commented on May 4, 2018

    @psmarshall
    Contributor
  13. antoniobusrod commented on May 16, 2018

    @antoniobusrod
    Author

    Hi, I've just tested with new v8.11.2, and I reproduced same results than previous comment #19199 (comment)

    • Version: v8.11.2
    • Platform: linux x64
    • Subsystem: Ubuntu 18.04 LTS bionic
  14. DaAwesomeRazor commented on May 20, 2018

    @DaAwesomeRazor

    @archcorsair weird your solution worked for me

  15. karliky commented on Jun 7, 2018

    @karliky

    @archcorsair thanks! That's the fix for Node v8.x

  16. added
    help wantedIssues that need assistance from volunteers or PRs that need help to proceed.
    on Jun 25, 2018
  17. ofrobots commented on Jun 25, 2018

    @ofrobots
    Contributor

    I think this issue needs some investigation on what code has changed (v8 vs. node) that causes the newline to be missing. Adding the 'help wanted' label.

  18. psmarshall commented on Jun 29, 2018

    @psmarshall
    Contributor

    I just tried to reproduce this on mac and I couldn't, it seems people commenting here who reproduced it did so on linux. Not sure why that's the case but I can take a look next week when I have access to my linux machine again.

  19. michaeltarleton commented on Jul 1, 2018

    @michaeltarleton

    @psmarshall I have reproduced it on my mac.
    macOS: 10.13.5
    node: v8.11.3

    The newline fixed the issue for me as well.

  20. s-stark commented on Jul 24, 2018

    @s-stark

    It's not just a simple missing newline for me. The last line in the log file is actually incomplete after CTRL-C'ing.
    Likely meaning the process is abruptly terminating instead of flushing the rest of the line and a newline.

    os: Ubuntu 16.04, node: v8.11.3

  21. self-assigned this
    on Sep 12, 2018
  22. gtzinos commented on Oct 3, 2018

    @gtzinos

    I have reproduced it on my linux.
    ubuntu version: 16.04
    node: v8.11.4

  23. BridgeAR commented on Jan 2, 2020

    @BridgeAR
    Member

    Node.js v8.x has reached the end-of-life and won't receive any fixes anymore. I am closing this since this issue seems to only apply to Node.js v8.x. If it does apply to newer versions as well, please leave a comment so that this can be reopened. No matter if you run into this issue or not, please update to a newer Node.js version in case you still use v8.x.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedIssues that need assistance from volunteers or PRs that need help to proceed.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions