Skip to content

Using the Node.js inspector can lead to a crash #103

@mmomtchev

Description

@mmomtchev

When using the Node.js inspector to step over the final iteration of a loop iterating over a Python iterable, when Python throws the final exception, V8 crashes.

Seems to happen only in async contexts.

The crash is caused by V8 unable to identify the correct handler to step over.

Python exception: <NULL> @ C:\Users\mmom\src\pymport\src\call.cc:265


#
# Fatal error in , line 0
# Check failed: CodeKind::INTERPRETED_FUNCTION == code->kind().
#
#
#
#FailureMessage Object: 000000E8F97FAF20
 1: 00007FF66A0A9E7F node_api_throw_syntax_error+175967
 2: 00007FF669FC036F v8::CTypeInfoBuilder<void>::Build+11999
 3: 00007FF66AE2D182 V8_Fatal+162
 4: 00007FF66A9F29E5 v8::internal::Debug::PrepareStepOnThrow+1253
 5: 00007FF66A9F1099 v8::internal::Debug::OnThrow+345
 6: 00007FF66A9A51D0 v8::internal::Isolate::ThrowInternal+544
 7: 00007FF66A9A4059 v8::internal::Isolate::ScheduleThrow+25
 8: 00007FF66AAD1CCB v8::Isolate::ThrowException+59
 9: 00007FF66A07DF17 napi_throw+119
10: 00007FFDC38E642C Napi::Error::ThrowAsJavaScriptException+188 [C:\Users\mmom\src\pymport\node_modules\node-addon-api\napi-inl.h]:L2408
11: 00007FFDC39C29C7 `Napi::details::WrapCallback<<lambda_484baa0b744a2c3b2bec5c95d3446a94> >'::`1'::catch$0+103 [C:\Users\mmom\src\pymport\node_modules\node-addon-api\napi-inl.h]:L65
12: 00007FFDC394D3F0 _CallSettingFrame_LookupContinuationIndex+32 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\amd64\handlers.asm]:L98
13: 00007FFDC394B51E __FrameHandler4::CxxCallCatchBlock+478 [D:\a\_work\1\s\src\vctools\crt\vcruntime\src\eh\frame.cpp]:L1439
14: 00007FFDF2E33CE6 RtlCaptureContext2+1190
15: 00007FFDC38F9B75 Napi::details::WrapCallback<<lambda_484baa0b744a2c3b2bec5c95d3446a94> >+53 [C:\Users\mmom\src\pymport\node_modules\node-addon-api\napi-inl.h]:L60
16: 00007FFDC38F86E0 Napi::InstanceWrap<pymport::PyObjectWrap>::InstanceMethodCallbackWrapper+64 [C:\Users\mmom\src\pymport\node_modules\node-addon-api\napi-inl.h]:L3463
17: 00007FF66A0760B0 cppgc::internal::BaseSpace::pages_mutex+32752
18: 00007FF66AAECAE2 v8::internal::SetupIsolateDelegate::SetupHeap+54946
19: 00007FF5EB0FB5C4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions