Repository navigation
Process V8 profiler output not working (new v8.10.0) #19199
Description
Activity
- 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 I guess that makes the V8 6.2 update a prime candidate for causing this … /cc @nodejs/v8
/cc @gibfahn
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
Node v8.9.4
I set up the VM with:
vagrant init ubuntu/artful64 vagrant up vagrant ssh
And then used nvm to install node
8.10.0.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...
any idea how to push this forward?
more info needed?I think we need someone from the V8 team to take a look at it (cc/ @nodejs/v8 again).
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.
Reacted by Toni Bustos, Jasmin Parent, Mikhail Elfimov, Julian Tescher, Chris, Andreas Kohn, indieyourself, Nemanja Stefanović, Eugene Mirotin, GP and 13 moreReacted by Julian Tescher, Sarat Addepalli and Mikko AhlrothReacted by indieyourselfHi @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.Reacted by Aurélien Bombo@psmarshall thanks a lot!
Ran into the same issue, checked the
isolate-0xnnnnnnnnnnnn-v8.logfile 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.Reacted by Junus, DaAwesomeRazor, Peter Marshall, michaeltarleton, Mathis Mensing, Laurent Debricon, Karol Walasek, John Allen, Gaurav Yadav, Tiantian Gao and 3 moreReacted by Gaurav YadavHi, 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
Reacted by Andreas Kohn@archcorsair weird your solution worked for me
Reacted by Andreas Kohn, Mathis Mensing and Daniel Shneyder@archcorsair thanks! That's the fix for Node v8.x
- addedhelp wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.
on Jun 25, 2018 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.
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.
@psmarshall I have reproduced it on my mac.
macOS: 10.13.5
node: v8.11.3The newline fixed the issue for me as well.
Reacted by Chris Chang, yaodehuang(Nick Huang), Laurent Debricon and John AllenIt'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
I have reproduced it on my linux.
ubuntu version: 16.04
node: v8.11.4Node.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.
Reacted by Toni Bustos


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.