I’ve looked into the permanent logs which revealed some information about the issue; in short, the problem is closely related to the faulty error handling of analog inputs.
The exact occurrence of the error is usually marked with an “ALSA buffer xrun” message:
Apr 22 14:41:15 PLTTSK503381 user.warn ffinputD2P493171.analog-a[9261]: [24D2] [alsa @ 0x56cfc0] ALSA buffer xrun.
After this, the devices tries to read the device, but it gets an error:
Apr 22 14:41:15 PLTTSK503381 user.err ffinputD2P493171.analog-a[9261]: [24D2] [alsa @ 0x56cfc0] ALSA read error: File descriptor in bad state
In response, Pearl tries to restart the analog input, but if it fails, closes the input, then starts the process all over again, resulting in an endless loop:
Apr 22 14:41:15 PLTTSK503381 user.warn ffinputD2P493171.analog-a[9261]: [24D2] hw:0,6 I/O error -5 Input/output error, restart device
Apr 22 14:41:15 PLTTSK503381 user.notice ffinputD2P493171.analog-a[9261]: [242D] Capture device alsa:hw:0,6 successfully closed
Apr 22 14:41:15 PLTTSK503381 user.notice ffinputD2P493171.hdmi-b[6138]: [3F52] FrmGrab 'local:D2P493171.hdmi-b', Video mode 1920x1080@60400p
Apr 22 14:41:15 PLTTSK503381 user.notice ffinputD2P493171.analog-a[9261]: [242D] Capture device alsa:hw:0,6 successfully opened
Apr 22 14:41:15 PLTTSK503381 user.warn ffinputD2P493171.analog-a[9261]: [3FB4] hw:0,6 I/O error -5 Input/output error, restart device
Apr 22 14:41:15 PLTTSK503381 user.notice ffinputD2P493171.analog-a[9261]: [242D] Capture device alsa:hw:0,6 successfully closed
Apr 22 14:41:16 PLTTSK503381 user.notice ffinputD2P493171.analog-a[9261]: [242D] Capture device alsa:hw:0,6 successfully opened
Apr 22 14:41:16 PLTTSK503381 user.warn ffinputD2P493171.analog-a[9261]: [3FF2] hw:0,6 I/O error -5 Input/output error, restart device
Apr 22 14:41:16 PLTTSK503381 user.notice ffinputD2P493171.analog-a[9261]: [242D] Capture device alsa:hw:0,6 successfully closed
As you can see, these warnings are spammed 3-4 times per second, until the device gets the shutdown signal:
Apr 22 12:49:41 PLTTSK503381 daemon.info init: starting pid 4633, tty '/dev/null': '/bin/run-parts /etc/rc.shutdown.d'
Apr 22 14:49:41 PLTTSK503381 user.info pipeline5[5732]: [1664] Pipeline stopping
Apr 22 14:49:41 PLTTSK503381 user.info pipeline4[5309]: [14BD] Pipeline stopping
As others already stated in this thread, after a successful boot, the issue is gone. The most concerning thing about this error that it happens completely randomly, without any signs, and mostly in live conditions, which resulted in some extremely embarrassing situations.
These logs were taken from a Pearl-2 model, with firmware version 4.14.1e. (I’m sure the issue is present in several earlier versions too.)
I hope this info will be useful for others. Cheers.