profile
viewpoint

addaleax/actual-crash 3

Node.js native addon that just crashes

addaleax/angular-events-calendar 2

Calendar in the style of GitHub contributions

addaleax/argon2-ffi 1

Node.js bindings for argon2, the winner of the Password Hashing Competition (PHC)

addaleax/builtin-modules 1

List of the Node.js builtin modules

addaleax/checkref 1

Check your HTML and Markdown for invalid local links & anchors

addaleax/0x 0

🔥 single-command flamegraph profiling 🔥

addaleax/7z-stream 0

7z-stream is a streaming 7z parser.

addaleax/admin 0

Facilitating joint collaboration amongst the TSC and CommComm

addaleax/angular-gettext 0

Gettext support for Angular.js

issue commentnodejs/diagnostics

reportVersion semantics are not defined

@jasnell I think in that case you could just use the Node.js version number. I don’t think such a format would be helpful, because we will most likely maintain backwards-compatibility up to additive changes in the future, and making it relative to the Node.js version number would make it look like there are breaking changes when there are none.

Honestly, I’d just go with semver at this point. In the worst case, it means that we’re exposing more information about the format than necessary, which seems okay to me.

addaleax

comment created time in 4 hours

pull request commentnodejs/node

test: increase timeout in vm-timeout-escape-queuemicrotask

Realistically, this bug is just never going to be fixed without major changes to V8 and worker.terminate() is a reasonable equivalent for most use cases. I’d be good with just deleting the test, tbh.

lundibundi

comment created time in 5 hours

pull request commentnodejs/node

src: use symbol to store `AsyncWrap` resource

Looks like un-setting the field during GC isn’t allow (which is reasonable, I guess). I’ll switch this over to using an internal field after https://github.com/nodejs/node/pull/31960 lands – that should work as well. The big downside there is that it will make merging with owner_symbol harder, not easier.

addaleax

comment created time in 7 hours

Pull request review commentnodejs/node

src: revamp internal field count tracking

 PromiseWrap* PromiseWrap::New(Environment* env,   obj->SetInternalField(PromiseWrap::kIsChainedPromiseField,                         parent_wrap != nullptr ? v8::True(env->isolate())                                                : v8::False(env->isolate()));+  PromiseWrap* wrap = new PromiseWrap(env, obj, silent);+  // Set a pointer to the PromiseWrap in the Promise object.+  // The pointer is retrieved using extractPromiseWrap   CHECK_NULL(promise->GetAlignedPointerFromInternalField(0));-  promise->SetInternalField(0, obj);-  return new PromiseWrap(env, obj, silent);+  promise->SetAlignedPointerInInternalField(0, wrap);

Okay, then I’d just leave the code as it was before – I think there’s no other way to deal with this rn…

jasnell

comment created time in 8 hours

issue commentnodejs/node

Disable __proto__

I’m personally a fan of b) because I don’t quite see the need to do something in core.

mcollina

comment created time in 8 hours

issue closednodejs/node

Investigate flaky test-http2-ping-settings-heapdump

  • Version: master, sharedlib_debug
  • Platform: linux-cotainerized
  • Subsystem: http2
09:12:46 not ok 1286 parallel/test-http2-ping-settings-heapdump
09:12:46   ---
09:12:46   duration_ms: 0.726
09:12:46   severity: crashed
09:12:46   exitcode: -4
09:12:46   stack: |-
09:12:46     
09:12:46     
09:12:46     #
09:12:46     # Fatal error in ../deps/v8/src/heap/heap-inl.h, line 245
09:12:46     # Debug check failed: AllowHeapAllocation::IsAllowed().
09:12:46     #
09:12:46     #
09:12:46     #
09:12:46     #FailureMessage Object: 0x7ffd458b8350
09:12:46      1: 0x55bb6f292c41 node::DumpBacktrace(_IO_FILE*) [out/Debug/node]
09:12:46      2: 0x55bb6f41aaeb  [out/Debug/node]
09:12:46      3: 0x55bb6f41ab0b  [out/Debug/node]
09:12:46      4: 0x55bb70d08666 V8_Fatal(char const*, int, char const*, ...) [out/Debug/node]
09:12:46      5: 0x55bb70d08695  [out/Debug/node]
09:12:46      6: 0x55bb6f89ef58 v8::internal::HeapObject v8::internal::Heap::AllocateRawWith<(v8::internal::Heap::AllocationRetryMode)1>(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [out/Debug/node]
09:12:46      7: 0x55bb6f8a57b3 v8::internal::Factory::NewMap(v8::internal::InstanceType, int, v8::internal::ElementsKind, int) [out/Debug/node]
09:12:46      8: 0x55bb6fbb5216 v8::internal::Map::RawCopy(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, int, int) [out/Debug/node]
09:12:46      9: 0x55bb6fbb5812 v8::internal::Map::CopyDropDescriptors(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>) [out/Debug/node]
09:12:46     10: 0x55bb6fbbacac v8::internal::Map::ShareDescriptor(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::DescriptorArray>, v8::internal::Descriptor*) [out/Debug/node]
09:12:46     11: 0x55bb6fbbb1b5 v8::internal::Map::CopyAddDescriptor(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Descriptor*, v8::internal::TransitionFlag) [out/Debug/node]
09:12:46     12: 0x55bb6fbbb38f v8::internal::Map::CopyWithField(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::FieldType>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::Representation, v8::internal::TransitionFlag) [out/Debug/node]
09:12:46     13: 0x55bb6fbbef81 v8::internal::Map::TransitionToDataProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::PropertyConstness, v8::internal::StoreOrigin) [out/Debug/node]
09:12:46     14: 0x55bb6fb9de02 v8::internal::LookupIterator::PrepareTransitionToDataProperty(v8::internal::Handle<v8::internal::JSReceiver>, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::internal::StoreOrigin) [out/Debug/node]
09:12:46     15: 0x55bb6fbf1bf3 v8::internal::Object::AddDataProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::PropertyAttributes, v8::Maybe<v8::internal::ShouldThrow>, v8::internal::StoreOrigin) [out/Debug/node]
09:12:46     16: 0x55bb6fbf29aa v8::internal::Object::SetProperty(v8::internal::LookupIterator*, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [out/Debug/node]
09:12:46     17: 0x55bb6fddea85 v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, v8::internal::StoreOrigin, v8::Maybe<v8::internal::ShouldThrow>) [out/Debug/node]
09:12:46     18: 0x55bb6f5d0a09 v8::Object::Set(v8::Local<v8::Context>, v8::Local<v8::Value>, v8::Local<v8::Value>) [out/Debug/node]
09:12:46     19: 0x55bb6f261a93 node::AsyncWrap::EmitDestroy() [out/Debug/node]
09:12:46     20: 0x55bb6f264534 node::AsyncWrap::~AsyncWrap() [out/Debug/node]
09:12:46     21: 0x55bb6f3c2aae node::http2::Http2Session::Http2Settings::~Http2Settings() [out/Debug/node]
09:12:46     22: 0x55bb6f3c2aca node::http2::Http2Session::Http2Settings::~Http2Settings() [out/Debug/node]
09:12:46     23: 0x55bb6f28bbe3 node::BaseObject::decrease_refcount() [out/Debug/node]
09:12:46     24: 0x55bb6f3ad8eb node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>::~BaseObjectPtrImpl() [out/Debug/node]
09:12:46     25: 0x55bb6f3bdf60 void std::_Destroy<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> >(node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*) [out/Debug/node]
09:12:46     26: 0x55bb6f3bc8f7 void std::_Destroy_aux<false>::__destroy<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>(node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*) [out/Debug/node]
09:12:46     27: 0x55bb6f3ba6b8 void std::_Destroy<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>(node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*) [out/Debug/node]
09:12:46     28: 0x55bb6f3b899e void std::_Destroy<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> >(node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> >&) [out/Debug/node]
09:12:46     29: 0x55bb6f3b511d std::deque<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> > >::_M_destroy_data_aux(std::_Deque_iterator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>&, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>, std::_Deque_iterator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>&, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>) [out/Debug/node]
09:12:46     30: 0x55bb6f3b05b6 std::deque<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> > >::_M_destroy_data(std::_Deque_iterator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>&, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>, std::_Deque_iterator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>&, node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>*>, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> > const&) [out/Debug/node]
09:12:46     31: 0x55bb6f3aca4a std::deque<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> > >::~deque() [out/Debug/node]
09:12:46     32: 0x55bb6f3ab66c std::queue<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, std::deque<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false>, std::allocator<node::BaseObjectPtrImpl<node::http2::Http2Session::Http2Settings, false> > > >::~queue() [out/Debug/node]
09:12:46     33: 0x55bb6f38564a node::http2::Http2Session::~Http2Session() [out/Debug/node]
09:12:46     34: 0x55bb6f3856f8 node::http2::Http2Session::~Http2Session() [out/Debug/node]
09:12:46     35: 0x55bb6f2708ee node::BaseObject::OnGCCollect() [out/Debug/node]
09:12:46     36: 0x55bb6f2707f4 node::BaseObject::MakeWeak()::{lambda(v8::WeakCallbackInfo<node::BaseObject> const&)#1}::operator()(v8::WeakCallbackInfo<node::BaseObject> const&) const [out/Debug/node]
09:12:46     37: 0x55bb6f270814 node::BaseObject::MakeWeak()::{lambda(v8::WeakCallbackInfo<node::BaseObject> const&)#1}::_FUN(v8::WeakCallbackInfo<node::BaseObject> const&) [out/Debug/node]
09:12:46     38: 0x55bb6f87e9f7 unsigned long v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks<v8::internal::GlobalHandles::Node>(std::vector<std::pair<v8::internal::GlobalHandles::Node*, v8::internal::GlobalHandles::PendingPhantomCallback>, std::allocator<std::pair<v8::internal::GlobalHandles::Node*, v8::internal::GlobalHandles::PendingPhantomCallback> > >*) [out/Debug/node]
09:12:46     39: 0x55bb6f87f3b2 v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks() [out/Debug/node]
09:12:46     40: 0x55bb6f8f8ff8 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [out/Debug/node]
09:12:46     41: 0x55bb6f8f9d58 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [out/Debug/node]
09:12:46     42: 0x55bb6f8fd552 v8::internal::Heap::PreciseCollectAllGarbage(int, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [out/Debug/node]
09:12:46     43: 0x55bb6fcf315d v8::internal::HeapSnapshotGenerator::GenerateSnapshot() [out/Debug/node]
09:12:46     44: 0x55bb6fcdfe11 v8::internal::HeapProfiler::TakeSnapshot(v8::ActivityControl*, v8::HeapProfiler::ObjectNameResolver*) [out/Debug/node]
09:12:46     45: 0x55bb6f2cef9c node::heap::CreateHeapSnapshotStream(v8::FunctionCallbackInfo<v8::Value> const&) [out/Debug/node]
09:12:46     46: 0x55bb6f67178e v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [out/Debug/node]
09:12:46     47: 0x55bb6f674119  [out/Debug/node]
09:12:46     48: 0x55bb6f6754ff  [out/Debug/node]
09:12:46     49: 0x55bb6f676033 v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [out/Debug/node]
09:12:46     50: 0x55bb703e0420  [out/Debug/node]

ref: https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu1804_sharedlibs_debug_x64/18285/console

closed time in 9 hours

gireeshpunathil

issue commentnodejs/node

Investigate flaky test-http2-ping-settings-heapdump

Not a flaky test, this is a genuine failure from #31745

gireeshpunathil

comment created time in 9 hours

Pull request review commentnodejs/node

src: revamp internal field count tracking

 PromiseWrap* PromiseWrap::New(Environment* env,   obj->SetInternalField(PromiseWrap::kIsChainedPromiseField,                         parent_wrap != nullptr ? v8::True(env->isolate())                                                : v8::False(env->isolate()));+  PromiseWrap* wrap = new PromiseWrap(env, obj, silent);+  // Set a pointer to the PromiseWrap in the Promise object.+  // The pointer is retrieved using extractPromiseWrap   CHECK_NULL(promise->GetAlignedPointerFromInternalField(0));-  promise->SetInternalField(0, obj);-  return new PromiseWrap(env, obj, silent);+  promise->SetAlignedPointerInInternalField(0, wrap);
  promise->SetAlignedPointerInInternalField(0, wrap);

This has different behaviour – it breaks the connection from the Promise to the PromiseWrap JS object as visible by GC. Please keep this code as-is.

If you do want to make changes to address Ben’s concerns, then change the ::IsObject() check below to a separate call to GetAlignedPointerFromInternalField() and compare that against nullptr. I don’t think either variant is 100 % supported, but V8 isn’t going to change its internal object representation overnight (or ever, probably).

jasnell

comment created time in 9 hours

Pull request review commentnodejs/node

src,lib: don't run bootstrapper in CreateEnvironment

 class EnvironmentTest : public EnvironmentTestFixture {   } }; -TEST_F(EnvironmentTest, PreExeuctionPreparation) {-  const v8::HandleScope handle_scope(isolate_);-  const Argv argv;-  Env env {handle_scope, argv};--  v8::Local<v8::Context> context = isolate_->GetCurrentContext();--  const char* run_script = "process.argv0";

Yeah, I’ll be rebasing #30467 against this when this lands – it should be easy enough to keep the test working then.

codebytere

comment created time in 10 hours

Pull request review commentnodejs/node

src: revamp internal field count tracking

 PromiseWrap* PromiseWrap::New(Environment* env,   obj->SetInternalField(PromiseWrap::kIsChainedPromiseField,                         parent_wrap != nullptr ? v8::True(env->isolate())                                                : v8::False(env->isolate()));-  CHECK_NULL(promise->GetAlignedPointerFromInternalField(0));-  promise->SetInternalField(0, obj);+  CHECK_NULL(promise->GetAlignedPointerFromInternalField(BaseObject::kSlot));+  promise->SetInternalField(BaseObject::kSlot, obj);   return new PromiseWrap(env, obj, silent); }  void PromiseWrap::getIsChainedPromise(Local<String> property,                                       const PropertyCallbackInfo<Value>& info) {   info.GetReturnValue().Set(-    info.Holder()->GetInternalField(kIsChainedPromiseField));+      info.Holder()->GetInternalField(PromiseWrap::kIsChainedPromiseField)); }  static PromiseWrap* extractPromiseWrap(Local<Promise> promise) {-  Local<Value> resource_object_value = promise->GetInternalField(0);-  if (resource_object_value->IsObject()) {+  Local<Value> resource_object_value =+      promise->GetInternalField(BaseObject::kSlot);+  if (resource_object_value->IsObject())

@jasnell Sorry I didn’t notice this earlier, but: This is setting internals fields on the Promise itself, not on a BaseObject subclass. It doesn’t make sense to use BaseObject::kSlot here and above.

As for Ben’s question, that’s also answered above where the internal field is set in the Promise – it’s a nullptr, because that’s how V8 initializes the field by default.

jasnell

comment created time in 10 hours

Pull request review commentnodejs/node

src: revamp internal field count tracking

 void LibuvStreamWrap::Initialize(Local<Object> target,   Local<FunctionTemplate> sw =       FunctionTemplate::New(env->isolate(), is_construct_call_callback);   sw->InstanceTemplate()->SetInternalFieldCount(-      StreamReq::kStreamReqField + 1 + 3);+      StreamReq::kInternalFieldCount + 3);

I think @mcollina was thinking that the JS fields set below on the instance template were counted as internal fields when he added them. They don’t, and it’s safe (and correct) to remove the + 3.

jasnell

comment created time in 10 hours

Pull request review commentnodejs/node

src: handle bad callback in asyc_wrap

 const sampleBuffer = fixtures.readSync('/pss-vectors.json');       }     });   }, {-    code: 'ERR_ZLIB_INITIALIZATION_FAILED',-    name: 'Error',-    message: 'Initialization failed'+    code: 'ERR_INVALID_CALLBACK',+    name: 'TypeError',+    message: 'Invalid Async Callback Function type'

@HarshithaKP I’m referring to the former, yes

HarshithaKP

comment created time in 10 hours

push eventaddaleax/node

Jason Macgowan

commit sha ff48009fefcecedfee2c6ff1719e5be3f6969049

tls: allow empty subject even with altNames defined Behavior described in https://github.com/nodejs/node/issues/11771 is still true even though the issue is closed. This PR is to allow DNS and URI names, even when there is not a subject. Refs: https://github.com/nodejs/node/issues/11771 PR-URL: https://github.com/nodejs/node/pull/22906 Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha fad952adbd8a2508d62c6df7ab20376d3898e228

src: use uv_async_t for WeakRefs Schedule a task on the main event loop, similar to what the HTML spec recommends for browsers. Alternative to https://github.com/nodejs/node/pull/30198 PR-URL: https://github.com/nodejs/node/pull/30616 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

view details

Rich Trott

commit sha f52fb0ac8fc0369aff7635bcb37aadc57d98a645

test: remove unused function argument from http test Remove unused `res` from test-http-server-consumed-timeout. PR-URL: https://github.com/nodejs/node/pull/30677 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Rich Trott

commit sha 527ee38757d90edac68971d851d6dfc5969c1410

test: do not skip test-http-server-consumed-timeout test-http-server-consumed-timeout has code to that causes it to be skipped on busy machines. Instead, use an exponential backoff for the timeout if the machine is busy. PR-URL: https://github.com/nodejs/node/pull/30677 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Rich Trott

commit sha 721076b0b9365f5f9e7c6882d28af912de7657a9

test: remove unnecessary common.platformTimeout() call Applying platformTimeout() to the interval is counterproductive. It should be applied to the request timeout duration only. PR-URL: https://github.com/nodejs/node/pull/30677 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Rich Trott

commit sha 99d1f6fea49e92bc3b3993d1f74ca9a8772c5d02

test: move test-https-server-consumed-timeout to parallel Change the test to be robust in slow environments and move to parallel. The previous version of the test failed for me in parallel with just two or four simultaneous versions running. This version passes 96 simultaneous versions running, but still fails as designed if the request writes fail to prevent the request timeout from occurring. PR-URL: https://github.com/nodejs/node/pull/30677 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha 29b5432c645ef250030dde5a4f042ae69fcbbe89

deps: V8: cherry-pick ca5b0ec Original commit message: [heap] Ensure SyntheticModule is initialized before next allocation Ensure that all fields of `SyntheticModule` are set before creating the exports hash table for it, because the latter may trigger garbage collection, leading to crashes. This has been causing failures in the Node.js CI over the last weeks, after making the creating of synthetic modules part of Node’s startup sequence. (I am generally not very familiar with this part of the V8 code and there might be a better way, or possibly a way to add a reliable regression test, that I am not aware of.) Refs: https://github.com/nodejs/node/issues/30498 Refs: https://github.com/nodejs/node/issues/30648 Change-Id: I32da4b7bd888c6ec1421f34f5bd52e7bad154c1e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1939752 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#65247} Refs: https://github.com/v8/v8/commit/ \ ca5b0ec2722d2af4551c01ca78921fa16a26ae72 Fixes: https://github.com/nodejs/node/issues/30498 Fixes: https://github.com/nodejs/node/issues/30648 PR-URL: https://github.com/nodejs/node/pull/30708 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Anna Henningsen

commit sha 58850f6bb4f57d6970d04b23bd2c75a37937564d

test: revert 6d022c13 Revert "test: skip test-domain-error-types in debug mode temporariliy" This reverts commit 6d022c13c52fc0134ed6c79be520be8c84c58cf8. PR-URL: https://github.com/nodejs/node/pull/30708 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>

view details

Michaël Zasso

commit sha b7b39e0b77d4ad16583ecd56ef5c35b081c9cde4

deps: V8: backport 93f189f19a03 Original commit message: [ic] Fix non-GlobalIC store to interceptor on the global object We possibly need to load the global object from the global proxy as the holder of the named interceptor. Change-Id: I0f9f2e448630608ae853588f6751b55574a9efd9 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1930903 Commit-Queue: Igor Sheludko <ishell@chromium.org> Reviewed-by: Igor Sheludko <ishell@chromium.org> Cr-Commit-Position: refs/heads/master@{#65119} Refs: https://github.com/v8/v8/commit/93f189f19a030d5de6c5173711dca120ad76e5cd Fixes: https://github.com/nodejs/node/issues/30586 PR-URL: https://github.com/nodejs/node/pull/30681 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Fedor Indutny

commit sha a7d031bf5ac9825e5cd645a0a91c4583b7c6f6cd

deps: update llhttp to 2.0.1 Changelog: * Optional SSE4.2 support (at compile time) * Lenient mode of operation PR-URL: https://github.com/nodejs/node/pull/30553 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>

view details

Anna Henningsen

commit sha 487177954201ee098ecbf5027473b238187cee22

http: set socket.server unconditionally This is useful for situations in which the socket was not created for HTTP, e.g. when using arbitrary `Duplex` streams. (The added test fails because previously, `socket.server.emit()` would not work for emitting the `clientError` event, as `socket.server` was `undefined`.) PR-URL: https://github.com/nodejs/node/pull/30571 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

cjihrig

commit sha 84a25eb7949a8ea887ddf8e23aa30f23a72fc5b1

child_process: document kill() return value This commit documents the return value from subprocess.kill(). PR-URL: https://github.com/nodejs/node/pull/30669 Refs: https://github.com/nodejs/node/issues/30668 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>

view details

Anna Henningsen

commit sha ef0b65f9b03ce29db2d9b8b5a5e5deb6d731d784

tls: add memory tracking support to SSLWrap PR-URL: https://github.com/nodejs/node/pull/30548 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Anna Henningsen

commit sha c5a31992b358aa90cffd7b2de8faba28dc2c31ae

src: use BaseObjectPtr to store SNI context Rather than relying on a link to the JS object, store a pointer to the C++ object directly. PR-URL: https://github.com/nodejs/node/pull/30548 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Anna Henningsen

commit sha f0181d9980a0268eb0183bdee28abcc79b2d740c

src: inline SetSNICallback Refs: https://github.com/nodejs/node/pull/30548#discussion_r348168855 PR-URL: https://github.com/nodejs/node/pull/30548 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>

view details

Ruben Bridgewater

commit sha be3091136161d8c3793dfe53f6e82f96e2b6a177

util: fix .format() not always calling toString when it should be This makes sure that `util.format('%s', object)` will always call a user defined `toString` function. It was formerly not the case when the object had the function declared on the super class. At the same time this also makes sure that getters won't be triggered accessing the `constructor` property. PR-URL: https://github.com/nodejs/node/pull/30343 Fixes: https://github.com/nodejs/node/issues/30333 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

view details

Tobias Nießen

commit sha f6a4a36f09934c7b02c55e90436ffce71eca4a50

crypto: automatically manage memory for ECDSA_SIG Refs: https://github.com/nodejs/node/pull/29292 PR-URL: https://github.com/nodejs/node/pull/30641 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Tobias Nießen

commit sha 08a40e20087ad0ba9ad5ee03a2c07a336b3cc5de

build: use Node.js instead of Node in configure PR-URL: https://github.com/nodejs/node/pull/30642 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>

view details

Myles Borins

commit sha ea2668d2db76beda812631d73fbcd164aee5fe02

deps: patch V8 to 7.9.317.25 Refs: https://github.com/v8/v8/compare/7.9.317.23...7.9.317.25 PR-URL: https://github.com/nodejs/node/pull/30679 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

view details

Rich Trott

commit sha 1b110396e7d4e4495cafe53c03022083bc1f4d83

doc: revise socket.connect() note Edit note in about `onread` option to `socket.connect()` for clarity. PR-URL: https://github.com/nodejs/node/pull/30691 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 20 hours

issue commentnodejs/node

Performance regression when enumerating objects after many deletes/inserts

Sounds like https://github.com/nodejs/node/pull/31957 is the PR that fixes this.

ghermeto

comment created time in 21 hours

Pull request review commentnodejs/node

tls: Reduce memory copying and number of BIO buffer allocations

 const tls = require('tls'); const fixtures = require('../common/fixtures'); let cconn = null; let sconn = null;+let read_len = 0;+const buffer_size = 1024 * 1024;  function test() {   if (cconn && sconn) {     cconn.resume();     sconn.resume();-    sconn.end(Buffer.alloc(1024 * 1024));-    cconn.end();+    sconn.end(Buffer.alloc(buffer_size));   } }  const server = tls.createServer({   key: fixtures.readKey('agent1-key.pem'),   cert: fixtures.readKey('agent1-cert.pem') }, function(c) {-  c.on('close', function() {+  c.once('close', function() {

This only fires once, right? In that case I have a mild preference for using .on() and testing that the callback is only called once, i.e.

  c.on('close', common.mustCall(() => server.close()));
rustyconover

comment created time in a day

Pull request review commentnodejs/node

test: fix typo preventing test from running

 sure no unexpected rejections occur, because currently they result in silent failures. However, it is useful in some rare cases to disable it, for example if the `unhandledRejection` hook is directly used by the test. +### `enoughTestCpu`++* [&lt;boolean>][]++Indicates if there is more than 1 CPU and that the first CPU has a speed of at
Indicates if there is more than 1 CPU or that the single CPU has a speed of at

If I read the code correctly?

Trott

comment created time in a day

Pull request review commentnodejs/quic

quic: configurable max early data

 void InitializeTLS(const QuicSession& session) {  void InitializeSecureContext(     crypto::SecureContext* sc,+    bool early_data,     ngtcp2_crypto_side side) {-  constexpr auto ssl_server_opts =-      (SSL_OP_ALL & ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS) |-      SSL_OP_SINGLE_ECDH_USE |-      SSL_OP_CIPHER_SERVER_PREFERENCE |-      SSL_OP_NO_ANTI_REPLAY;+  // TODO(@jasnell): Should this be a static value?+  constexpr static unsigned char session_id_ctx[] = "node.js quic server";

My reading of the SSL_CTX_set_session_id_context is that this should be fine, but feel free to wait for confirmation from more people more familiar with crypto/tls :)

jasnell

comment created time in a day

Pull request review commentnodejs/quic

quic: configurable max early data

 void SetConfig(Environment* env, int idx, uint64_t* val) { // the NODE_DEBUG_NATIVE=NGTCP2_DEBUG category. void Ngtcp2DebugLog(void* user_data, const char* fmt, ...) {   QuicSession* session = static_cast<QuicSession*>(user_data);+  if (!UNLIKELY(session->env()->debug_enabled(DebugCategory::NGTCP2_DEBUG)))+    return;   va_list ap;   va_start(ap, fmt);   std::string format(fmt, strlen(fmt) + 1);   format[strlen(fmt)] = '\n';-  Debug(session->env(), DebugCategory::NGTCP2_DEBUG, format, ap);+  // TODO(@jasnell): Debug() currently is not working with va_list here.+  vfprintf(stderr, format.c_str(), ap);

I think using vprintf is just fine – this callback is only every called if debugging is enabled anyway, right?

jasnell

comment created time in a day

Pull request review commentnodejs/quic

quic: configurable max early data

 v8::Local<v8::Value> GetALPNProtocol(const QuicSession& session); ngtcp2_crypto_level from_ossl_level(OSSL_ENCRYPTION_LEVEL ossl_level); const char* crypto_level_name(ngtcp2_crypto_level level); +// SessionTicketAppData is a utility class that is used only during+// the generation or access of TLS stateless sesson tickets. It+// exists solely to provide a easier way for QuicApplication instances+// to set relevant metadata in the session ticket when it is created,+// and the exract and subsequently verify that data when a ticket is+// received and is being validated. The app data is completely opaque+// to anything other than the server-side of the QuicApplication that+// sets it.+class SessionTicketAppData {+ public:+  enum class Status {+    TICKET_USE,+    TICKET_USE_RENEW,+    TICKET_IGNORE,+    TICKET_IGNORE_RENEW+  };++  enum class Flag {+    STATUS_NONE,+    STATUS_RENEW+  };++  explicit SessionTicketAppData(SSL_SESSION* session) : session_(session) {}+  bool Set(const uint8_t* data, size_t len) const;+  bool Get(uint8_t** data, size_t* len) const;++ private:+  mutable bool set_ = false;

This should not be mutable (and Set() should not be const), I think? Calling Set() does change the internal state of this object in a visible way.

jasnell

comment created time in a day

Pull request review commentnodejs/quic

quic: configurable max early data

 added: REPLACEME  A `BigInt` representing the length of time the `QuicSession` was active. +#### quicsession.earlyData

Can we name this (and the option) something like hasEarlyData, allowsEarlyData, or similar, so that it sounds more boolean-y?

jasnell

comment created time in a day

pull request commentnodejs/node

build: remove empty line on node.gyp file

@bridgear Since this has happened a few times now … please start CI if you’re adding the author-ready label, otherwise it’s not author-ready.

juanarbol

comment created time in a day

Pull request review commentnodejs/node

src: handle bad callback in asyc_wrap

 const sampleBuffer = fixtures.readSync('/pss-vectors.json');       }     });   }, {-    code: 'ERR_ZLIB_INITIALIZATION_FAILED',-    name: 'Error',-    message: 'Initialization failed'+    code: 'ERR_INVALID_CALLBACK',+    name: 'TypeError',+    message: 'Invalid Async Callback Function type'

If this is changing the error that’s being emitted then this is introducing a bug. It might be better to return undefined instead of throwing an exception, then – that also keeps the MaybeLocal<> contract fulfilled.

HarshithaKP

comment created time in a day

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 class Environment : public MemoryRetainer {   bool http_parser_buffer_in_use_ = false;   std::unique_ptr<http2::Http2State> http2_state_; -  bool debug_enabled_[static_cast<int>(DebugCategory::CATEGORY_COUNT)] = {-      false};-+  std::unique_ptr<EnabledDebugList> enabled_debug_list_;

Fwiw, what I had in mind is to use the trivial copy constructor to re-initialize it later, e.g. enabled_debug_list_ = EnabledDebugList(...);, but I guess ::Parse() works just as well :)

joyeecheung

comment created time in a day

issue commentnodejs/help

fs.chmodSync deletes my file contents

@ORESoftware It’s hard to tell what’s going on without having more information, but: fs.constants.O_RDONLY is not a file mode. You want to pass 0o444 instead. Using fs.constants.O_RDONLY won’t make your file disappear, but depending on your operating system it might make the file inaccessible to you (e.g. by removing read permissions along with write and execute permissions).

ORESoftware

comment created time in a day

issue commentnodejs/node

How much is my memory?

@gireeshpunathil Node.js could provide allocation wrappers to libuv, but V8 (which most likely performs more native-heap allocations than libuv in a typical Node.js scenario) and Node.js itself use operator new a lot to allocate memory. I think that currently means that heap snapshots are the only way to track memory usage in a very detailed way.

gireeshpunathil

comment created time in a day

issue closedpuleos/object-hash

The md5 encrypt result looks not good

The result is different from https://blueimp.github.io/JavaScript-MD5/

closed time in a day

Ding-Fan

issue commentpuleos/object-hash

The md5 encrypt result looks not good

Documentation PRs are welcome, but otherwise it doesn’t seem like there’s anything to do here. It’s not reasonable to expect a library for hashing generic JS values to be consistent with hashing plain strings.

Ding-Fan

comment created time in a day

Pull request review commentnodejs/node

src: revamp internal field count tracking

 void AsyncWrap::EmitAfter(Environment* env, double async_id) {  class PromiseWrap : public AsyncWrap {  public:+  enum InternalFields {+    kIsChainedPromiseField = AsyncWrap::InternalFields::kCount,

I think the fact that you can then drop the extra enums for subclasses is a good reason to not include it :)

If you do want an enum that’s always accessed through its explicit name, then enum class might be better anyway (but I don’t think that’s necessary here, the classes should provide enough namespacing)

jasnell

comment created time in a day

Pull request review commentnodejs/node

src: revamp internal field count tracking

 using node_ares_task_list =  class ChannelWrap : public AsyncWrap {  public:+  enum InternalFields { kCount = AsyncWrap::InternalFields::kCount };

I don’t think you need these definitions for subclasses if you drop ::InternalFields

jasnell

comment created time in a day

Pull request review commentnodejs/node

src: revamp internal field count tracking

 BaseObject::BaseObject(Environment* env, v8::Local<v8::Object> object)     : persistent_handle_(env->isolate(), object), env_(env) {   CHECK_EQ(false, object.IsEmpty());   CHECK_GT(object->InternalFieldCount(), 0);-  object->SetAlignedPointerInInternalField(0, static_cast<void*>(this));+  object->SetAlignedPointerInInternalField(+    BaseObject::InternalFields::kSlot,+    static_cast<void*>(this));

tiny style nit: 4 spaces indentation

jasnell

comment created time in a day

Pull request review commentnodejs/node

src: revamp internal field count tracking

 void AsyncWrap::EmitAfter(Environment* env, double async_id) {  class PromiseWrap : public AsyncWrap {  public:+  enum InternalFields {+    kIsChainedPromiseField = AsyncWrap::InternalFields::kCount,

You can skip the ::InternalFields everywhere, right?

(I’d also rename kCountkInternalFieldCount)

jasnell

comment created time in a day

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::Initialize(Local<Object> target,   Environment* env = Environment::GetCurrent(context);    Local<FunctionTemplate> t = env->NewFunctionTemplate(New);-  t->InstanceTemplate()->SetInternalFieldCount(1);+  t->InstanceTemplate()->SetInternalFieldCount(kUDPWrapBaseField + 1);

I mean, we already have this problem with StreamBase/StreamReq. I’m personally good with a separate PR.

jasnell

comment created time in a day

Pull request review commentnodejs/node

doc: update zlib doc

  > Stability: 2 - Stable -The `zlib` module provides compression functionality implemented using Gzip and-Deflate/Inflate, as well as Brotli. It can be accessed using:+The `zlib` module provides compression functionality implemented using Gzip,+Deflate/Inflate, and Brotli.++To access it:  ```js const zlib = require('zlib'); ``` +Compression and decompression are built around the Node.js [Streams API][].+ Compressing or decompressing a stream (such as a file) can be accomplished by-piping the source stream data through a `zlib` stream into a destination stream:+piping the source stream through a `zlib` `Transform` stream into a destination+stream:  ```js-const gzip = zlib.createGzip();-const fs = require('fs');-const inp = fs.createReadStream('input.txt');-const out = fs.createWriteStream('input.txt.gz');--inp.pipe(gzip)-  .on('error', () => {-    // handle error-  })-  .pipe(out)-  .on('error', () => {-    // handle error+const { createGzip } = require('zlib');+const { pipeline } = require('stream');+const {+  createReadStream,+  createWriteStream+} = require('fs');++const gzip = createGzip();+const source = createReadStream('input.txt');+const destination = createWriteStream('input.txt.gz');++pipeline(source, gzip, destination, (err) => {+  if (err) {+    console.error('An error occurred:', err);+    process.exitCode = 1;+  }+});++// Or, Promisified++const { promisify } = require('util');+const pipe = promisify(pipeline);++async function do_gzip(input, output) {+  const gzip = createGzip();+  const source = createReadStream(input);+  const destination = createWriteStream(output);+  await pipe(source, gzip, destination);+}++do_gzip('input.txt', 'input.txt.gz')+  .catch((err) => {+    console.error('An error occurred:', err);+    process.exitCode = 1;   }); ```  It is also possible to compress or decompress data in a single step:  ```js+const { deflate, unzip } = require('zlib');+ const input = '.................................';-zlib.deflate(input, (err, buffer) => {-  if (!err) {-    console.log(buffer.toString('base64'));-  } else {-    // handle error+deflate(input, (err, buffer) => {+  if (err) {+    console.error('An error occurred:', err);+    process.exitCode = 1;   }+  console.log(buffer.toString('base64')); });  const buffer = Buffer.from('eJzT0yMAAGTvBe8=', 'base64');-zlib.unzip(buffer, (err, buffer) => {-  if (!err) {-    console.log(buffer.toString());-  } else {-    // handle error+unzip(buffer, (err, buffer) => {+  if (err) {+    console.error('An error occurred:', err);+    process.exitCode = 1;   }+  console.log(buffer.toString()); });++// Or, Promisified++const { promisify } = require('util');+const do_unzip = promisify(unzip);++do_unzip(buffer)+  .then((buf) => console.log(buf.toString()))+  .catch((err) => {+    console.error('An error occurred:', err);+    process.exitCode = 1;+  });+```++## Threadpool Usage and Performance Considerations++All `zlib` APIs, except those that are explicitly synchronous, use the Node.js+internal threadpool. This can lead to surprising effects and performance+limitations in some applications.++Creating and using a large number of zlib objects simultaneously can cause+significant and unrecoverable memory fragmentation errors that can

There are no errors involved here, and the memory fragmentation isn’t generally unrecoverable either – I’d just say “significant memory fragmentation“ and leave it at that, tbh. (Although that phrasing is already used below, too…)

jasnell

comment created time in 2 days

pull request commentnodejs/node

dgram: make UDPWrap more reusable

@jasnell Feel free to address Ben’s comments (or if you want, I can do that later this evening)

jasnell

comment created time in 2 days

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::DoSend(const FunctionCallbackInfo<Value>& args, int family) {     CHECK(args[3]->IsBoolean());   } -  Local<Object> req_wrap_obj = args[0].As<Object>();   Local<Array> chunks = args[1].As<Array>();   // it is faster to fetch the length of the   // array in js-land   size_t count = args[2].As<Uint32>()->Value();-  const bool have_callback = sendto ? args[5]->IsTrue() : args[3]->IsTrue(); -  size_t msg_size = 0;+  wrap->current_send_req_wrap_ = args[0].As<Object>();+  wrap->current_send_has_callback_ =+      sendto ? args[5]->IsTrue() : args[3]->IsTrue();

I think that should work, yes.

jasnell

comment created time in 2 days

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 void UDPWrap::Initialize(Local<Object> target,   Environment* env = Environment::GetCurrent(context);    Local<FunctionTemplate> t = env->NewFunctionTemplate(New);-  t->InstanceTemplate()->SetInternalFieldCount(1);+  t->InstanceTemplate()->SetInternalFieldCount(kUDPWrapBaseField + 1);

This is error prone. Things will break badly when someone changes kUDPWrapBaseField from 1 to 0.

Which is why I guess nobody would make that change? ;)

Your suggestion sounds fine but I wouldn’t consider it necessary for this PR…

jasnell

comment created time in 2 days

Pull request review commentnodejs/node

dgram: make UDPWrap more reusable

 Socket.prototype.bind = function(port_, address_ /* , callback */) {     this.on('listening', onListening);   } -  if (port instanceof UDP) {+  if (port !== null &&+      typeof port === 'object' &&+      typeof port.recvStart === 'function') {

I’m not sure how that check would look like (in a way that still works)?

If you do want something more foolproof, I guess we could add an extra method in UDPWrapBase::AddMethods() that would be used specifically for brand checks.

jasnell

comment created time in 2 days

issue commentnodejs/help

"Cannot find module 'worker_threads'" using sudo

Comparing the output of

  1. sudo node --version and node --version and
  2. sudo which node and which node

is very likely helpful here, as the most probable cause is that a different Node.js binary is being executed when run under sudo.

SuperstrongBE

comment created time in 3 days

Pull request review commentnodejs/node

crypto: simplify exportKeyingMaterial

 void SSLWrap<Base>::ExportKeyingMaterial(    AllocatedBuffer out = env->AllocateManaged(olen); -  ByteSource key;--  int useContext = 0;-  if (!args[2]->IsNull() && Buffer::HasInstance(args[2])) {-    key = ByteSource::FromBuffer(args[2]);--    useContext = 1;-  }+  ByteSource context;+  bool use_context = !args[2]->IsUndefined();+  if (use_context)+    context = ByteSource::FromBuffer(args[2]);    if (SSL_export_keying_material(w->ssl_.get(),                                  reinterpret_cast<unsigned char*>(out.data()),                                  olen,                                  *label,                                  label.length(),                                  reinterpret_cast<const unsigned char*>(-                                   key.get()),-                                 key.size(),-                                 useContext) != 1) {+                                   context.get()),
                                     context.get()),

(I usually wouldn’t comment for something as trivial as this, but it seems to fit in with the general idea behind the PR :))

tniessen

comment created time in 3 days

issue commentnodejs/node

fs.writeFile doesn't work with non-seekable files

@mildsunrise Yeah, that’s … not great. I’m not sure what to do about that, besides what you suggested above – first only fix this for paths, then make behaviour consistent in a semver-major change.

mildsunrise

comment created time in 3 days

issue commentnodejs/node

fs.writeFile doesn't work with non-seekable files

:+1:

I think fixing this might be as straightforward as switching the position parameter from 0 to null in the writeFile() function.

The only thing that I could see being tricky about this is that this changes behaviour when an fd is being passed where the write position had already been advanced before. Maybe it would be best to only perform this change for freshly opened files, i.e. when a path is being passed?

mildsunrise

comment created time in 3 days

pull request commentnodejs/node

async_hooks: executionAsyncResource matches in hooks

@flarna Not sure why the job is named that way but it’s basically running each test inside a Worker thread, i.e. python tools/test.py --worker path/to/test

Flarna

comment created time in 3 days

issue closednodejs/node

malloc(): smallbin double linked list corrupted: 0x03a86768

This CI run from this PR seems to hit some native land bug/corruption on ARM. Might be js land misuse but I think in such a case that should maybe cause an exception and not a corruption?

*** Error in `out/Release/node': malloc(): smallbin double linked list corrupted: 0x03a86768 ***

See the test.addons/openssl-binding/test test:

  • https://ci.nodejs.org/job/node-test-binary-arm-12+/4486/RUN_SUBSET=addons,label=pi3-docker/testReport/junit/(root)/test/addons_openssl_binding_test_/
  • https://ci.nodejs.org/job/node-test-binary-arm-12+/4486/RUN_SUBSET=addons,label=pi2-docker/testReport/junit/(root)/test/addons_openssl_binding_test_/

closed time in 4 days

ronag

issue commentnodejs/node

malloc(): smallbin double linked list corrupted: 0x03a86768

Duplicate of #30786

ronag

comment created time in 4 days

Pull request review commentnodejs/node

src: Handle NULL env scenario

 void OnFatalError(const char* location, const char* message);  // Errors with predefined static messages -#define PREDEFINED_ERROR_MESSAGES(V)                                         \-  V(ERR_BUFFER_CONTEXT_NOT_AVAILABLE,                                        \-    "Buffer is not available for the current Context")                       \-  V(ERR_CONSTRUCT_CALL_INVALID, "Constructor cannot be called")              \-  V(ERR_CONSTRUCT_CALL_REQUIRED, "Cannot call constructor without `new`")    \-  V(ERR_CRYPTO_UNKNOWN_CIPHER, "Unknown cipher")                             \-  V(ERR_CRYPTO_UNKNOWN_DH_GROUP, "Unknown DH group")                         \-  V(ERR_INVALID_TRANSFER_OBJECT, "Found invalid object in transferList")     \-  V(ERR_MEMORY_ALLOCATION_FAILED, "Failed to allocate memory")               \-  V(ERR_OSSL_EVP_INVALID_DIGEST, "Invalid digest used")                      \-  V(ERR_MISSING_MESSAGE_PORT_IN_TRANSFER_LIST,                               \-    "MessagePort was found in message but not listed in transferList")       \-  V(ERR_MISSING_PLATFORM_FOR_WORKER,                                         \-    "The V8 platform used by this instance of Node does not support "        \-    "creating Workers")                                                      \-  V(ERR_NON_CONTEXT_AWARE_DISABLED,                                          \-    "Loading non context-aware native modules has been disabled")            \-  V(ERR_SCRIPT_EXECUTION_INTERRUPTED,                                        \-    "Script execution was interrupted by `SIGINT`")                          \-  V(ERR_TRANSFERRING_EXTERNALIZED_SHAREDARRAYBUFFER,                         \-    "Cannot serialize externalized SharedArrayBuffer")                       \-  V(ERR_TLS_PSK_SET_IDENTIY_HINT_FAILED, "Failed to set PSK identity hint")  \+#define PREDEFINED_ERROR_MESSAGES(V)                                           \+  V(ERR_BUFFER_CONTEXT_NOT_AVAILABLE,                                          \+    "Buffer is not available for the current Context")                         \+  V(ERR_CONSTRUCT_CALL_INVALID, "Constructor cannot be called")                \+  V(ERR_CONSTRUCT_CALL_REQUIRED, "Cannot call constructor without `new`")      \+  V(ERR_CRYPTO_UNKNOWN_CIPHER, "Unknown cipher")                               \+  V(ERR_CRYPTO_UNKNOWN_DH_GROUP, "Unknown DH group")                           \+  V(ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE,                                   \+    "Fatal error: Could not obtain the environment")                           \

I think this should read closer to something along the lines of “Context not associated with Node.js environment”. This is missing documentation in doc/api/errors.md, too.

HarshithaKP

comment created time in 4 days

Pull request review commentnodejs/node

src: Handle NULL env scenario

 MaybeLocal<Module> ModuleWrap::ResolveCallback(Local<Context> context,                                                Local<String> specifier,                                                Local<Module> referrer) {   Environment* env = Environment::GetCurrent(context);-  CHECK_NOT_NULL(env);  // TODO(addaleax): Handle nullptr here.+  if (env == nullptr) {+    Isolate* isolate = context->GetIsolate();+    THROW_ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE(isolate);

There should probably be a return; after this line?

HarshithaKP

comment created time in 6 days

pull request commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

@fabiospampinato That seems very hypothetical, and even if it happened, it doesn’t seem like that would be a common use case?

And, again, I don’t see this as a “quirk”. But even if I did agree that there was a problem, there’s still the technical issue that Node.js shouldn’t silently perform sync fs operations under the hood, as mentioned in the linked issue.

Trott

comment created time in 6 days

issue commentnodejs/node

fs.remove dont remove bad symlinks (Fails with ENOENT code)

@nodejs/platform-windows

codermapuche

comment created time in 6 days

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 class Environment : public MemoryRetainer {   bool http_parser_buffer_in_use_ = false;   std::unique_ptr<http2::Http2State> http2_state_; -  bool debug_enabled_[static_cast<int>(DebugCategory::CATEGORY_COUNT)] = {-      false};-+  std::unique_ptr<EnabledDebugList> enabled_debug_list_;

If that works, then that would be great – otherwise we might need to move more things into env.h

joyeecheung

comment created time in 6 days

pull request commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

Because the concept of an “actual path” is a bit odd – yes, you can resolve symlinks, but you shouldn’t really have to. The whole idea of symlinks is that you can use them transparently instead of whatever path they point to.

I don't understand what's your point, are you arguing for the removal of fs.realpath because it shouldn't really be used?

No. (But I am unhappy about the fact that Node.js uses it in its module loader because it shouldn’t, yes.)

Are you saying that the people who may stumble upon cross-platform compatibility issues because Node sometimes is returning a symlink to the OS' "actual" temp dir should do things differently or that Node itself should do things differently elsewhere in order to avoid these potential issues?

The former – the question is, why do you need the resolved path to the directory? The point of symlinks is that you shouldn’t have to.

Trott

comment created time in 6 days

Pull request review commentnodejs/node

worker_threads: allow URL in Worker constructor

 class Worker extends EventEmitter {       }       argv = options.argv.map(String);     }-    if (!options.eval) {-      if (!path.isAbsolute(filename) && !/^\.\.?[\\/]/.test(filename)) {++    let url;+    if (options.eval) {+      if (typeof filename !== 'string') {+        throw new ERR_INVALID_ARG_VALUE(+          'options.eval',+          options.eval,+          'must be false when \'filename\' is not a string'+        );+      }+      url = null;+    } else {+      if (isURLInstance(filename)) {+        url = filename;+        filename = fileURLToPath(filename);+      } else if (typeof filename !== 'string') {+        throw new ERR_INVALID_ARG_TYPE(+          'filename',+          ['string', 'URL instance'],
          ['string', 'URL'],
aduh95

comment created time in 6 days

Pull request review commentnodejs/node

worker_threads: allow URL in Worker constructor

 E('ERR_WORKER_INVALID_EXEC_ARGV', (errors, msg = 'invalid execArgv flags') => E('ERR_WORKER_NOT_RUNNING', 'Worker instance not running', Error); E('ERR_WORKER_OUT_OF_MEMORY',   'Worker terminated due to reaching memory limit: %s', Error);-E('ERR_WORKER_PATH',-  'The worker script filename must be an absolute path or a relative ' +-  'path starting with \'./\' or \'../\'. Received "%s"',+E('ERR_WORKER_PATH', (filename) =>+  'The worker script or module filename must be an absolute path or a ' ++  'relative path starting with \'./\' or \'../\'.' ++  (filename.startsWith('file://') ?+    'If you want to pass a file:// URL, you must wrap it around `new URL`.' :
    ' If you want to pass a file:// URL, you must wrap it around `new URL`.' :
aduh95

comment created time in 6 days

pull request commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

@addaleax that Node under macOS returns a symlink to the temp directory rather than its actual path as it does under other OS', or at least I think that's how it currently works since this isn't documented.

If another OS reports its temporary directory as a symlink, then Node.js will also report that there.

Why would you consider it odd if Node always returned the actual path to the temp directory across all OS'?

Because the concept of an “actual path” is a bit odd – yes, you can resolve symlinks, but you shouldn’t really have to. The whole idea of symlinks is that you can use them transparently instead of whatever path they point to.

If it’s about the scenario described by Ben above, writing Node.js code to disk and then running it, then yes, Node.js does something weird – but it does so in the module loader, where it uses fs.realpath(), not when it returns the temporary directory as a symlink.

(I, personally, would still like to see a solution for that issue along the lines of https://github.com/nodejs/node-eps/issues/46#issuecomment-265513479 – but that’s out of scope for this PR here, I’d say…)

Trott

comment created time in 7 days

pull request commentnodejs/node

doc: update os.tmpdir() to discuss symlink results on macOS

I'm -.5 on documenting a platform quirk

I think I'd be better to remove the quirk entirely.

@fabiosantoscode What is the quirk here exactly, in your opinion? I’d consider it odd if Node.js did silently resolve symlinks for the temp directory.

Trott

comment created time in 7 days

Pull request review commentnodejs/node

doc: add entry for `AsyncHook` class

 provided by AsyncHooks itself. The logging should then be skipped when it was the logging itself that caused AsyncHooks callback to call. By doing this the otherwise infinite recursion is broken. +### Class: `AsyncHook`++The class `AsyncHook` exposes interface for tracking lifetime events+of asynchronous operations. Using a unique ID per asynchronous call,+it helps associating method calls that otherwise do not appear together

Either

it helps with associating method calls that otherwise do not appear together

or

it helps associate method calls that otherwise do not appear together

That being said – what’s a typical call stack?

HarshithaKP

comment created time in 7 days

Pull request review commentnodejs/node

doc: add entry for `AsyncHook` class

 provided by AsyncHooks itself. The logging should then be skipped when it was the logging itself that caused AsyncHooks callback to call. By doing this the otherwise infinite recursion is broken. +### Class: `AsyncHook`++The class `AsyncHook` exposes interface for tracking lifetime events
The class `AsyncHook` exposes an interface for tracking lifetime events
HarshithaKP

comment created time in 7 days

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 class MapKVStore final : public KVStore { namespace per_process { Mutex env_var_mutex; std::shared_ptr<KVStore> system_environment = std::make_shared<RealEnvStore>();+std::shared_ptr<EnabledDebugList> enabled_debug_list =+    std::make_shared<EnabledDebugList>(nullptr);

Ditto here, is there any reason this needs to be a pointer? I don’t really see any, especially if this is kept alive for the duration of the process from here anyway

joyeecheung

comment created time in 7 days

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 template <typename... Args> inline void FPrintF(FILE* file, const char* format, Args&&... args); void FWrite(FILE* file, const std::string& str); +// Listing the AsyncWrap provider types first enables us to cast directly+// from a provider type to a debug category.+#define DEBUG_CATEGORY_NAMES(V)                                                \+  NODE_ASYNC_PROVIDER_TYPES(V)                                                 \+  V(INSPECTOR_SERVER)                                                          \+  V(INSPECTOR_PROFILER)                                                        \+  V(CODE_CACHE)                                                                \+  V(WASI)++enum class DebugCategory {+#define V(name) name,+  DEBUG_CATEGORY_NAMES(V)+#undef V+      CATEGORY_COUNT+};++class EnabledDebugList {+ public:+  bool enabled(DebugCategory category) const {+    DCHECK_GE(static_cast<int>(category), 0);+    DCHECK_LT(static_cast<int>(category),+              static_cast<int>(DebugCategory::CATEGORY_COUNT));+    return enabled_[static_cast<int>(category)];+  }++  // Uses NODE_DEBUG_NATIVE to initialize the categories. When env is not a+  // nullptr, the environment variables set in the Environment are used.+  // Otherwise the system environment variables are used.+  EnabledDebugList(Environment* env);
  explicit EnabledDebugList(Environment* env);
joyeecheung

comment created time in 7 days

Pull request review commentnodejs/node

src: implement per-process native Debug() printer and use it in mkcodecache

 class Environment : public MemoryRetainer {   bool http_parser_buffer_in_use_ = false;   std::unique_ptr<http2::Http2State> http2_state_; -  bool debug_enabled_[static_cast<int>(DebugCategory::CATEGORY_COUNT)] = {-      false};-+  std::unique_ptr<EnabledDebugList> enabled_debug_list_;

Is there any reason that this would need to be a pointer? I don’t think that’s necessary, and it comes with one additional layer of indirection for each debug check. One of the goals for the Debug() implementation was to have as close to zero overhead as possible, and I think this might get in the way of it…

joyeecheung

comment created time in 7 days

delete branch addaleax/node

delete branch : v8-compile-function-identifier

delete time in 7 days

issue closednodejs/node

Node crashes when writing data on HTTP2 stream that meanwhile terminates

  • Version: v8.12.0
  • Platform: OSX, Darwin mymac.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
  • Subsystem: http2

When performing something along the lines of:

const http2Session = ...;
const outHeaders = { ... };
const req = http2Session.request({ ...outHeaders, [HTTP2_HEADER_PATH]: path });
const body: Buffer[] = [];
let headers: IncomingHttpHeaders = {};
req
      .on("response", (hs) => headers = hs)
      .on("data", (chunk) => body.push(chunk))
      .on("error", (error) => reject(error))
      .on("end", () => resolve({
        headers,
        status: parseInt(headers[HTTP2_HEADER_STATUS], 10),
        body: Buffer.concat(body),
      }));
req.end(Buffer.from("MYDATA"));

and the NGINX server becomes unavailable (shutsdown, GOAWAY, sessions close) sometimes we get the following error:

node[25931]: ../src/tls_wrap.cc:604:virtual int node::TLSWrap::DoWrite(node::WriteWrap *, uv_buf_t *, size_t, uv_stream_t *): Assertion `(ssl_) != (nullptr)' failed.
 1: node::Abort() [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 2: node::(anonymous namespace)::DomainEnter(node::Environment*, v8::Local<v8::Object>) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 3: node::TLSWrap::DoWrite(node::WriteWrap*, uv_buf_t*, unsigned long, uv_stream_s*) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 4: node::http2::Http2Session::SendPendingData() [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 5: node::http2::Http2Stream::RstStream(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 6: v8::internal::FunctionCallbackArguments::Call(void (*)(v8::FunctionCallbackInfo<v8::Value> const&)) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 7: 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) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 8: v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/hbanken/.nvm/versions/node/v8.12.0/bin/node]
 9: 0x3671961042fd
10: 0x3671961bd1d6

Expected behavior:

Native error is caught and converted in something NodeJS can handle instead of crashing the whole process.

closed time in 7 days

hermanbanken

issue commentnodejs/node

Node crashes when writing data on HTTP2 stream that meanwhile terminates

I’m closing this as v8.x is no longer supported … sorry if that wasn’t the outcome everyone was hoping for, but there aren’t going to be any more v8.x releases at this point.

hermanbanken

comment created time in 7 days

issue commentnodejs/node

repl: printing big strings results in OOM

Thinking about this, I think it’s actually pretty unreasonable for util.inspect() to generate output this large. We truncate Buffers at a relatively low length, so it should be okay to truncate strings, too? Even if that happens at a few thousand characters, it would help with issues like this.

joyeecheung

comment created time in 7 days

issue commentnodejs/node

Make it possible to give externals names/util.inspect.custom

I think the only practical solution here would be to print the underlying pointer value if showHidden: true is set. (I would not print the pointer value by default as that may be used in remote code execution attacks.) How does that sound?

emilbayes

comment created time in 7 days

issue commentnodejs/node

Global-based Variable will generate strange characters

@MaledongGit Can you post a simplified reproduction? Otherwise it’s going to be hard for somebody else to tell what’s going on.

MaledongGit

comment created time in 7 days

issue closednodejs/node

worker_threads: node[9926]: ../src/node_worker.cc:117:node::worker::WorkerThreadData::WorkerThreadData(node::worker::Worker*): Assertion `(uv_loop_init(&loop_)) == (0)' failed.

  • Version: v11.8.0
  • Platform: Centos 7
  • Subsystem: worker_threads

(async () => { while(true) { const result = await db.query(sql, values) result.rows.forEach(function(subscriber, key) { (async () => { await senderSystem(subscriber) })() }) } })()

My error node[15426]: ../src/node_worker.cc:117:node::worker::WorkerThreadData::WorkerThreadData(node::worker::Worker*): Assertion(uv_loop_init(&loop_)) == (0)' failed. 1: 0x9bcb80 node::Abort() [node] 2: 0x9bcc07 [node] 3: 0xa52bc2 node::worker::Worker::Run() [node] 4: 0xa536cc [node] 5: 0x7f00012b4dd5 [/lib64/libpthread.so.0] 6: 0x7f0000fde02d clone [/lib64/libc.so.6] Aborted`

closed time in 7 days

baron775

pull request commentnodejs/node

worker_threads: allow URL in Worker constructor

Ping @aduh95 – this would need to be rebased, and there are a few comments that should be addressed here.

Also, can you add Fixes: https://github.com/nodejs/node/issues/30780 to the commit message? (This should fix https://github.com/nodejs/node/issues/30780.)

aduh95

comment created time in 7 days

issue commentnodejs/node

13.5 broke tap's error handling

@isaacs How are you doing with the latest versions of Node.js 12 & 13? https://github.com/nodejs/node/pull/31784 basically reverted the PR you mentioned above.

isaacs

comment created time in 7 days

issue commentnodejs/node

process.stdout cannot be JSON.stringify()ed because of circular dependency

@nazarhussain Since nobody has replied here … there is an open PR that would fix this for the time being, but stringifying Node.js streams using JSON.stringify is generally not supported, and it would be best if this is avoided either way.

nazarhussain

comment created time in 7 days

issue closednodejs/node

std::logic_error exception with NODE_DEBUG_NATIVE

$ git rev-parse HEAD
f2842904c2b6ea2e770f9b3d38115c958fa55c22

$ env NODE_DEBUG_NATIVE=tls gdb -q --args ./out/Release/node test/sequential/test-https-keep-alive-large-write.js 
Reading symbols from ./out/Release/node...
(gdb) r
Starting program: /home/bnoordhuis/src/master/out/Release/node test/sequential/test-https-keep-alive-large-write.js
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7a2c700 (LWP 1581)]
[New Thread 0x7ffff722b700 (LWP 1582)]
[New Thread 0x7ffff6a2a700 (LWP 1583)]
[New Thread 0x7ffff6229700 (LWP 1584)]
[New Thread 0x7ffff5a28700 (LWP 1585)]
[New Thread 0x7ffff7fcb700 (LWP 1586)]
TLSWrap client (5) Created new TLSWrap
[New Thread 0x7ffff5227700 (LWP 1587)]
[New Thread 0x7ffff4a26700 (LWP 1588)]
[New Thread 0x7fffdffff700 (LWP 1589)]
[New Thread 0x7fffdf7fe700 (LWP 1590)]
TLSWrap server (14) Created new TLSWrap
TLSWrap client (5) Trying to read cleartext output
TLSWrap client (5) SSLInfoCallback(SSL_CB_HANDSHAKE_START);
TLSWrap client (5) Read -1 bytes of cleartext output
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) Writing 1 buffers to the underlying stream
TLSWrap client (5) Write finished synchronously
TLSWrap client (5) ReadStart()
TLSWrap client (5) DoWrite()
TLSWrap client (5) Writing 60 bytes, written = -1
TLSWrap client (5) Saving data for later write
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) Returning from EncOut(), write currently in progress
TLSWrap client (5) OnStreamAfterWrite(status = 0)
TLSWrap client (5) Trying to write cleartext input
TLSWrap client (5) Writing 60 bytes, written = -1
TLSWrap client (5) Pushing data back
TLSWrap client (5) Trying to write encrypted output
TLSWrap client (5) No pending encrypted output
TLSWrap server (14) Read 363 bytes from underlying stream
TLSWrap server (14) Trying to write cleartext input
TLSWrap server (14) Returning from ClearIn(), no pending data
TLSWrap server (14) Trying to read cleartext output
TLSWrap server (14) SSLInfoCallback(SSL_CB_HANDSHAKE_START);
TLSWrap server (14) Read -1 bytes of cleartext output
TLSWrap server (14) Trying to write encrypted output
TLSWrap server (14) Writing 1 buffers to the underlying stream
TLSWrap server (14) Write finished synchronously
TLSWrap server (14) OnStreamAfterWrite(status = 0)
TLSWrap server (14) Trying to write cleartext input
TLSWrap server (14) Returning from ClearIn(), no pending data
TLSWrap server (14) Trying to write encrypted output
TLSWrap server (14) No pending encrypted output
TLSWrap server (14) No pending cleartext input, not inside DoWrite()
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_M_construct null not valid

Thread 1 "node" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7a57899 in __GI_abort () at abort.c:79
#2  0x00007ffff7e4d5f6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007ffff7e599ec in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007ffff7e59a47 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007ffff7e59ca9 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007ffff7e4fda4 in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x0000555555d552ac in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) [clone .isra.0] ()
#8  0x0000555555d55a99 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintFImpl<char const*&>(char const*, char const*&) ()
#9  0x0000555555d66e40 in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintFImpl<int&, char const*&>(char const*, int&, char const*&) ()
#10 0x0000555555d66ecd in std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > node::SPrintF<int&, char const*&>(char const*, int&, char const*&) ()
#11 0x0000555555d66f1a in void node::FPrintF<int&, char const*&>(_IO_FILE*, char const*, int&, char const*&) ()
#12 0x0000555555d6700f in void node::UnconditionalAsyncWrapDebug<int&, char const*&>(node::AsyncWrap*, char const*, int&, char const*&) ()
#13 0x0000555555d66566 in node::TLSWrap::InvokeQueued(int, char const*) [clone .cold] ()
#14 0x0000555555f5f4d0 in node::TLSWrap::EncOut() ()
#15 0x0000555555f604eb in node::Environment::NativeImmediateCallbackImpl<node::TLSWrap::EncOut()::{lambda(node::Environment*)#2}>::Call(node::Environment*) ()
#16 0x0000555555da9658 in node::Environment::RunAndClearNativeImmediates(bool) ()
#17 0x0000555555da99b5 in node::Environment::CheckImmediate(uv_check_s*) ()
#18 0x00005555567fd921 in uv__run_check (loop=loop@entry=0x5555594c21a0 <default_loop_struct>) at ../deps/uv/src/unix/loop-watcher.c:67
#19 0x00005555567f5dec in uv_run (loop=0x5555594c21a0 <default_loop_struct>, mode=UV_RUN_DEFAULT) at ../deps/uv/src/unix/core.c:376
#20 0x0000555555e60834 in node::NodeMainInstance::Run() () at ../deps/uv/src/unix/core.c:856
#21 0x0000555555de55ab in node::Start(int, char**) () at ../deps/uv/src/unix/core.c:856
#22 0x00007ffff7a591e3 in __libc_start_main (main=0x555555d6d660 <main>, argc=2, argv=0x7fffffffdd88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdd78) at ../csu/libc-start.c:308
#23 0x0000555555d6ec0e in _start () at ../deps/uv/src/unix/core.c:856

cc @addaleax

closed time in 7 days

bnoordhuis

issue commentnodejs/node

std::logic_error exception with NODE_DEBUG_NATIVE

This has been fixed a while ago

bnoordhuis

comment created time in 7 days

Pull request review commentnodejs/node

doc: add entry for `AsyncHook` class

 function destroy(asyncId) { } // (either directly or through other means of resolving a promise). function promiseResolve(asyncId) { } ```+### Class: `AsyncHook`

There is an empty line missing before this.

That being said, this should be moved anyway, to the documentation of .enable() and .disable(), as those are methods of this class.

HarshithaKP

comment created time in 7 days

issue commentnodejs/modules

import.meta.main

@jkrems How about “It’s easier to make the very first steps with JS/Node.js this way”? I know that might seem like it’s not much in the big picture, but I do like this about JS.

MylesBorins

comment created time in 7 days

push eventnodejs/node

Harshitha KP

commit sha 2d3717ad847665de333c85e5239ad4e6a4c0eb95

worker: emit runtime error on loop creation failure Instead of hard asserting throw a runtime error, that is more consumable. Fixes: https://github.com/nodejs/node/issues/31614 PR-URL: https://github.com/nodejs/node/pull/31621 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

push time in 7 days

issue closednodejs/node

assertion failure in src/node_worker.cc with large number of workers

<!-- Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of node -v Platform: output of uname -a (UNIX), or version and 32 or 64-bit (Windows)

Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as simple and free of external dependencies as you can. -->

  • Version: master, v14.0.0-pre
  • Platform: Linux 3.10.0-957.5.1.el7.x86_64 1 SMP Wed Dec 19 10:46:58 EST 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: workers

<!-- Please provide more details below this comment. -->

I was debugging https://github.com/nodejs/node/issues/23277 and came across this:

$ cat bar.js

const { Worker } = require('worker_threads');

for (let i = 0; i < 10000; ++i) {
  const worker = new Worker(
    'require(\'worker_threads\').parentPort.postMessage(2 + 2)',
    { eval: true });
}

$ node --max-old-space-size=100000 bar

node[101402]: ../src/node_worker.cc:135:node::worker::WorkerThreadData::WorkerThreadData(node::worker::Worker*): Assertion `(uv_loop_init(&loop_)) == (0)' failed.

I guess this has to do with libuv failure due to lack of memory, but can this be better handled?

/cc @nodejs/workers

closed time in 7 days

gireeshpunathil

PR closed nodejs/node

src,worker: runtime error on loop creation failure C++ worker

Instead of hard asserting throw a runtime error, that is more consumable. Fixes: https://github.com/nodejs/node/issues/31614

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [ ] tests and/or benchmarks are included
  • [ ] documentation is changed or added
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+50 -17

9 comments

6 changed files

HarshithaKP

pr closed time in 7 days

pull request commentnodejs/node

src,worker: runtime error on loop creation failure

Landed in 2d3717ad847665de333c85e5239ad4e6a4c0eb95 :tada:

@HarshithaKP Thanks for persisting and bringing this over the finish line!

HarshithaKP

comment created time in 7 days

delete branch nodejs/build

delete branch : Trott-patch-1

delete time in 7 days

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

I mean, we’ve had enough issues with getting the platform implementation right that it might be worth adding optional debugging (in the style of NODE_DEBUG_NATIVE as we do for other parts of core) here. But that’s also out of the scope of this PR, I would say.

addaleax

comment created time in 7 days

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

If you’re suggesting to put printing debugging information for the platform impl behind a CLI flag, that sounds okay to me

addaleax

comment created time in 8 days

Pull request review commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

 void PerIsolatePlatformData::PostIdleTask(std::unique_ptr<v8::IdleTask> task) { }  void PerIsolatePlatformData::PostTask(std::unique_ptr<Task> task) {-  CHECK_NOT_NULL(flush_tasks_);+  if (flush_tasks_ == nullptr) {+    // V8 may post tasks during Isolate disposal. In that case, the only

What would that debug print print?

addaleax

comment created time in 8 days

issue commentnodejs/Release

Rename Current release line Canary?

Yeah, I fully agree with @AdamMajer here.

I also remember that there was resistance against renaming Stable to Current back when we did that – we do our best to keep the Current release line stable, and I’m definitely not a fan of renaming it to Canary.

What we should do is find ways to encourage more people to test on Current in addition to LTS. I know that lots of users only test on LTS, sometimes even package authors, but I don’t understand why, to be honest – it just seems like the logical thing to do if you’re also planning to support and run on the next LTS release.

MylesBorins

comment created time in 8 days

pull request commentnodejs/node

process: add .stillSynchronous

Hm … based on the discussion in https://github.com/nodejs/node/pull/31765 – Maybe we want some kind of generic “event loop turn counter”?

I think the current state of the PR here would also include process.nextTick()s from the startup phase in the initialEventLoop phase, is that what we want? (In this case, “still synchronous” and “initial event loop” do refer to different things…)

ChALkeR

comment created time in 8 days

pull request commentnodejs/node

src: discard tasks posted to platform TaskRunner during shutdown

After thinking about it, I think this also means that we can and should let go of the NodePlatform::DrainTasks() calls before disposing an Isolate. I’ll pursue that separately, though … no need to mix that in with a bug fix :)

addaleax

comment created time in 8 days

PR opened nodejs/node

src: discard tasks posted to platform TaskRunner during shutdown lts-watch-v12.x

Following the discussion in https://chromium-review.googlesource.com/c/v8/v8/+/2061548:

src: discard tasks posted to platform TaskRunner during shutdown

Discard tasks silently that are posted when the Isolate is being disposed.

It is not possible to avoid a race condition window between unregistering the Isolate with the platform and disposing it in which background tasks and the Isolate deinit steps themselves may lead to new tasks being posted. The only sensible action in that case is discarding the tasks.

Fixes: https://github.com/nodejs/node/issues/31752 Fixes: https://bugs.chromium.org/p/v8/issues/detail?id=10104 Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2061548 Refs: https://github.com/nodejs/node/pull/31795 Refs: https://github.com/nodejs/node/pull/30909

Revert "src: keep main-thread Isolate attached to platform during Dispose"

This reverts commit e460f8cf43863a5a8d73273ce311135ad3245699.

It is no longer necessary after the previous commit, and restores consistency of the call order between the main thread code, the other call sites, and the documentation.

Refs: https://github.com/nodejs/node/pull/31795

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+11 -7

0 comment

2 changed files

pr created time in 8 days

push eventaddaleax/node

Anna Henningsen

commit sha 023ed84c64cbda7ccbb4f3fd8d570c00e223c3e2

src: discard tasks posted to platform TaskRunner during shutdown Discard tasks silently that are posted when the Isolate is being disposed. It is not possible to avoid a race condition window between unregistering the Isolate with the platform and disposing it in which background tasks and the Isolate deinit steps themselves may lead to new tasks being posted. The only sensible action in that case is discarding the tasks. Fixes: https://github.com/nodejs/node/issues/31752 Fixes: https://bugs.chromium.org/p/v8/issues/detail?id=10104 Refs: https://chromium-review.googlesource.com/c/v8/v8/+/2061548 Refs: https://github.com/nodejs/node/pull/31795 Refs: https://github.com/nodejs/node/pull/30909

view details

Anna Henningsen

commit sha 06eff8055f9a53459a50d308f49519208121c6f7

Revert "src: keep main-thread Isolate attached to platform during Dispose" This reverts commit e460f8cf43863a5a8d73273ce311135ad3245699. It is no longer necessary after the previous commit, and restores consistency of the call order between the main thread code, the other call sites, and the documentation. Refs: https://github.com/nodejs/node/pull/31795

view details

push time in 8 days

create barnchaddaleax/node

branch : fix-31752

created branch time in 8 days

issue commentnodejs/Release

v12.16.0 post-mortem

Because this is a V8 bug that we were not aware of at the time of the release, I don't think we could have done better here, especially since the original change was supposed to fix a regression.

Actually … I opened https://chromium-review.googlesource.com/c/v8/v8/+/2061548 as a suggested fix for the issue, where it was pointed out that https://bugs.chromium.org/p/v8/issues/detail?id=10104 was a bug report for this that was opened a month before the problematic commit went out in 12.16.0.

I don’t know why this was reported to V8 only, but this might be a point where better communication (e.g. Node.js people being pinged by the V8 team) or us actively watching the V8 issue tracker would have helped.

To avoid this happening again, I think we need somehow to instruct collaborators to do these when a regression is found:

See also #535 for some related discussion.

Also, I’ve been thinking from time to time that it might make sense for us to have something like Refs: as a commit message field, but for PRs that the new commit fixes up (e.g. Fixes-Bug-Introduced-In: ...). Implemented properly, we could make sure that PRs that should be released together are actually released together.

http response listener throwing does not result in emit of uncaughtException

I don’t think there’s necessarily something we could have done on the process side to prevent this, but we might want to look into preventing something like this from happening again on the technical side.

InternalCallbackScope was introduced as a lower-overhead way of achieving the same thing as CallbackScope at the cost of having to do more manual control. But if we (I?) don’t manage to use it correctly, it might make sense to try to move towards using CallbackScope more.

Then there’s also the fact that this only happened because the HTTP parser has odd timing requirements around process.nextTick(). If it didn’t, we could have used the more standard (and thus more foolproof) facilities for async calls. It’s probably worth investigating why we need to special-case here in the first place, and how we can fix that.

New enumerable and nonwritable field on EventEmitter caused issues

I would personally argue that deviations from the standard JS property model (i.e. writable + configurable properties) are not something that other developers necessarily expect to handle, especially if they weren’t present before. My personal stance would be to make it policy that new properties are writable and configurable unless we have a good reason to break developers’ expectations here – what are we trying to prevent? Generally, properties are not overwritten accidentally.

targos

comment created time in 8 days

issue commentnodejs/node

Assertion failed in 12.16.0

Fwiw, I’ve opened a V8 CL in https://chromium-review.googlesource.com/c/v8/v8/+/2061548 and it currently looks like there’s actually no correct ordering of disposing an Isolate and detaching it from the platform, either one will have a race condition. Let’s see how the conversation there goes. :grimacing:

arcanis

comment created time in 8 days

issue commentnodejs/node

Evaluate node core modules within a `vm.Context`

I’ve talked about this recently with other people, partially in the context of https://github.com/nodejs/node/issues/28823. This is definitely doable, but it’s also going to be a lot of work.

SimenB

comment created time in 8 days

pull request commentnodejs/node

v13.9.0 proposal

@codebytere Fwiw, I think it’s still worth listing the other semver-minor commits in the notable changes list (not the src ones). Also, usually releasers match the notable changes list content in three places: The release commit message, the release PR description, and the changelog itself.

I don’t think you’d need a full CI after those either, but these changes might be nice to have before this goes out as a release :)

codebytere

comment created time in 8 days

Pull request review commentnodejs/node

events: convert errorMonitor to getter

 ObjectDefineProperty(EventEmitter, 'captureRejections', { });  ObjectDefineProperty(EventEmitter, 'errorMonitor', {-  value: kErrorMonitor,-  writable: false,-  configurable: true,

@flarna Unless you’re not using strict mode, this should throw an error when writing?

I would just make it a writable data property rather than a non-writable one, I don’t quite see the point of why we would want to explicitly forbid writing to it, especially if that breaks use cases…

Flarna

comment created time in 8 days

pull request commentnodejs/node

events: fix not emit removeListener

Superseded by #31847

@fuxingZhang Just for the future, you can always push new commits to a PR to make changes that you like instead of opening a new PR :)

fuxingZhang

comment created time in 8 days

pull request commentnodejs/node

v12.16.1 proposal

Fwiw, I’ve opened an issue around how we handle regressions in LTS releases in the future: https://github.com/nodejs/Release/issues/535

I also agree that it makes sense to try to put together a post-mortem for the regressions introduced here once this release is out.

MylesBorins

comment created time in 9 days

issue openednodejs/Release

Working around a policy around reverts for LTS branches

With the v12.16.0 release, a number of regressions has been introduced, some (most?) of which also applied to v13.x and master.

One approach that has been taken to address this is to revert the problematic commits on v12.x-staging only.

I would like to handle this situation differently in the future, and work around a policy around that. I think the most important downside to the aforementioned approach is that the reverts only land on v12.x-staging, bringing LTS out of sync with the rest of our branches, while fixes are being worked on in master:

  • It makes working on fixes harder from a purely technical perspective. Once they land on master, they would typically have to be backported to LTS manually, together with a revert of the revert(s) that were applied to LTS only.
  • It makes it harder to have an overview over which regressions exist on which release lines. While we do apply labels to PRs to keep track of their backporting state, it doesn’t let us know which bugs have been temporarily solved through reverts that should be taken care of sooner rather than later. This is especially bad when the original change that was reverted was a bug fix; there is no way of tracking that a bug has been intentionally re-introduced as a “temporary” measure.
  • It does not motivate working on fixes. If a change is reverted on master, I generally believe that the authors are more inclined to work on a fixed version of their changes compared to when the changes are “just” excluded from LTS.
  • It presents stability of master and Current releases as less important. Yes, it should be the priority to keep LTS as stable as possible, but I think we should do our best to avoid bugs in Current as well.

My suggestion for handling these types of situations would be:

  • For bugs that only occur in LTS, a revert PR against the staging branch is opened and applied. I don’t think we need any special fast-tracking rules, as we’ve been handling the staging branches that way anyway. I do think that an explicit revert PR is good for documentation purposes, even if it’s landed immediately after opening.
  • For bugs that occur on master, a revert PR is opened against master, and then cherry-picked back to the release lines where it applies. If pushing out releases in a timely manner is a concern here that isn’t covered by our regular fast-tracking rules, then I’m open to making changes to our policy for that.

/cc @MylesBorins

created time in 9 days

Pull request review commentnodejs/node

v12.16.1 proposal

   * [io.js](CHANGELOG_IOJS.md)   * [Archive](CHANGELOG_ARCHIVE.md) +<a id="12.16.1"></a>+## 2020-02-18, Version 12.16.1 'Erbium' (LTS), @MylesBorins++### Notable changes++Node.js 12.16.0 included 6 regressions that are being fixed in this release++**Accidental Unflagging of Self Resolving Modules**:++12.16.0 included a large update to the ESM implementation. One of the new features,+Self Referential Modules, was accidentally released without requiring the `--experimental-modules`+flag. This release is being made to appropriately flag the feature.++**Process Cleanup Changed Introduced WASM-Related Assertion**:++A change during Node.js process cleanup led to a crash in combination with+specific usage of WASM. This has been fixed by partially reverted said change.+A regression test and a full fix are being worked on and will likely be included+in future 12.x and 13.x releases.++**Use Largepages Runtime Option Introduced Linking Failure**:++A Semver-Minor change to introduce `--use-largepages` as a runtime option+introduced a linking failure. This had been fixed in master but regressed as the fix has not yet gone out+in a Current release. The feature has been reverted, but will be able to reland with a fix in a future+Semver-Minor release.++**Async Hooks was Causing an Exception When Handling Errors**:++Changes in async hooks internals introduced a case where an internal api call could be called with undefined+causing a process to crash. The change to async hooks was reverted. A regression test and fix has been proposed+and the change could re land in a future Semver-Patch release if the regression is reliably fixed.++**New Enumerable Read-Only Property on EventEmitter breaks @types/extend**++A new property for enumerating events was added to the EventEmitter class. This+broke existing code that was using the `@types/extend` module for extending classses+as `@types/extend` was attemping to write over the existing field which the new+change made read-only. As this is the first property on EventEmitter that is+read-only this feature could be considered Semver-Major. The new feature has been+reverted but could re land in a future Semver-Minor release if a non breaking way
reverted but could re-land in a future Semver-Minor release if a non breaking way
MylesBorins

comment created time in 9 days

Pull request review commentnodejs/node

v12.16.1 proposal

   * [io.js](CHANGELOG_IOJS.md)   * [Archive](CHANGELOG_ARCHIVE.md) +<a id="12.16.1"></a>+## 2020-02-18, Version 12.16.1 'Erbium' (LTS), @MylesBorins++### Notable changes++Node.js 12.16.0 included 6 regressions that are being fixed in this release++**Accidental Unflagging of Self Resolving Modules**:++12.16.0 included a large update to the ESM implementation. One of the new features,+Self Referential Modules, was accidentally released without requiring the `--experimental-modules`+flag. This release is being made to appropriately flag the feature.++**Process Cleanup Changed Introduced WASM-Related Assertion**:++A change during Node.js process cleanup led to a crash in combination with+specific usage of WASM. This has been fixed by partially reverted said change.+A regression test and a full fix are being worked on and will likely be included+in future 12.x and 13.x releases.++**Use Largepages Runtime Option Introduced Linking Failure**:++A Semver-Minor change to introduce `--use-largepages` as a runtime option+introduced a linking failure. This had been fixed in master but regressed as the fix has not yet gone out+in a Current release. The feature has been reverted, but will be able to reland with a fix in a future+Semver-Minor release.++**Async Hooks was Causing an Exception When Handling Errors**:++Changes in async hooks internals introduced a case where an internal api call could be called with undefined+causing a process to crash. The change to async hooks was reverted. A regression test and fix has been proposed+and the change could re land in a future Semver-Patch release if the regression is reliably fixed.++**New Enumerable Read-Only Property on EventEmitter breaks @types/extend**++A new property for enumerating events was added to the EventEmitter class. This+broke existing code that was using the `@types/extend` module for extending classses+as `@types/extend` was attemping to write over the existing field which the new+change made read-only. As this is the first property on EventEmitter that is+read-only this feature could be considered Semver-Major. The new feature has been+reverted but could re land in a future Semver-Minor release if a non breaking way+of applying it is found.++**Exceptions in the HTTP parser were not emitting an uncaughtException**++A refactoring to Node.js interanls resulted in a bug where errors in the HTTP+parser were not being emitted by `process.on('uncaughtException')`. The fix

Might be good to mention that this only applies in situations where an async_hooks after hook exists

(Also, typo: internals)

MylesBorins

comment created time in 9 days

delete branch addaleax/node

delete branch : http-parser-callbackscope

delete time in 9 days

PR closed nodejs/node

src: inform callback scopes about exceptions in HTTP parser C++ author ready http_parser

Refs: https://github.com/nodejs/node/commit/4aca277f16b8649b5fc21d41f340fad0a47c2e61 Refs: https://github.com/nodejs/node/pull/30236 Fixes: https://github.com/nodejs/node/issues/31796

<!-- Thank you for your pull request. Please provide a description above and review the requirements below.

Bug fixes and new features should include tests and possibly benchmarks.

Contributors guide: https://github.com/nodejs/node/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] make -j4 test (UNIX), or vcbuild test (Windows) passes
  • [x] tests and/or benchmarks are included
  • [x] commit message follows commit guidelines

<!-- Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or

(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or

(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.

(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. -->

+31 -0

2 comments

2 changed files

addaleax

pr closed time in 9 days

more