Skip to content

Unexpected memory consumption since release 8.3.0 #5797

@helgeerbe

Description

@helgeerbe

What did you do?

I'm the owner of picframe. This is a picture frame viewer for raspi, controlled via mqtt and automatticly integrated as mqtt device in homeassistant.

In an endless loop this programs displays one image on the frame, opens the next one and blend the new image smoothly in. To extract the image data PIL is used. So at the end just 2 images are kept in memory.

What did you expect to happen?

A stable memory consumption over a period of time. This was true up and including release 8.2.0.
I'm logging in a influxdb the system load and found this behavior.
Bildschirmfoto 2021-10-27 um 10 30 26

Memory consumption is as expected stable. When suddenly the sawtooth line appears. (High cpu load two most left yellow peaks are the nightly backups).

What have I done?

  • apt get full-upgrade
  • pull all python modules required by picframe to their latest releases
pi@picframe:~ $ python3 --version
Python 3.7.3
pi@picframe:~ $ picframe -v
INFO:start.py:starting ['/home/pi/.local/bin/picframe', '-v']
picframe version:  0+untagged.365.gfc64728

Checking required packages......
PIL :  8.4.0
exifread :  2.3.2
pi3d :  2.48
yaml :  6.0
paho.mqtt :  1.5.1
iptcinfo3 :  2.1.4
numpy :  1.21.2
ninepatch : installed, but no version info

Checking optional packages......
pyheif :  0.5.1

What actually happened?

Starting with release 8.3.0 memory consumption is strange. Picframe starts with 6% total memory. While running, PIL allocated permanently memory which is freed frequently (sawtooth line). But at the end memory consumption reaches 100% in total and picframe crashes.

What are your OS, Python and Pillow versions?

  • OS: Rasbian
    Description: Raspbian GNU/Linux 10 (buster)
    Release: 10
    Codename: buster
    Linux picframe 5.10.63-v7+ 1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux
  • Python: 3.7.2
  • Pillow: 8.3.0 - 8.4.0 (earlier releases behave as expected)

issue in picframe

Issue for picframe is tracked here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions