buanet / ioBroker.docker

Official Docker Image for ioBroker
https://www.iobroker.net
MIT License
197 stars 69 forks source link

Container crashes with new commit - JavaScript heap out of memory #224

Closed ChrizZz90 closed 2 years ago

ChrizZz90 commented 2 years ago

With the last version, my docker container crashes 5-10mins after starting it. I already saw that with the newest version the "Jeelink" adapter doesn't work and therefore I removed it. But even after that I still get these crashes:

<--- Last few GCs --->
[422:0x3a019d0]  1375597 ms: Scavenge 661.7 (709.3) -> 661.3 (712.0) MB, 12.2 / 0.0 ms  (average mu = 0.997, current mu = 0.988) allocation failure 
[422:0x3a019d0]  1375639 ms: Scavenge 664.2 (712.0) -> 663.6 (717.3) MB, 18.6 / 0.0 ms  (average mu = 0.997, current mu = 0.988) allocation failure 
[422:0x3a019d0]  1375692 ms: Scavenge 668.7 (717.3) -> 668.3 (720.0) MB, 13.3 / 0.0 ms  (average mu = 0.997, current mu = 0.988) allocation failure 
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
/opt/scripts/iobroker_startup.sh: line 505:   422 Aborted                 gosu iobroker node node_modules/iobroker.js-controller/controller.js

Does someone have experience with such an error message?

buanet commented 2 years ago

Hi, I'm not sure where this comes from. Looks like ioBroker/ container is short of memory? Do you have any details of your setup? Also the Log is way to short. Please post the whole Log of the containers startup. Are you able to access ioBroker admin before the container crashes?

Regards, André

ChrizZz90 commented 2 years ago

Today I tried it with a clean installation (new iobroker folder) and with restoring a backup, but the result is the same. My setup is a Pi4 4GB and has lots of space on the microSD card.

I can access the ioBroker admin before, between start and crash are 10-15min.

This is the full log:

--------------------------------------------------------------------------------
-------------------------     2021-12-20 23:31:14      -------------------------
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-----                 Welcome to your ioBroker-container!                  -----
-----                    Startupscript is now running.                     -----
-----                          Please be patient!                          -----
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-----                        Debugging information                         -----
-----                                                                      -----
-----                                System                                -----
-----                    arch:                armv7l                       -----
-----                                                                      -----
-----                             Docker-Image                             -----
-----                    image:               v6.0.0                       -----
-----                    build:               2021-12-17T03:48:21+00:00    -----
-----                                                                      -----
-----                               Versions                               -----
-----                    node:                v14.18.2                     -----
-----                    npm:                 6.14.15                      -----
-----                                                                      -----
-----                                 ENV                                  -----
-----                    PACKAGES:            iputils-ping                 -----
-----                    SETGID:              1000                         -----
-----                    SETUID:              1000                         -----
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-----                  Step 1 of 5: Preparing container                   -----
--------------------------------------------------------------------------------

Installing additional packages is set by ENV.
Checking the following Packages: iputils-ping...
iputils-ping is already installed.
Reading package lists...
Building dependency tree...
Reading state information...
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
Done.

--------------------------------------------------------------------------------
-----             Step 2 of 5: Detecting ioBroker installation             -----
--------------------------------------------------------------------------------

Existing installation of ioBroker detected in /opt/iobroker.

--------------------------------------------------------------------------------
-----             Step 3 of 5: Checking ioBroker installation              -----
--------------------------------------------------------------------------------

(Re)Setting folder permissions (This might take a while! Please be patient!)...
Done.

Fixing "sudo-bug" by replacing sudo in iobroker with gosu...
Done.

/opt/scripts/iobroker_startup.sh: line 199: [: !=: unary operator expected
--------------------------------------------------------------------------------
-----                Step 4 of 5: Applying special settings                -----
--------------------------------------------------------------------------------

Some adapters have special requirements/ settings which can be activated by the use of environment variables.
For more information take a look at readme.md on Github!

--------------------------------------------------------------------------------
-----                    Step 5 of 5: ioBroker startup                     -----
--------------------------------------------------------------------------------

Starting ioBroker...

================================== > LOG REDIRECT system.adapter.admin.0 => true [starting]
host.iobroker check instance "system.adapter.admin.0" for host "iobroker"
host.iobroker check instance "system.adapter.javascript.0" for host "iobroker"
host.iobroker check instance "system.adapter.telegram.0" for host "iobroker"
host.iobroker check instance "system.adapter.node-red.0" for host "iobroker"
host.iobroker check instance "system.adapter.ping.0" for host "iobroker"
host.iobroker check instance "system.adapter.tuya.0" for host "iobroker"
host.iobroker check instance "system.adapter.rpi2.0" for host "iobroker"
host.iobroker check instance "system.adapter.mqtt.0" for host "iobroker"
host.iobroker check instance "system.adapter.info.0" for host "iobroker"
host.iobroker check instance "system.adapter.influxdb.0" for host "iobroker"
host.iobroker check instance "system.adapter.ble.0" for host "iobroker"
host.iobroker check instance "system.adapter.web.0" for host "iobroker"
host.iobroker check instance "system.adapter.jarvis.0" for host "iobroker"
host.iobroker check instance "system.adapter.ecovacs-deebot.0" for host "iobroker"
host.iobroker check instance "system.adapter.socketio.0" for host "iobroker"
host.iobroker check instance "system.adapter.cloud.0" for host "iobroker"
host.iobroker check instance "system.adapter.simple-api.0" for host "iobroker"
host.iobroker check instance "system.adapter.fullybrowser.0" for host "iobroker"
host.iobroker check instance "system.adapter.openweathermap.0" for host "iobroker"
host.iobroker check instance "system.adapter.squeezebox.0" for host "iobroker"
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
/bin/sh: 1: iw: not found
/bin/sh: 1: iw: not found
/bin/sh: 1: hcitool: not found
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory
vcgencmd: error while loading shared libraries: libvchiq_arm.so: cannot open shared object file: No such file or directory

<--- Last few GCs --->

[411:0x3d999d0]   833399 ms: Scavenge 661.6 (709.3) -> 661.0 (714.3) MB, 19.3 / 0.0 ms  (average mu = 0.996, current mu = 0.986) allocation failure 
[411:0x3d999d0]   833458 ms: Scavenge 665.9 (714.3) -> 665.5 (717.3) MB, 13.6 / 0.0 ms  (average mu = 0.996, current mu = 0.986) allocation failure 
[411:0x3d999d0]   833503 ms: Scavenge 668.5 (717.3) -> 668.0 (722.3) MB, 20.5 / 0.0 ms  (average mu = 0.996, current mu = 0.986) allocation failure 

<--- JS stacktrace --->

FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
/opt/scripts/iobroker_startup.sh: line 505:   411 Aborted                 gosu iobroker node node_modules/iobroker.js-controller/controller.js
Apollon77 commented 2 years ago

Did you tried to disable all your scripts? Maybe a script is the bad one? If it runs without any script start enabling them one after the other

ChrizZz90 commented 2 years ago

Ha, it's the MQTT instance. So I will close this issue as this seems to be not related to iobroker docker in general. Thanks guys & merry X-Mas