Possible memory leaks by deployment of tf model and using of Matplotlib/Wordcloud

Hello everyone!
I’m using Fedora 31 and I’m doing deployment of my deep learning model on Web App with Flask and more recently getting all the time some strange errors like:

-munmap_chunk(): invalid pointer
-double free or corruption (out)
-corrupted size vs. prev_size

I’m using such tools as:
venv
Python 3.7
ipykernel==5.1.2
ipython==5.0.0
numpy==1.18.1
tensorflow==1.14.0
Keras==2.2.5
matplotlib==3.1.1
shap==0.34.0
and others.

Probably the problem is in some memory leaks and I found some solution here which maybe could help me Error in `python': double free or corruption (!prev) · Issue #6968 · tensorflow/tensorflow · GitHub.
But by running the command “export LD_PRELOAD=”/usr/lib/libtcmalloc_minimal.so.4" I’m getting an error message
ERROR: ld.so: object ‘/usr/lib/libtcmalloc_minimal.so.4’ from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Did you face maybe some similar problems and could advice me something?
Tnank you in advance :slight_smile:

1 Like