Closed spurgelaurels closed 1 year ago
The same issue appears to happen on Home Assistant OS 10.0.rc1, see https://github.com/home-assistant/operating-system/discussions/2426.
I can reprooduce this problem on ODROID-N2. It seems that a simple mmap
call fails :thinking:
root@19ca41362b22:/opt/node_modules/node-red-dashboard$ strace patch -p1 < /etc/node-red/patches/node-red-dashboard-show-dashboard.patch
execve("/usr/bin/patch", ["patch", "-p1"], 0xffffdf9d5748 /* 23 vars */) = 0
set_tid_address(0xffffb18f3230) = 53
brk(NULL) = 0xaaaad43e4000
brk(0xaaaad43e6000) = 0xaaaad43e6000
mmap(0xaaaad43e4000, 4096, PROT_NONE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xaaaad43e4000
mprotect(0xaaaabdaee000, 8192, PROT_READ) = 0
clock_gettime(CLOCK_REALTIME, {tv_sec=1679728473, tv_nsec=461112126}) = 0
mmap(NULL, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffffb18e6000
rt_sigaction(SIGCHLD, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0xffffb1890a90}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGHUP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGTERM, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=0xaaaabdab8e20, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0xffffb1890a90}, NULL, 8) = 0
fstat(0, {st_mode=S_IFREG|0644, st_size=2132, ...}) = 0
lseek(0, 0, SEEK_CUR) = 0
lseek(0, 0, SEEK_SET) = 0
lseek(0, 0, SEEK_CUR) = 0
read(0, "--- a/nodes/ui_base.html\n+++ b/n"..., 1024) = 1024
lseek(0, 0, SEEK_CUR) = 1024
lseek(0, 0, SEEK_CUR) = 1024
openat(AT_FDCWD, "nodes", O_RDONLY|O_LARGEFILE|O_NOFOLLOW|O_DIRECTORY) = 3
prlimit64(0, RLIMIT_NOFILE, NULL, {rlim_cur=1073741816, rlim_max=1073741816}) = 0
mmap(NULL, 5368709188, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Out of memory)
writev(2, [{iov_base="patch: **** out of memory\n", iov_len=26}, {iov_base=NULL, iov_len=0}], 2patch: **** out of memory
) = 26
lseek(0, -952, SEEK_CUR) = 72
exit_group(2) = ?
+++ exited with 2 +++
Probably the most likely culprit is the upgrade to Docker 23.0.1.
@spurgelaurels are you running Supervised? What version of Docker are you using?
In HAOS case, it seems that the culprit is missing swap space. So this is a HAOS 10.0.rc1 issue.
Same here, after update of HAOS 10.0.rc1, Node-red out of memory. I have not read any workaround at the moment.
You can downgrade using ha os update --version 9.5
.
I'll likely build a rc2 on Monday.
@agners , thanks for your quick response. Downgrade to 9.5 completed successfully and nodered working now.
Hi @agners , 10.0.rc2 still same issue with NodeRed, Error: out of memory.
Ran free -h and swapon
I ran the update to 10.0.dev20230317 and still the same issue:
NodeRed still shows out of memory:
Thanks for your help
It really seems that patch allocates an excessive amount of memory. I've also reported the problem in Alpine (see https://gitlab.alpinelinux.org/alpine/aports/-/issues/14763).
However, for our add-on we can also side step the issue by applying the patch at build time.
Add-on version: 14.0.3 You are running the latest version of this add-on. System: Arch Linux (amd64 / qemux86-64) Home Assistant Core: 2023.2.5 Home Assistant Supervisor: 2023.01.1
Problem/Motivation
Node-red addon in HASS no longer starts.
Expected behavior
Nodered to start....
Actual behavior
Log snippet from docker logs
Memory stats at time of attempting to run docker:
Recent changes: Flows are quite simple in my nodered install, no loops or conditions that would cause this sort of issue. I did remove a flow between two nodes last weekend to stop something from running, but re-deployed with the flow back in place. I don't believe this was related to the issue above.
This issue started a few days later, and restarting the addon didn't help. Rebooting the host OS also didn't help.
I upgraded to the latest version today, and the issue persists.