Skip to content

Strange case 'Out of memory' #133

Closed
@DisDis

Description

@DisDis

I created special repo for reproduce: https://github.com/DisDis/flutter-pi-oom

Host:

  1. clone flutter-pi-oom
  2. copy gen_snapshot_linux_x64 to project root
  3. Build release version ./build_linux.sh && ./build_aot.sh

RaPi:

  1. create flutter-pi-oom folder and flutter-pi-oom/images
  2. copy flutter-pi, icudtl.dat, libflutter_engine.so.debug, libflutter_engine.so.release to flutter-pi-oom/
  3. copy flutter-pi-oom/build/flutter_assets to RaPi flutter-pi-oom/flutter_assets
  4. extract images.7z all files to flutter-pi-oom/images
  5. delete images.7z
  6. exec ./run.sh or flutter in release mode
  7. wait 10min, OOM :)

This application does not consume memory directly.
However, the 'buff/cache'(in TOP command) is leaking gradually.
Init: 761mb 'buff/cache'
image
After 1min: 1339mb
image
after 3min: 2195mb
image
after 5min: 3048mb
image
after 8min: 3400mb
image


System slows down
after KILL process: buff/cache free
image

MySystem : RaPi4 (4Gb)
i tried on kernel:

Linux raspberrypi 5.4.35-v7l+ #1314 SMP Fri May 1 17:47:34 BST 2020 armv7l GNU/Linux

and

Linux raspberrypi 4.19.118-v7l+ #1311 SMP Mon Apr 27 14:26:42 BST 2020 armv7l

the result is the same.

I noticed that memory leak happens after somes effects 'DepthEffect, ForegroundToBackgroundEffect...' ( see https://github.com/DisDis/flutter-pi-oom/blob/master/lib/effects.dart#L18 and https://github.com/DisDis/flutter-pi-oom/blob/master/lib/main.dart#L85 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions