Skip to content
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

--prof hangs, dropping: overflow #38960

Open
l-bujakowski opened this issue Jun 7, 2021 · 3 comments
Open

--prof hangs, dropping: overflow #38960

l-bujakowski opened this issue Jun 7, 2021 · 3 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@l-bujakowski
Copy link

What steps will reproduce the bug?

node --prof fib.js

//fib.js
function fib(n) {
        if(n > 1){
                return fib(n-1) + fib(n-2)
        } else {
                return n;
        }
}

for(var i=0; i<40; i++){
    console.log(fib(i));
}

How often does it reproduce? Is there a required condition?

I always get this issue, every time.

What is the expected behavior?

  • fib.js should be run (it should print to stdout)
  • node should exit after
  • isolate-{something}-v8.log file should be generated
  • this generated file should be readable to node --prof-process

What do you see instead?

  • fib.js is never run, there is no output, even passing a file with sytax error or unexisting file, or even no filename doesn't make a difference
  • node hangs, it never exists (I've waited up to 15 minutes so far)
  • isolate-{something}-v8.log file is generated, but the output seems odd:

node --prof-process isolate-0x62557e0-9113-v8.log 2>err.txt >output.txt

output.txt:

Statistical profiling result from isolate-0x62557e0-9113-v8.log, (708 ticks, 0 unaccounted, 0 excluded).

 [Shared libraries]:
   ticks  total  nonlib   name
      2    0.3%          /lib/x86_64-linux-gnu/libc-2.27.so
      1    0.1%          /home/lbujakowski/.nvm/versions/node/v14.15.1/bin/node

 [JavaScript]:
   ticks  total  nonlib   name

 [C++]:
   ticks  total  nonlib   name
    702   99.2%   99.6%  __lll_lock_wait
      2    0.3%    0.3%  write
      1    0.1%    0.1%  do_futex_wait.constprop.1

 [Summary]:
   ticks  total  nonlib   name
      0    0.0%    0.0%  JavaScript
    705   99.6%  100.0%  C++
      0    0.0%    0.0%  GC
      3    0.4%          Shared libraries

 [C++ entry points]:
   ticks    cpp   total   name

 [Bottom up (heavy) profile]:
  Note: percentage shows a share of a particular caller in the total
  amount of its parent calls.
  Callers occupying less than 1.0% are not shown.

   ticks parent  name
    702   99.2%  __lll_lock_wait

The stderr got a lot of dropping: overflow errors:

cat err.txt | uniq -c

    697 dropping: overflow

Additional information

I'm using nvm, so I've tried this with few versions.
I have no issue with node 8.17.0 and 9.11.2. I get the bug on 10+ versions (I've tested with: 10.24.1, 14.17.0 and 16.3.0).
I've also tried using official node docker images, but same thing - old versions work, but 10+ don't.

I need to profile my app, but it seems I cannot profile at all. Does someone have an idea what might be the cause of this problem, or how to nail it?

@Ayase-252
Copy link
Member

even passing a file with sytax error or unexisting file, or even no filename doesn't make a difference

Could you reinstall Node.js? I suspect that something might messed up in your system. By the way, I have tested on Ubuntu 21.04 and Node.js v16.3.0, it works well.

@l-bujakowski
Copy link
Author

even passing a file with sytax error or unexisting file, or even no filename doesn't make a difference

Could you reinstall Node.js? I suspect that something might messed up in your system. By the way, I have tested on Ubuntu 21.04 and Node.js v16.3.0, it works well.

I've tried with official docker images and different node versions run by nvm.

@targos targos added the v8 engine Issues and PRs related to the V8 dependency. label Aug 9, 2021
@targos
Copy link
Member

targos commented Aug 9, 2021

@nodejs/diagnostics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

3 participants