Title: --cpu-prof crashes in debug builds when code cache is enabled · Issue #27307 · nodejs/node · GitHub
Open Graph Title: --cpu-prof crashes in debug builds when code cache is enabled · Issue #27307 · nodejs/node
X Title: --cpu-prof crashes in debug builds when code cache is enabled · Issue #27307 · nodejs/node
Description: This currently fails the debug build on master, the CPU profiler crashes when code cache is enabled (for some reason, this in v8::internal::ProfilerListener::InferScriptName turns into a nullptr in the middle of the profiling). ./configu...
Open Graph Description: This currently fails the debug build on master, the CPU profiler crashes when code cache is enabled (for some reason, this in v8::internal::ProfilerListener::InferScriptName turns into a nullptr in...
X Description: This currently fails the debug build on master, the CPU profiler crashes when code cache is enabled (for some reason, this in v8::internal::ProfilerListener::InferScriptName turns into a nullptr in...
Opengraph URL: https://github.com/nodejs/node/issues/27307
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"--cpu-prof crashes in debug builds when code cache is enabled","articleBody":"This currently fails the debug build on master, the CPU profiler crashes when code cache is enabled (for some reason, `this` in `v8::internal::ProfilerListener::InferScriptName` turns into a nullptr in the middle of the profiling).\r\n\r\n```\r\n./configure --debug\r\nmake -C out\r\nout/Debug/node --cpu-prof test/fixtures/workload/fibonacci.js # or any script\r\n```\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eSee stack trace \u003c/summary\u003e\r\n\r\n```\r\n* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)\r\n * frame #0: 0x0000000100f738d1 node`v8::internal::ProfilerListener::InferScriptName(v8::internal::Name, v8::internal::SharedFunctionInfo) [inlined] v8::internal::Map::instance_type() const at map-inl.h:293 [opt]\r\n frame #1: 0x0000000100f738d1 node`v8::internal::ProfilerListener::InferScriptName(v8::internal::Name, v8::internal::SharedFunctionInfo) [inlined] v8::internal::HeapObject::IsString() const at instance-type-inl.h:70 [opt]\r\n frame #2: 0x0000000100f738c1 node`v8::internal::ProfilerListener::InferScriptName(this=0x0000000000000000, name=\u003cunavailable\u003e, info=SharedFunctionInfo @ 0x00007ffeefbfbb30) at profiler-listener.cc:265 [opt]\r\n frame #3: 0x0000000100f74ba8 node`v8::internal::ProfilerListener::CodeCreateEvent(this=0x0000000103e1b9b0, tag=SCRIPT_TAG, abstract_code=\u003cunavailable\u003e, shared=SharedFunctionInfo @ 0x00007ffeefbfbd38, script_name=Name @ 0x00007ffeefbfbc28, line=1, column=1) at profiler-listener.cc:172 [opt]\r\n frame #4: 0x00000001010dc732 node`v8::internal::CodeSerializer::Deserialize(v8::internal::Isolate*, v8::internal::ScriptData*, v8::internal::Handle\u003cv8::internal::String\u003e, v8::ScriptOriginOptions) [inlined] v8::internal::CodeEventDispatcher::CodeCreateEvent(this=\u003cunavailable\u003e, tag=SCRIPT_TAG, code=AbstractCode @ r12, shared=SharedFunctionInfo @ 0x00007ffeefbfbed0, source=Name @ 0x00007ffeefbfbe90, line=1, column=\u003cunavailable\u003e) at code-events.h:142 [opt]\r\n frame #5: 0x00000001010dc6dc node`v8::internal::CodeSerializer::Deserialize(isolate=0x0000000106000000, cached_data=\u003cunavailable\u003e, source=Handle\u003cv8::internal::String\u003e @ 0x00007ffeefbfbed0, origin_options=\u003cunavailable\u003e) at code-serializer.cc:276 [opt]\r\n frame #6: 0x00000001006edffe node`v8::internal::Compiler::GetWrappedFunction(source=\u003cunavailable\u003e, arguments=\u003cunavailable\u003e, context=\u003cunavailable\u003e, script_details=0x00007ffeefbfc1f0, origin_options=(flags_ = 1), cached_data=\u003cunavailable\u003e, compile_options=kConsumeCodeCache, no_cache_reason=kNoCacheNoReason) at compiler.cc:1936 [opt]\r\n frame #7: 0x0000000100531b50 node`v8::ScriptCompiler::CompileFunctionInContext(v8_context=\u003cunavailable\u003e, source=\u003cunavailable\u003e, arguments_count=\u003cunavailable\u003e, arguments=0x00000001050311d0, context_extension_count=0, context_extensions=0x0000000000000000, options=kConsumeCodeCache, no_cache_reason=kNoCacheNoReason) at api.cc:2545 [opt]\r\n frame #8: 0x000000010022bd19 node`node::native_module::NativeModuleLoader::LookupAndCompile(this=0x0000000102951e38, context=(val_ = 0x0000000107012720), id=\"path\", parameters=0x00007ffeefbfced0 size=6, result=0x00007ffeefbfd054) at node_native_module.cc:217\r\n frame #9: 0x000000010022ad0e node`node::native_module::NativeModuleLoader::CompileAsModule(this=0x0000000102951e38, context=(val_ = 0x0000000107012720), id=\"path\", result=0x00007ffeefbfd054) at node_native_module.cc:173\r\n frame #10: 0x00000001002373ae node`node::native_module::NativeModuleEnv::CompileFunction(args=0x00007ffeefbfd510) at node_native_module_env.cc:128\r\n frame #11: 0x000000010063765e node`v8::internal::FunctionCallbackArguments::Call(this=0x00007ffeefbfd590, handler=\u003cunavailable\u003e) at api-arguments-inl.h:157 [opt]\r\n frame #12: 0x00000001006358c4 node`v8::internal::MaybeHandle\u003cv8::internal::Object\u003e v8::internal::(anonymous namespace)::HandleApiCallHelper\u003cfalse\u003e(isolate=0x0000000106000000, function=\u003cunavailable\u003e, new_target=\u003cunavailable\u003e, fun_data=\u003cunavailable\u003e, receiver=\u003cunavailable\u003e, args=BuiltinArguments @ 0x00007ffeefbfd640) at builtins-api.cc:109 [opt]\r\n frame #13: 0x0000000100633105 node`v8::internal::Builtin_Impl_HandleApiCall(args=BuiltinArguments @ 0x00007ffeefbfd680, isolate=0x0000000106000000) at builtins-api.cc:139 [opt]\r\n frame #14: 0x0000000100632c79 node`v8::internal::Builtin_HandleApiCall(args_length=6, args_object=0x00007ffeefbfd7d8, isolate=0x0000000106000000) at builtins-api.cc:127 [opt]\r\n frame #15: 0x0000000101d82c09 node`Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit + 73\r\n frame #16: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #17: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #18: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #19: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #20: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #21: 0x0000000101abfa35 node`Builtins_InterpreterEntryTrampoline + 981\r\n frame #22: 0x0000000101ab577d node`Builtins_JSEntryTrampoline + 93\r\n frame #23: 0x0000000101ab54f8 node`Builtins_JSEntry + 120\r\n frame #24: 0x0000000100afa3fc node`v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const\u0026) [inlined] v8::internal::GeneratedCode\u003cunsigned long, unsigned long, unsigned long, unsigned long, unsigned long, long, unsigned long**\u003e::Call(args=\u003cunavailable\u003e, args=\u003cunavailable\u003e, args=\u003cunavailable\u003e, args=\u003cunavailable\u003e, args=\u003cunavailable\u003e, args=\u003cunavailable\u003e) at simulator.h:138 [opt]\r\n frame #25: 0x0000000100afa3f4 node`v8::internal::(anonymous namespace)::Invoke(isolate=0x0000000106000000, params=0x00007ffeefbfdea0)::InvokeParams const\u0026) at execution.cc:274 [opt]\r\n frame #26: 0x0000000100af9fb4 node`v8::internal::Execution::Call(isolate=0x0000000106000000, callable=\u003cunavailable\u003e, receiver=\u003cunavailable\u003e, argc=6, argv=0x0000000105109360) at execution.cc:366 [opt]\r\n frame #27: 0x000000010055a6cd node`v8::Function::Call(this=\u003cunavailable\u003e, context=\u003cunavailable\u003e, recv=\u003cunavailable\u003e, argc=6, argv=\u003cunavailable\u003e) at api.cc:4984 [opt]\r\n frame #28: 0x0000000100115096 node`node::ExecuteBootstrapper(env=0x0000000107016e00, id=\"internal/bootstrap/node\", parameters=0x00007ffeefbfe2e0 size=6, arguments=0x00007ffeefbfe2b8 size=6) at node.cc:204\r\n frame #29: 0x00000001001164b4 node`node::RunBootstrapping(env=0x0000000107016e00) at node.cc:332\r\n frame #30: 0x000000010020d64e node`node::NodeMainInstance::CreateMainEnvironment(this=0x00007ffeefbff1c0, exit_code=0x00007ffeefbfee74) at node_main_instance.cc:155\r\n frame #31: 0x000000010020c545 node`node::NodeMainInstance::Run(this=0x00007ffeefbff1c0) at node_main_instance.cc:47\r\n frame #32: 0x000000010011e2ed node`node::Start(argc=3, argv=0x0000000105108a50) at node.cc:863\r\n frame #33: 0x000000010169615e node`main(argc=3, argv=0x00007ffeefbff630) at node_main.cc:126\r\n frame #34: 0x00007fff7890c015 libdyld.dylib`start + 1\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\nIt does not crash if I build it with `code_cache_stub.cc`, or build it in release mode.\r\n\r\ncc @nodejs/v8 @nodejs/v8-inspector @psmarshall ","author":{"url":"https://github.com/joyeecheung","@type":"Person","name":"joyeecheung"},"datePublished":"2019-04-19T12:03:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/27307/node/issues/27307"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:62eccbfe-963a-cb48-b295-1bfab603f4c4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E302:23D8A:242EDD:35780B:6A4E0137 |
| html-safe-nonce | 9275ede545cb19c146a5bbe8bd874c4f5dfc2ac3d941b960d4ded5a476a1b5df |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMzAyOjIzRDhBOjI0MkVERDozNTc4MEI6NkE0RTAxMzciLCJ2aXNpdG9yX2lkIjoiNzc0MjQ5OTMxMjQ4MzgyODAyMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d380e3c1e5c2a97461a9b26092d403e50366e123ad330b2f6a62a60679cac19d |
| hovercard-subject-tag | issue:435154707 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/27307/issue_layout |
| twitter:image | https://opengraph.githubassets.com/02c1465668b58d2a4fad5636e3cfd4590efc3eff442cbd0c8081b464e7552a07/nodejs/node/issues/27307 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/02c1465668b58d2a4fad5636e3cfd4590efc3eff442cbd0c8081b464e7552a07/nodejs/node/issues/27307 |
| og:image:alt | This currently fails the debug build on master, the CPU profiler crashes when code cache is enabled (for some reason, this in v8::internal::ProfilerListener::InferScriptName turns into a nullptr in... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | joyeecheung |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width