Node bus error [continuous socket hangups]

Situation:
I’ve got a raspberry pi 3 B+ running resinOS powering a 5m strip of WS2812b LEDs. I’m running on resin/raspberry-pi-node:8 with a nodejs express server and using rpi-ws281x-native to control the lights themselves.

I had everything working for a few days, controlling the lights via a web browser after attaching the server to port 80 and enabling the public device URL. Suddenly today everything stops working - when the device boots it will show itself online, but attempting to connect to the public URL returns a socket hang up error. The dashboard continues to show online, but nothing is responsive - cannot ssh, and requesting any actions of the device such as reboot or restart return a socket hang up error as well.

Reflashing the SD card with resinOS and updating the image to not run the server immediately made the dashboard work again. However, whenever I would manually initiate the server with a node command, it would execute for a few seconds and then return with a Bus error. After executing once, the dashboard would again enter the zombie like state. Sometimes I would remain connected to the container terminal, but all commands would fail, even ls giving me ls: reading directory .: Input/output error.

The nodejs application runs perfectly on my laptop when attached to port 3000. I also tried running a test LED controller file with no server and that worked as well, eliminating the possibility that it was an issue with the rp-ws281x-native library.

I really have no idea what is causing this - the SD card is brand new for this project, and I’ve reflashed it with Etcher probably 5 times now. Any help is greatly appreciated!

Update: in addition to socket hang up I also get invalid API key in supervisor sometimes.

Update: Getting this error when attempting to restart the container -

09.07.18 18:13:39 (-0500) Killing service 'main sha256:87636b5dbb91dcb123b415b3a92413f2c4c93a4b264633346b02a8a54a5851ba'
09.07.18 18:13:39 (-0500) Service is already stopped, removing container 'main sha256:87636b5dbb91dcb123b415b3a92413f2c4c93a4b264633346b02a8a54a5851ba'
09.07.18 18:13:39 (-0500) Failed to kill service 'main sha256:87636b5dbb91dcb123b415b3a92413f2c4c93a4b264633346b02a8a54a5851ba' due to '(HTTP code 500) server error - driver "aufs" failed to remove root filesystem for ac74e1c70874e50718543eabde140be0c9cf8bc44534f8cdd579b425d58d41fe: rename /var/lib/docker/aufs/mnt/70b0492fd8a31e1a78a10ed538635da4769415fc34bebb77f77d1637f1996bbd /var/lib/docker/aufs/mnt/70b0492fd8a31e1a78a10ed538635da4769415fc34bebb77f77d1637f1996bbd-removing: read-only file system '

How are the ws2812b’s powered? 5m, depending on the density, sounds like an awful lot of power draw. The RPi struggles to power external HDD and my hunch would be that the draw would be about the same. Bear in mind the ws2812b’s can take an external power supply, and provided this has a common ground with the Pi and between 3.3v and 4.7v should be fine. (4.7v because the ws2812b’s expect a signal voltage of at least 0.7 x supply voltage, and the RPi signals at 3.3v).

I actually solved the issue - I am powering the LEDs externally with a 5v 10A supply on either end, since they can pull up to 18 A for the full strip.

The real issue was using a 10 foot USB extension cable to power the Pi. Running the LED control software and nodeJS server required a lot of power, and the voltage drop over that extension cable was causing the pi to kill certain processes.

I’ve got the whole system up and running now, planning to post a writeup to the projects forum when I get the chance! Thanks for all your help.

Thanks for closing the loop on that. It did sound a bit like a brown-out and a 3m USB cable would have that risk! Last Christmas our tree was resin.io empowered Christmas Lights! and I experienced a couple of issues with power management that advent.