You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scope (install, code, runtime, meta, other?): Trying to install packages
Module (and version) (if relevant): Any module
I'm trying to use npm install @symfony/webpack-encore and I'm getting the following error
This works OK when I run as root but when doing from a chrooted user it yields this error. Probably some library is missing in the chroot environment but I'm unable to deduce from the error message.
I'm still looking into it, but I should note that my change(s) do not have to do with reading /proc/meminfo, and currently I can't see a code path that would lead to fd failing the assertion check. Not to say that this isn't because of the cgroups change, but because uv_get_total_memory has existed before the cgroups change, I'm curious as to whether this was failing before v12.3.1 (right now, to me, it would be strange if it didn't).
I have two servers running debian 8 and 9 with node 10.x and 11.x and I didn't face this issue. In ubuntu however all node versions from 10+ threw this error
It is libuv issue in uv_get_total_memory (checked with libuv 1.34.0):
#3 0x00007ffff71810a2 in __GI___assert_fail (assertion=assertion@entry=0x7ffff7f9f8fd "fd > -1", file=file@entry=0x7ffff7f9f8d5 "src/unix/core.c", line=line@entry=556,
function=function@entry=0x7ffff7f9fb50 <__PRETTY_FUNCTION__.10400> "uv__close_nocheckstdio") at assert.c:101
#4 0x00007ffff7f8b8f3 in uv__close_nocheckstdio (fd=-2) at src/unix/core.c:556
#5 uv__close_nocheckstdio (fd=fd@entry=-2) at src/unix/core.c:552
#6 0x00007ffff7f9abc1 in uv__read_proc_meminfo (what=0x7ffff7fa0e54 "MemTotal:") at src/unix/linux-core.c:1006
#7 0x00007ffff7f9c012 in uv_get_total_memory () at src/unix/linux-core.c:1033
#8 0x0000000000a0d355 in node::SetIsolateCreateParamsForNode (params=params@entry=0x7fffffffe430) at ../src/api/environment.cc:191
Activity
addaleax commentedon Aug 5, 2019
Can you share a core dump, and/or try to use the latest version of Node 12 and see if it still reproduces?
ioweb-gr commentedon Aug 5, 2019
Same thing on 12.7 version. How would I take a core dump in chroot environment?
ioweb-gr commentedon Aug 5, 2019
After thorough debugging this error came from missing /sys/fs/cgroup/memory/memory.limit_in_bytes and /proc/meminfo files in chroot environment.
addaleax commentedon Aug 5, 2019
@nodejs/libuv @kjin
bnoordhuis commentedon Aug 6, 2019
I believe libuv/libuv#2323 addresses this.
kjin commentedon Aug 8, 2019
I'm still looking into it, but I should note that my change(s) do not have to do with reading
/proc/meminfo, and currently I can't see a code path that would lead tofdfailing the assertion check. Not to say that this isn't because of the cgroups change, but becauseuv_get_total_memoryhas existed before the cgroups change, I'm curious as to whether this was failing before v12.3.1 (right now, to me, it would be strange if it didn't).ioweb-gr commentedon Aug 8, 2019
I have two servers running debian 8 and 9 with node 10.x and 11.x and I didn't face this issue. In ubuntu however all node versions from 10+ threw this error
Allow mounting /proc in nsjail for konnectors
vitlav commentedon Jan 21, 2020
$ node
node: src/unix/core.c:556: uv__close_nocheckstdio: Assertion `fd > -1' failed.
Aborted
$ node -v
v13.6.0
strace:
vitlav commentedon Jan 21, 2020
It is libuv issue in uv_get_total_memory (checked with libuv 1.34.0):
unix: handle uv__open_cloexec return value correctly
addaleax commentedon Jan 21, 2020
@vitlav Thanks, that’s very helpful. libuv/libuv#2645 should address this 👍
vitlav commentedon Jan 21, 2020
244569: libuv-1.34.1-alt1
1 remaining item
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
deps: upgrade to libuv 1.34.2
unix: handle uv__open_cloexec return value correctly
unix: handle uv__open_cloexec return value correctly
unix: handle uv__open_cloexec return value correctly