[issue25470] Random Malloc error raised

2016-09-20 Thread STINNER Victor

STINNER Victor added the comment:

Python 3.6 got a builtin debugging tool to detect buffer under- and overflow: 
PYTHONMALLOC=debug

https://docs.python.org/dev/whatsnew/3.6.html#pythonmalloc-environment-variable

In most cases, an error in PyObject_Free() is a hint of a buffer overflow. So I 
close the issue.

--
nosy: +haypo
resolution:  -> third party
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25470] Random Malloc error raised

2015-10-27 Thread Martin Panter

Martin Panter added the comment:

Are you able to reproduce this easily? Perhaps a GDB backtrace might be useful, 
or posting instructions or code (simplified if possible) to reproduce it.

I’m guessing the Valgrind errors may be caused by the same problem that causes 
the initial assertion error.

--
nosy: +martin.panter
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25470] Random Malloc error raised

2015-10-27 Thread augustin rieunier

augustin rieunier added the comment:

I should be able to reproduce it yes.
Can't really give the code, as it's in a big program i'm working on, and it's 
never at the same place ..
One thing though: it never happened on QA/UAT environments. So it might be 
linked to something (libs, programs) on my dev environment.

Will update this with gdb data when I have some time :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25470] Random Malloc error raised

2015-10-25 Thread augustin rieunier

Changes by augustin rieunier :


--
type:  -> crash

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue25470] Random Malloc error raised

2015-10-25 Thread augustin rieunier

New submission from augustin rieunier:

Hello there, 
I face random malloc error in my code.
I recently added lots of json dumps/loads operation as I plugged my application 
with redis.

Here's the error raised, and Valgrind information right after:

127.0.0.1 - - [24/Oct/2015 15:57:44] "DELETE 
/api/private/v1.0/contentcategories/ HTTP/1.1" 404 -
python: malloc.c:2372: sysmalloc: Assertion `(old_top == (((mbinptr) (((char *) 
&((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd 
&& old_size == 0) || ((unsigned long) (old_size) >= (unsigned 
long)__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 
*(sizeof(size_t))) - 1)) & ~((2 *(sizeof(size_t))) - 1))) && ((old_top)->size & 
0x1) && ((unsigned long) old_end & pagemask) == 0)' failed.
==18768== Invalid read of size 4
==18768==at 0x55ACE1: PyObject_Free (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x52AB40: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x546605: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5BB178: _PyGC_CollectNoFail (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x566C18: PyImport_Cleanup (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469C8E: Py_Finalize (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469D82: Py_Exit (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EC0: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EDE: PyErr_PrintEx (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x47BE98: PyRun_SimpleFileExFlags (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5BF712: Py_Main (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x47E350: main (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==  Address 0x6d70020 is 1,536 bytes inside a block of size 1,568 free'd
==18768==at 0x4C2BDEC: free (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18768==by 0x5540D5: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5465F4: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5BB178: _PyGC_CollectNoFail (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x566C18: PyImport_Cleanup (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469C8E: Py_Finalize (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469D82: Py_Exit (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EC0: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EDE: PyErr_PrintEx (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x47BE98: PyRun_SimpleFileExFlags (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5BF712: Py_Main (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x47E350: main (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768== 
==18768== Invalid read of size 4
==18768==at 0x55ACE1: PyObject_Free (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x529CE6: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x553633: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x553728: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5465F4: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x5BB178: _PyGC_CollectNoFail (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x566C18: PyImport_Cleanup (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469C8E: Py_Finalize (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469D82: Py_Exit (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EC0: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x469EDE: PyErr_PrintEx (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x47BE98: PyRun_SimpleFileExFlags (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==  Address 0x7dc6020 is 144 bytes inside a block of size 224 free'd
==18768==at 0x4C2BDEC: free (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18768==by 0x553459: ??? (in 
/home/dev/Desktop/PROJ/git/api_clone/api/flask/bin/python3.4)
==18768==by 0x4B26B6: PyEval_EvalFrameEx (in