Unstable Linux Mycroft on rpi4 64 bit bullseye - system level hang

This is a tough one. At times everything works fine:
rpi4 with adafruit speaker bonnet & USB mic
64 bit raspberry pi OS based on debian bullseye
mimic3 installed and in use
precise listener with Athena wake word .

However. sometimes when I start mycroft: ./start-mycroft.sh debug
I get a little text in the log window and then the rpi4 hangs forcing me to power cycle to restart. Afterwords, there is nothing in any of the log files (mycroft, system, kernel).

At other times, the mycroft cli comes up and I can interact with it by typing, but audio (mic and speakers) do not work. I found that by stopping and starting mycroft one or more times will eventually get me back to a function mycroft again.

So HELP! Has anyone else experienced this before? Maybe a hardware issue? however, the rpi4 only crashes when starting mycroft.

Mycroft is more stable now. I’m not sure why, but here are some possible causes:

  1. I was getting “low voltage warnings” from my Raspberrypi OS, especially when I started mycroft. These have gone away for now and I haven’t had a system level hang in awhile.
  2. There were some errors reported in regards to python3.9 and import statements in thread modules.
    Python 3.9+ issues · Issue #2799 · MycroftAI/mycroft-core · GitHub
    I implemented this fix:
    mycroft-core/process_utils.py at bugfix/mp-workaround · forslund/mycroft-core · GitHub
  3. I now start mycroft as a system service which seems to be very stable

Hey there, welcome to the forums and glad you got some stuff worked out.

In regard to the “low voltage warnings” I’d make sure you have a quality power supply. Whilst it “only crashes when starting mycroft” this could be because all the peripherals are powering up also.

Unfortunately not all USB-C chargers are created equal and a little money on the right power supply will save you lots of headaches elsewhere.

I’m trying the same on ubuntu 20.4 server on rpi4. It seems mycroft does not use my 4 GB RAM fully … do you have that issue too?

Tasks: 151 total, 1 running, 150 sleeping, 0 stopped, 0 zombie
%Cpu(s): 32.6 us, 17.3 sy, 0.0 ni, 50.1 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
MiB Mem : 3793.3 total, 1718.9 free, 891.6 used, 1182.8 buff/cache
MiB Swap: 0.0 total, 0.0 free, 0.0 used. 2713.0 avail Mem

PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                       

1166 pi 20 0 3023412 129360 25920 S 141.4 3.3 1896:23 python3
1317 pi 20 0 639124 167252 66764 S 22.5 4.3 355:53.66 precise-engine
4506 pi 20 0 724940 48168 12076 S 22.2 1.2 276:58.79 python
1172 pi 20 0 1085660 74856 22860 S 4.3 1.9 62:26.75 python3
1163 pi 20 0 202844 43644 11372 S 4.0 1.1 53:18.30 python3
1175 pi 20 0 788064 39600 11828 S 3.3 1.0 52:16.56 python3
1028 pi 20 0 1365944 17916 13056 S 2.6 0.5 39:07.04 pulseaudio
36488 pi 20 0 10712 3284 2696 R 0.7 0.1 0:00.19 top