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

2

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!

Bordelon answered 1/7, 2014 at 21:33 Comment(3)
Congrats, you've found a bug in Python or some package you use with native code. Not much you can do.Gushy
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.Devotional
You can install the debug symbol packages 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.Iatrics
U
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.

Unfreeze answered 15/5, 2017 at 11:46 Comment(0)
M
0

Had a similar issue too.

It turns out that I passed a 1D array to a numba-compiled function which takes a 2D array. :P

Modred answered 24/11, 2023 at 7:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.