Skip to content

Latest commit

 

History

History
79 lines (60 loc) · 4.98 KB

issues_weve_seen_before.adoc

File metadata and controls

79 lines (60 loc) · 4.98 KB

Issues we’ve seen before

CPU throttling

If you see log lines like this:

2019-07-01T05:36:14.567699+00:00 [error] [VideoProcessor] video processing unable to keep up in real-time

It might mean the pi is getting throttled because it’s either overheating or has too low of a voltage from the power supply.

Test running a command like this (video obtained via youtube):

vcgencmd measure_temp && vcgencmd get_throttled && time ffmpeg -threads 1 -i "/home/pi/pifi/data/The Smashing Pumpkins - 1979 (Official Video)@480x360.mp4" -filter:v scale=28x18 -c:a copy -f rawvideo -pix_fmt gray pipe:1 > /dev/null && vcgencmd measure_temp && vcgencmd get_throttled

If all is going well, ffmpeg should convert it in ~6x speed. If you’re getting throttled, it might only run at ~3x speed.

If temperature is > 80 C, it might be getting throttled. The pi3 has soft throttling that starts occurring at 60 C. The soft throttling is fine — it doesn’t appear to throttle enough to affect normal operation. Video playback etc is fine. Reaching 80 C would likely adversely affect operations though, as the throttling becomes more aggressive at this temperature.

Docs:

Install a heatsink or fan.

You can also interpret the vcgencmd get_throttled as shown here and here and here in the official docs.

And you can check for undervoltage errors in dmesg:

$ dmesg -e
[Jul 2 02:47] rpi_firmware_get_throttled: 4 callbacks suppressed
[  +0.000008] Under-voltage detected! (0x00050005)

Spurious undervoltage warnings resulting in throttling

If it shows undervoltage issues when you think everything is wired / powered correctly, you can override the undervoltage settings by adding a line to /boot/config.txt:

# disables the warning overlays, but additionally allows turbo mode even when low-voltage is present.
avoid_warnings=2

Refer to docs and use at your own risk!

Bad SD card

A raspberry pi was rebooting itself randomly. We would see this rebooting happening ~50% of the time when we ran the ./install/install_dependencies.sh or ./install/install.sh scripts. It would also reboot itself occasionally during normal operation (playing and queueing videos).

After replacing the SD card, the pi would no longer randomly reboot itself. See here for recommended raspberry pi SD cards: https://www.jeffgeerling.com/blog/2019/raspberry-pi-microsd-card-performance-comparison-2019

Power supply

Originally, we tried powering both the pi and the LEDs from the same power supply. This mostly worked, but occasionally the pi would randomly reboot itself. This seemed to happen more when the pi was under load (requiring more current), or when the LEDs were playing bright white colors (requiring more current). After switching to powering the pi and the LEDs separately — the pi with a USB adapter, the pi’s random rebooting problems seem to be solved.

Unable to ssh onto pi / hit pifi web page

Takes a while (~30 seconds) to load the pifi webpage

Schema changes fail due to disk errors

Something like this:

2020-07-20T01:01:51.256742+00:00 [info] [Database] current_schema_version: -1
2020-07-20T01:01:51.257580+00:00 [info] [Database] Constructing database schema from scratch...
Traceback (most recent call last):
  File "./utils/make_db", line 11, in <module>
    Database().construct()
  File "/home/pi/development/pifi/pifi/database.py", line 90, in construct
    self.__cursor.execute("COMMIT")
sqlite3.OperationalError: disk I/O error

Sometimes even though it reports a failure, it seems like all the rows got written successfully. Other times, it seems like the commit fails and nothing gets written. Perhaps this is due to SD card flakiness — the issue seems transient and a retry often works. Potentially we can address this by backing up the DB before hand and restoring the backup if the schema change fails, then retrying a few times. Or get a better SD card.

Maybe using WAL mode would help? https://www.sqlite.org/wal.html