-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node --prof-process is broken #19044
Comments
You’re right, I think this might be coming from 99d693d, /cc @MylesBorins Do you think you could try this fix? --- a/lib/internal/v8_prof_processor.js
+++ b/lib/internal/v8_prof_processor.js
@@ -34,9 +34,9 @@ if (process.platform === 'darwin') {
tickArguments.push('--windows');
}
tickArguments.push.apply(tickArguments, process.argv.slice(1));
-script = `(function(require) {
+script = `(function(module, require) {
arguments = ${JSON.stringify(tickArguments)};
function write (s) { process.stdout.write(s) }
${script}
})`;
-vm.runInThisContext(script)(require);
+vm.runInThisContext(script)(module, require); |
🤔 I thought we had just fixed |
@fhinkel as far as I can see, it was broken again a week later — it's a different issue. I guess some new tests for flag would help :) |
Make the script not error out immediately because of a missing pseudo-global. (Note that it seems like tests are still broken on `master`.) Fixes: nodejs#19044 Refs: nodejs#18623
When we were testing for #18623, it didn’t work on
We do have tests, but they’re resource-consuming and aren’t run as part of the standard test suite – I guess they just weren’t run the last time when changes to this were landed. @mourner I’ve opened #19059 with the above patch, could you try to check that out? |
@addaleax thanks a lot for the fix! I don't have Node source code set up locally but can try checking if no one else beats me to it in the nearest days. |
@addaleax thanks for the solution, it does work in the sense that I stopped getting the error, but --prof-process won't produce any output, it just keeps running without giving any feedback. I ran it against a 4MB isolation file and left it for an hour. Guess we need a profiler to profile node profiler :) |
Make the script not error out immediately because of a missing pseudo-global. (Note that it seems like tests are still broken on `master`.) PR-URL: nodejs#19059 Fixes: nodejs#19044 Refs: nodejs#18623 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@addaleax thanks a lot for the merge! Given the comment above by @aabuelenin, can we reopen the ticket until |
Hey, any updates on this? Did anyone get |
btw it seems to be broken on v8.10.0 as well. actually, this might be a different issue as it gets stuck and not failing on ReferenceError as in this case... UPDATE: apparently 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... OK nevermind, this is issue #19199. |
So is this the same issue as #19199 or is it likely to be a different problem? |
Make the script not error out immediately because of a missing pseudo-global. (Note that it seems like tests are still broken on `master`.) PR-URL: nodejs#19059 Fixes: nodejs#19044 Refs: nodejs#18623 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Make the script not error out immediately because of a missing pseudo-global. (Note that it seems like tests are still broken on `master`.) PR-URL: #19059 Fixes: #19044 Refs: #18623 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Make the script not error out immediately because of a missing pseudo-global. (Note that it seems like tests are still broken on `master`.) PR-URL: #19059 Fixes: #19044 Refs: #18623 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <matheus@sthima.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
node --prof-process is not working on node 8.11.x :( it just hangs, since this is LTS is there any fix in the pipeline coming? |
is it fixed in the 8.12.0 rc? |
I get this message when I used that version on a mac ReferenceError: printErr is not defined |
@joseph-jja That looks like a different error – can you open a new issue, ideally with a full reproduction (should be doable)? |
Hi @addaleax I got this error when running node --prof-process on the output from --prof. Bottom line is --prof-process is broken in node 8.11+ AFAICS and 8.12 didn't fix it for me |
@joseph-jja Can you open a new issue, please? I get that the bottom line is the same, but it would really be nice to not piggy-back on existing issues. That also gives the problem you are experiencing more visibility. |
As far as I'm concerned, the original issue is resolved — |
So does this mean prof process won't be fixed in node 8.x? |
@joseph-jja we are interested in fixing it. Can you please open a new issue explaining how to reproduce the error on 8.x |
isolate-0x56385f9c7470-v8.log.gz Hangs on v8.10.0 |
I just attempted to run the below on v8.14.0 and it worked fine. Am I missing something
|
v8.14.0 generates isolate logs and when I prof process doing the below: node --prof-process isolatexxxxx.log > logs/prof-1.txt it spits out a bunch of errors to the console. What does make it into the file does look like it did some profiling. |
v8.14.0 also generates messages about Code move event for unknown code: with an address which do not end up in the isolate logs, which used to. Not sure they belong there. Also for each profile log it spits out this message: (node:15644) [BROKEN_PROFILE_FILE] Warning: Profile file isolate-0x103000000-v8.log is broken (node:15735) [BROKEN_PROFILE_FILE] Warning: Profile file isolate-0x103800000-v8.log is broken I suppose somewhere after the tick there is a tock? |
@joseph-jja I believe the issue you might be looking for is #19199. By the way, I tried --prof and --prof-process on several v8.x versions (including the ones where issues were reported) and didn't get any errors. We need reproducibles, if you could share a minimal example (with code) where this issue is happening it would be awesome :) |
I'm going to reopen this issue until we have a fix for 8.x |
Node.js v8.x has reached the end-of-life and won't receive any fixes anymore. I am closing this since this issue only applies to Node.js v8.x. 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. |
node --prof-process
doesn't work in the current Node version.Same result when pointing to an isolate file.
The text was updated successfully, but these errors were encountered: