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

perf_hooks: histogram.percentile throw Assertion `(percentile) > (0)' failed when param is NaN #36936

Closed
Lxxyx opened this issue Jan 15, 2021 · 0 comments

Comments

@Lxxyx
Copy link
Member

Lxxyx commented Jan 15, 2021

  • Version: 15.4.0
  • Platform: macOS 10.15.7
  • Subsystem: perf_hooks

What steps will reproduce the bug?

const { monitorEventLoopDelay } = require('perf_hooks');
const h = monitorEventLoopDelay({ resolution: 20 });
h.enable();
h.disable();
console.log(h.percentile(NaN));

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

Everytime.

What is the expected behavior?

throw ERR_INVALID_ARG_VALUE error.

What do you see instead?

> console.log(h.percentile(NaN));
node[9818]: ../src/histogram-inl.h:37:double node::Histogram::Percentile(double): Assertion `(percentile) > (0)' failed.
 1: 0x1012e4da5 node::Abort() (.cold.1) [/usr/local/bin/node]
 2: 0x1000a6239 node::Abort() [/usr/local/bin/node]
 3: 0x1000a60a1 node::Assert(node::AssertionInfo const&) [/usr/local/bin/node]
 4: 0x10010f23f node::performance::(anonymous namespace)::ELDHistogramPercentile(v8::FunctionCallbackInfo<v8::Value> const&) [/usr/local/bin/node]
 5: 0x10025a4e8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/usr/local/bin/node]
 6: 0x100259a7c v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/usr/local/bin/node]
 7: 0x1002591a2 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/usr/local/bin/node]
 8: 0x100a7a359 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/usr/local/bin/node]

Additional information

Lxxyx added a commit to Lxxyx/node that referenced this issue Jan 15, 2021
ruyadorno pushed a commit that referenced this issue Jan 22, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
ruyadorno pushed a commit that referenced this issue Jan 25, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue May 25, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue May 30, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue Jun 5, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
targos pushed a commit that referenced this issue Jun 11, 2021
… is NaN

Fixes: #36936

PR-URL: #36937
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant