Repository navigation
[fs.watch] src\fs_event_wrap.cc:90: Assertion `wrap != nullptr' failed. #20297
Description
Activity
- addedfsIssues and PRs related to file-system APIs and the fs module.Issues and PRs related to file-system APIs and the fs module.
on Apr 25, 2018 @dr-js I am unable to reproduce this on Ubuntu. Can you provide the core dump appeared in the logs?
Is this the Ubuntu core dump file?
_usr_bin_node.1000.crash.zipThis may be related to #18897
@dr-js If you are using
apport(cat /proc/sys/kernel/core_patternshould display something like|/usr/share/apport/apport %p %s %c %d %P), you can tryapport-unpack /path/to/crash /path/to/a/new/directoryand look for the core dump in the directory you unpack the crash file to. Or if you enableulimit -c unlimited(or switchulimitedto a reasonable value for the size of a core dump) you may be able to find thecorefile in the directory where you run your script.I can reproduce this on Windows and the crash go away if I comment out this line. Haven't looked into other classes inheriting from
HandleWrapyet so I am not sure if it's safe to just remove it. Investigating..cc @bnoordhuis
Line 117 in 2a30bfe
ClearWrap(wrap->object()); - addedconfirmed-bugIssues and PRs for confirmed bugs.Issues and PRs for confirmed bugs.
on Apr 25, 2018 This is the
corefile withulimit -c unlimitedon Ubuntu: core.zipAssign to myself so I don't forget
Another PR with same problem webpack/watchpack#80
Can someone try to reproduce this on Windows after bd20110#diff-bd3b4db95ebe4ba6bf2b03a3060d9074?
@cjihrig with
v11.0.0-nightly201805051cf7ef6433andv10.0.1-nightly20180505ff148b987dthe output is the same except the last line> node -v v11.0.0-nightly201805051cf7ef6433 > node .\test.js 111 =============== 222 =============== 333 =============== error =============== error setTimeout =============== Windows PowerShell[1880]: src\fs_event_wrap.cc:90: Assertion `wrap != nullptr' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: node::Start 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::Object::ToInt32 8: v8::internal::Object::GetProperty 9: v8::internal::NativesCollection<0>::GetScriptsSource 10: v8::internal::NativesCollection<0>::GetScriptsSource 11: 0000036189004281> node -v v10.0.1-nightly20180505ff148b987d > node .\test.js 111 =============== 222 =============== 333 =============== error =============== error setTimeout =============== Windows PowerShell[1592]: src\fs_event_wrap.cc:90: Assertion `wrap != nullptr' failed. 1: node::DecodeWrite 2: node::DecodeWrite 3: node::Start 4: v8::internal::interpreter::BytecodeDecoder::Decode 5: v8::internal::RegExpImpl::Exec 6: v8::internal::RegExpImpl::Exec 7: v8::internal::Object::ToInt32 8: v8::internal::Object::GetProperty 9: v8::internal::NativesCollection<0>::GetScriptsSource 10: v8::internal::NativesCollection<0>::GetScriptsSource 11: 0000020DC9204281v11.0.0-nightly201805051cf7ef6433core dump core.tar.gz from4.13.0-39-generic #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux$ node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node test.js 111 =============== 222 =============== 333 =============== change =============== change =============== change setTimeout =============== change done =============== change setTimeout =============== node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node[22633]: ../src/fs_event_wrap.cc:90:static void node::{anonymous}::FSEventWrap::GetInitialized(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `wrap != nullptr' failed. 1: node::Abort() [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 2: 0x8772b5 [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 3: 0x86608a [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 5: 0xaceada [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 6: v8::internal::Builtins::InvokeApiFunction(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::HeapObject>) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 7: v8::internal::Object::GetPropertyWithAccessor(v8::internal::LookupIterator*) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 8: v8::internal::Object::GetProperty(v8::internal::LookupIterator*) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 9: v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 10: v8::internal::Runtime_LoadIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node-v11.0.0-nightly201805051cf7ef6433-linux-x64/bin/node] 11: 0x313eb8b8427d Aborted (core dumped)and updated core.tar.gz from
v10.1.0$ uname -srvmpio Linux 4.13.0-41-generic #46~16.04.1-Ubuntu SMP Thu May 3 10:06:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux $ node -v v10.1.0 $ node test.js 111 =============== 222 =============== 333 =============== change =============== change =============== change setTimeout =============== change done =============== change setTimeout =============== node[1717]: ../src/fs_event_wrap.cc:90:static void node::{anonymous}::FSEventWrap::GetInitialized(const v8::FunctionCallbackInfo<v8::Value>&): Assertion `wrap != nullptr' failed. 1: node::Abort() [node] 2: 0x876c55 [node] 3: 0x86601a [node] 4: v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [node] 5: 0xacda3a [node] 6: v8::internal::Builtins::InvokeApiFunction(v8::internal::Isolate*, bool, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*, v8::internal::Handle<v8::internal::HeapObject>) [node] 7: v8::internal::Object::GetPropertyWithAccessor(v8::internal::LookupIterator*) [node] 8: v8::internal::Object::GetProperty(v8::internal::LookupIterator*) [node] 9: v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>) [node] 10: v8::internal::Runtime_LoadIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node] 11: 0x275bd780427d Aborted (core dumped)7 remaining items
- added a commit that references this issue
on Jun 13, 2018 - added a commit that references this issue
on Jun 20, 2018 - added 2 commits that reference this issue
on Jul 4, 2018 - added 2 commits that reference this issue
on Jul 5, 2018 - added a commit that references this issue
on May 29, 2026 - added a commit that references this issue
on Jul 27, 2026
Calling
close()fromfs.watchmay crash node process.From my test:
The minimal reproducible code: (will not crash on node 8 or 9)
The error on Windows:
The error on Linux: