Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error in `/usr/bin/python': double free or corruption (out): 0x00007f7c3c017260

I'm developing a website in Python using the (excellent) Flask framework. In the backend code I use APScheduler to run some cron-like jobs every minute, and I use Numpy to calculate some Standard Deviations. Don't know whether the usage of these modules matter, but I thought I'dd better mention them since I guess they might be the most likely to be the cause.

Anyway, in the middle of operation, Python itself seemed to crash, giving the following:

*** Error in `/usr/bin/python': double free or corruption (out): 0x00007f7c3c017260 ***

I might be wrong, but as far as I know, this is pretty serious. So my question is actually; what could cause this, and how can I get more information about a crash like this? What does the (out) mean? I can't really reproduce this, but it happened 4 times in about 5 months now. I'm running the standard Python 2.7 on Ubuntu server 14.04

I searched around and found a couple discussions about similar crashes, of which one thing comes back: concurrency seems to be related somehow (which is why I included the usage of APScheduler).

If anybody has any idea how I could debug this or what could possibly be the cause of this; all tips are welcome!

like image 232
kramer65 Avatar asked Jul 01 '14 21:07

kramer65


1 Answers

I had a similar issue.

I had an unused dependency: spacy == 1.6.0 removing it solved the issue. (maybe upgrading spacy version could also work)

spacy is written in Cython - an optimising static compiler for Python. So it might be related to sum bug memory allocation in spacy implementation.

like image 147
kashierez Avatar answered Oct 14 '22 19:10

kashierez