Read the statement by Michael Teeuw here.
Version 2.33.0/node v22.21.0 - Error: write EFAULT
-
I’ve done a new installation on a RPI 4. Everthing is running fine, independant of a error message at start time where I don’t have any idea which module or core function produce the message.
Here is my configuration:
MM v2.33.0
node 22.21.0
trixie: Linux devpi 6.12.47+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.47-1+rpt1 (2025-09-16) aarch64 GNU/LinuxMaybe, there is someone who has already fixed that problem. How to proceed to identify this issue?
Nov 21 15:18:47 devpi mm[2438]: [2025-11-21 15:18:47.026] [LOG] Starting MagicMirror: v2.33.0 Nov 21 15:18:47 devpi mm[2438]: [2025-11-21 15:18:47.034] [LOG] Loading config ... ... Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.059] [LOG] MMM-NotificationBoard helper started ... Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.060] [LOG] Connecting socket for: MMM-RTSPphas Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.060] [LOG] MMM-RTSPphas helper started ... Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.060] [LOG] Connecting socket for: MMM-EnergyMonitor Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.131] [LOG] Connecting socket for: MMM-Spotify Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.133] [LOG] Connecting socket for: MMM-SpeechToCommand Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.134] [LOG] MMM-SpeechToCommand helper started ... Nov 21 15:18:55 devpi mm[2438]: [2025-11-21 15:18:55.135] [LOG] Sockets connected & modules started ... Nov 21 15:18:56 devpi mm[2438]: [2025-11-21 15:18:56.117] [ERROR] Error: write EFAULT Nov 21 15:18:56 devpi mm[2438]: at afterWriteDispatched (node:internal/stream_base_commons:159:15) Nov 21 15:18:56 devpi mm[2438]: at writeGeneric (node:internal/stream_base_commons:150:3) Nov 21 15:18:56 devpi mm[2438]: at Socket._writeGeneric (node:net:966:11) Nov 21 15:18:56 devpi mm[2438]: at Socket._write (node:net:978:8) Nov 21 15:18:56 devpi mm[2438]: at writeOrBuffer (node:internal/streams/writable:572:12) Nov 21 15:18:56 devpi mm[2438]: at _write (node:internal/streams/writable:501:10) Nov 21 15:18:56 devpi mm[2438]: at Writable.write (node:internal/streams/writable:510:10) Nov 21 15:18:56 devpi mm[2438]: at execSync (node:child_process:999:20) Nov 21 15:18:56 devpi mm[2438]: at node:electron/js2c/node_init:2:17346 Nov 21 15:18:56 devpi mm[2438]: at /home/pi/MagicMirror/node_modules/systeminformation/lib/system.js:175:28 Nov 21 15:18:56 devpi mm[2438]: at ChildProcess.exithandler (node:child_process:410:7) Nov 21 15:18:56 devpi mm[2438]: at ChildProcess.emit (node:events:519:28) Nov 21 15:18:56 devpi mm[2438]: at maybeClose (node:internal/child_process:1101:16) Nov 21 15:18:56 devpi mm[2438]: at Socket.<anonymous> (node:internal/child_process:456:11) Nov 21 15:18:56 devpi mm[2438]: at Socket.emit (node:events:519:28) Nov 21 15:18:56 devpi mm[2438]: at Pipe.<anonymous> (node:net:346:12) Nov 21 15:18:56 devpi mm[2438]: [2025-11-21 15:18:56.118] [LOG] Node NOT Exiting... Nov 21 15:18:56 devpi mm[2438]: [2025-11-21 15:18:56.283] [LOG] Launching application. -
@Mr.Sponti we are trying to get the system information for this output
[2025-11-21 10:30:49.475] [LOG] Launching application.
[2025-11-21 10:30:50.438] [INFO]System Information
- SYSTEM: manufacturer: System manufacturer; model: System Product Name; virtual: false; MM: 2.33>
- OS: platform: linux; distro: Ubuntu; release: 22.04.5 LTS; arch: x64; kernel: 5.15.0-160-ge>
- VERSIONS: electron: 38.3.0; used node: 22.20.0; installed node: 22.18.0; npm: 10.9.3; pm2: 6.0.13
- ENV: XDG_SESSION_TYPE: x11; MM_CONFIG_FILE: undefined
WAYLAND_DISPLAY: undefined; DISPLAY: :0.0; ELECTRON_ENABLE_GPU: undefined - RAM: total: 48077.12 MB; free: 6870.40 MB; used: 41206.72 MB
- OTHERS: uptime: 44548 minutes; timeZone: America/Chicago
but appears there is a fault.
-
Here my System Information (started with: node --run start:wayland):
[2025-11-22 10:47:48.003] [LOG] Sockets connected & modules started ... [2025-11-22 10:47:49.223] [ERROR] Error: write EFAULT at afterWriteDispatched (node:internal/stream_base_commons:159:15) at writeGeneric (node:internal/stream_base_commons:150:3) at Socket._writeGeneric (node:net:966:11) at Socket._write (node:net:978:8) at writeOrBuffer (node:internal/streams/writable:572:12) at _write (node:internal/streams/writable:501:10) at Writable.write (node:internal/streams/writable:510:10) at execSync (node:child_process:999:20) at node:electron/js2c/node_init:2:17346 at /home/pi/MagicMirror/node_modules/systeminformation/lib/system.js:175:28 at ChildProcess.exithandler (node:child_process:410:7) at ChildProcess.emit (node:events:519:28) at maybeClose (node:internal/child_process:1101:16) at Socket.<anonymous> (node:internal/child_process:456:11) at Socket.emit (node:events:519:28) at Pipe.<anonymous> (node:net:346:12) [2025-11-22 10:47:49.224] [LOG] Node NOT Exiting... [2025-11-22 10:47:49.395] [LOG] Launching application. [2025-11-22 10:47:56.485] [INFO] #### System Information #### - SYSTEM: manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 4 Model B Rev 1.1; virtual: false; MM: 2.33.0 - OS: platform: linux; distro: Debian GNU/Linux; release: 13; arch: arm64; kernel: 6.12.47+rpt-rpi-v8 - VERSIONS: electron: 38.1.2; used node: 22.19.0; installed node: 22.21.0; npm: 10.9.4; pm2: 6.0.13 - ENV: XDG_SESSION_TYPE: tty; MM_CONFIG_FILE: undefined WAYLAND_DISPLAY: wayland-0; DISPLAY: :0; ELECTRON_ENABLE_GPU: undefined - RAM: total: 906.64 MB; free: 449.86 MB; used: 456.78 MB - OTHERS: uptime: 21 minutes; timeZone: Europe/Berlin -
So, after further investigations I found the issue in the module: ./MagicMirror/node_modules/systeminformation/lib/system.js:175:28
I’m not a nodejs expert, but it seems that execSync returns a invalid or corrupted raw buffer. The encoding option solved the issue, as in my case execSync returns now an empty string.
const stdout = execSync('dmesg 2>/dev/null | grep -iE "virtual|hypervisor" | grep -iE "vmware|qemu|kvm|xen" | grep -viE "Nested Virtualization|/virtual/"', {encoding: 'utf-8'}); -
@Mr.Sponti if you take the contents of the execSync() and run it at the command line does it work?
-
Yes, without any error, but also without any output!
-
-
Sam, the kernel buffer does not include a line with ‘virtual’ or ‘hypervisor’. So, the retuen value of the execSync is a emty string.
pi@devpi:~ $ dmesg | grep virtual pi@devpi:~ $ dmesg | grep hypervisor pi@devpi:~ $ dmesg | grep zram0 [ 4.928549] zram_generator::config[229]: zram0: system has too much memory (905MB), limit is 0MB, ignoring. [ 5.775275] systemd[1]: Expecting device dev-zram0.device - /dev/zram0... [ 5.977908] zram: Added device: zram0 [ 6.771158] zram0: detected capacity change from 0 to 1853440 [ 6.998349] Adding 926716k swap on /dev/zram0. Priority:100 extents:1 across:926716k SS -
@Mr.Sponti yep errors, too much ram. Etc
What is this running in?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login