3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Error in `python': free(): invalid pointerとエラーが発生した場合

Last updated at Posted at 2018-04-25

Kerasで学習させたあと、下記のエラーが発生しました

*** Error in `python': free(): invalid pointer: 0x00000000026cd780 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fc02629d7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fc0262a637a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7fc0262aa53c]
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf8internal28DestroyDefaultRepeatedFieldsEv+0x1f)[0x7fbfa59be8af]
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9(_ZN6google8protobuf23ShutdownProtobufLibraryEv+0x8b)[0x7fbfa59bdb3b]
/usr/lib/x86_64-linux-gnu/libmirprotobuf.so.3(+0x233b9)[0x7fbf9551c3b9]
/lib64/ld-linux-x86-64.so.2(+0x10de7)[0x7fc02681dde7]
/lib/x86_64-linux-gnu/libc.so.6(+0x39ff8)[0x7fc02625fff8]
/lib/x86_64-linux-gnu/libc.so.6(+0x3a045)[0x7fc026260045]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf7)[0x7fc026246837]
python(_start+0x29)[0x5d6049]
======= Memory map: ========
00400000-007a9000 r-xp 00000000 08:04 23335675

libtcmalloc-minimal4をインストール

sudo apt-get install libtcmalloc-minimal4

bashrcを編集

vim ~/.bashrc

追加

export LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.4"

更新

source ~/.bashrc

再度学習すると上記のエラーは発生しなくなりましたー

※その後、TypeError: 'NoneType' object is not callableと別のエラーが発生した場合はこちらの記事をm(__)m

Exception ignored in: <bound method BaseSession.__del__ of <tensorflow.python.client.session.Session object at 0x7fa1662e5d30>>
Traceback (most recent call last):
  File "/home/Users/.virtualenvs/Pythonの環境名/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 712, in __del__
  File "/home/Users/.virtualenvs/Pythonの環境名/lib/python3.5/site-packages/tensorflow/python/framework/c_api_util.py", line 31, in __init__
TypeError: 'NoneType' object is not callable
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?