Filipp Andjelo added the comment:
Ok, the race condition seems not to be the real problem, since the patches
didn't help. Don't want to do any assumptions anymore, but it seems like the
python objects memory is deallocated before the sqlite connection was closed.
The thing is, that this problem appears only on very heavy load with 40
parallel python processes and overall memory consumption of more than 240GiB.
This high number is due to deactivated GC on our side, due to performance
problems, we call it once the complete work is done. Unfortunately, I can't
reproduce this error in "small", but here is the crash report (the crash comes
from different parts of free(), sometimes with double free, sometimes invalid
pointer or similar):
*** glibc detected ***
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python: free(): invalid next
size (normal): 0x058b72b0 ***
=== Backtrace: =
/lib64/libc.so.6[0x36e6275f4e]
/lib64/libc.so.6[0x36e6278cf0]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x23918)[0x7f785100a918]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(sqlite3_free+0x63)[0x7f785100b6b6]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x3193d)[0x7f785101893d]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x31a93)[0x7f7851018a93]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x31e6d)[0x7f7851018e6d]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x32735)[0x7f7851019735]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x3115d)[0x7f785101815d]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x3119e)[0x7f785101819e]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x33df2)[0x7f785101adf2]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x36441)[0x7f785101d441]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0x40e21)[0x7f7851027e21]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0xbbddf)[0x7f78510a2ddf]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(+0xbbcff)[0x7f78510a2cff]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(sqlite3_close+0x1d)[0x7f78510a2d23]
/share/nds-buildtools/python/python-3.4.2-64_5/lib/python3.4/lib-dynload/_sqlite3.cpython-34m.so(pysqlite_connection_close+0x79)[0x7f7851002af9]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x64e3)[0x4c52e3]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x6e38)[0x4c5c38]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x6e38)[0x4c5c38]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x6e38)[0x4c5c38]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x6e38)[0x4c5c38]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalFrameEx+0x6e38)[0x4c5c38]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalCodeEx+0x8a7)[0x4c72a7]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyEval_EvalCode+0x3b)[0x4c736b]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python[0x4e7c61]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyRun_FileExFlags+0x115)[0x4e9a85]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(PyRun_SimpleFileExFlags+0xfa)[0x4eb2ea]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(Py_Main+0xa74)[0x41d8e4]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python(main+0x155)[0x41a465]
/lib64/libc.so.6(__libc_start_main+0xfd)[0x36e621ed5d]
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python[0x41a249]
=== Memory map:
0040-005fe000 r-xp 00:1a 491451
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python3.4
007fd000-00857000 rw-p 001fd000 00:1a 491451
/share/nds-buildtools/python/python-3.4.2-64_5/bin/python3.4
00857000-00872000 rw-p 00:00 0
00c84000-0dd92000 rw-p 00:00 0 [heap]
36e5e0-36e5e2 r-xp fd:00 2964
/lib64/ld-2.12.so
36e601f000-36e602 r--p 0001f000 fd:00 2964
/lib64/ld-2.12.so
36e602-36e6021000 rw-p 0002 fd:00 2964
/lib64/ld-2.12.so
36e6021000-36e6022000 rw-p 00:00 0
36e620-36e638a000 r-xp fd:00 3884