7

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!

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
kramer65
  • 50,427
  • 120
  • 308
  • 488
  • Congrats, you've found a bug in Python or some package you use with native code. Not much you can do. – bmargulies Jul 01 '14 at 21:36
  • You may try to run the application using valgrind or some other tool like that. This would give a lot more information about memory allocation/free. However it's going to be quite slower than running python normally. – Bakuriu Jul 01 '14 at 21:49
  • You can install the [debug symbol packages](https://wiki.ubuntu.com/DebuggingProgramCrash) of python from the ubuntu repositories and run your program with that. With the information of the full stack trace report the bug to the ubuntu team. – Bort Jul 02 '14 at 08:52

1 Answers1

1

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.

kashierez
  • 11
  • 2