On 2017-10-23 14:23, Karsten Hilbert wrote: > On Sat, Oct 21, 2017 at 09:31:54AM +0200, dieter wrote: > >> It points to a memory corruption. > > While running valgrind and friends is beyond my capabilitis I > have run the problem through gdb to at least obtain a stack > trace to see what gives:
I wouldn't read too much into that. You know that somehow some memory got corrupted. You know at which point Python trips over the error - but that doesn't really tell you anything about how the memory initially got corrupted. > > ... > ==> verifying target database schema ... > ==> checking migrated data for plausibility ... > Done bootstrapping GNUmed database: We very likely succeeded. > log: > /home/ncq/Projekte/gm-git/gnumed/gnumed/server/bootstrap/bootstrap-latest.log > Debug memory block at address p=0x6aab7c: API '' > 0 bytes originally requested > The 3 pad bytes at p-3 are not all FORBIDDENBYTE (0xfb): > at p-3: 0x33 *** OUCH > at p-2: 0x47 *** OUCH > at p-1: 0x00 *** OUCH > Because memory is corrupted at the start, the count of bytes > requested > may be bogus, and checking the trailing pad bytes may segfault. > The 4 pad bytes at tail=0x6aab7c are not all FORBIDDENBYTE (0xfb): > at tail+0: 0x00 *** OUCH > at tail+1: 0x00 *** OUCH > at tail+2: 0x00 *** OUCH > at tail+3: 0x00 *** OUCH > The block was made by call #0 to debug malloc/realloc. > Fatal Python error: bad ID: Allocated using API '', verified using API > 'o' > > Program received signal SIGABRT, Aborted. > 0xb7fd9ce9 in __kernel_vsyscall () > (gdb) bt > #0 0xb7fd9ce9 in __kernel_vsyscall () > #1 0xb7d6edd0 in __libc_signal_restore_set (set=0xbfffed40) at > ../sysdeps/unix/sysv/linux/nptl-signals.h:79 > #2 __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:48 > #3 0xb7d70297 in __GI_abort () at abort.c:89 > #4 0x0055fb74 in Py_FatalError (msg=0xbfffefec "bad ID: Allocated > using API '\037', verified using API 'o'") at ../Python/pythonrun.c:1700 > #5 0x00499adb in _PyObject_DebugCheckAddressApi (api=111 'o', > p=0x6aab7c <_Py_ZeroStruct>) at ../Objects/obmalloc.c:1640 > #6 0x004997a5 in _PyObject_DebugFreeApi (api=111 'o', p=0x6aab7c > <_Py_ZeroStruct>) at ../Objects/obmalloc.c:1527 > #7 0x0049964f in _PyObject_DebugFree (p=0x6aab7c <_Py_ZeroStruct>) at > ../Objects/obmalloc.c:1471 > #8 0x00471043 in int_dealloc (v=0x6aab7c <_Py_ZeroStruct>) at > ../Objects/intobject.c:139 > #9 0x00497bee in _Py_Dealloc (op=False) at ../Objects/object.c:2262 > #10 0x00489bad in dict_dealloc (mp=0xb7888f34) at > ../Objects/dictobject.c:1085 > Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't > decode bytes in position 1-2: unexpected end of data: > #11 0x00497bee in _Py_Dealloc (op=) at ../Objects/object.c:2262 > Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't > decode bytes in position 1-2: unexpected end of data: > #12 0x004b9ab7 in subtype_dealloc (self=) at > ../Objects/typeobject.c:1035 > Python Exception <class 'UnicodeDecodeError'> 'utf-8' codec can't > decode bytes in position 1-2: unexpected end of data: > #13 0x00497bee in _Py_Dealloc (op=) at ../Objects/object.c:2262 > #14 0x0044dc7a in instancemethod_dealloc (im=0xb78984b4) at > ../Objects/classobject.c:2388 > #15 0x00497bee in _Py_Dealloc (op=<instancemethod at remote > 0xb78984b4>) at ../Objects/object.c:2262 > #16 0x004885d7 in insertdict_by_entry (mp=0xb78880d4, key='_shutdown', > hash=598970216, ep=0x88d6d4, value=None) at ../Objects/dictobject.c:519 > #17 0x00488857 in insertdict (mp=0xb78880d4, key='_shutdown', > hash=598970216, value=None) at ../Objects/dictobject.c:556 > #18 0x0048910f in dict_set_item_by_hash_or_entry ( > op={'current_thread': <function at remote 0xb78a28f4>, > '_BoundedSemaphore': None, 'currentThread': <function at remote 0xb78a28f4>, > '_Timer': None, '_format_exc': None, 'Semaphore': <function at remote > 0xb789b6c4>, '_deque': None, 'activeCount': <function at remote 0xb78a2a34>, > '_profile_hook': None, '_sleep': None, '_trace_hook': None, 'ThreadError': > <type at remote 0xb784c034>, '_enumerate': None, '_start_new_thread': None, > 'BoundedSemaphore': <function at remote 0xb789ba34>, '_shutdown': None, > '__all__': ['activeCount', 'active_count', 'Condition', 'currentThread', > 'current_thread', 'enumerate', 'Event', 'Lock', 'RLock', 'Semaphore', > 'BoundedSemaphore', 'Thread', 'Timer', 'setprofile', 'settrace', 'local', > 'stack_size'], '_Event': <type at remote 0xb789e034>, 'active_count': > <function at remote 0xb78a2a34>, '__package__': None, '_Condition': <type at > remote 0xb784c9e4>, '_RLock': <type at remote 0xb784c7f4>, '_test': <function > at remote 0xb78a2b74>, 'local': <type at remote 0 > x6fd420>, '__doc__': "Thread modul...(truncated), key='_shutdown', > hash=598970216, ep=0x0, value=None) at ../Objects/dictobject.c:795 > #19 0x00489285 in PyDict_SetItem ( > op={'current_thread': <function at remote 0xb78a28f4>, > '_BoundedSemaphore': None, 'currentThread': <function at remote 0xb78a28f4>, > '_Timer': None, '_format_exc': None, 'Semaphore': <function at remote > 0xb789b6c4>, '_deque': None, 'activeCount': <function at remote 0xb78a2a34>, > '_profile_hook': None, '_sleep': None, '_trace_hook': None, 'ThreadError': > <type at remote 0xb784c034>, '_enumerate': None, '_start_new_thread': None, > 'BoundedSemaphore': <function at remote 0xb789ba34>, '_shutdown': None, > '__all__': ['activeCount', 'active_count', 'Condition', 'currentThread', > 'current_thread', 'enumerate', 'Event', 'Lock', 'RLock', 'Semaphore', > 'BoundedSemaphore', 'Thread', 'Timer', 'setprofile', 'settrace', 'local', > 'stack_size'], '_Event': <type at remote 0xb789e034>, 'active_count': > <function at remote 0xb78a2a34>, '__package__': None, '_Condition': <type at > remote 0xb784c9e4>, '_RLock': <type at remote 0xb784c7f4>, '_test': <function > at remote 0xb78a2b74>, 'local': <type at remote 0 > x6fd420>, '__doc__': "Thread modul...(truncated), key='_shutdown', > value=None) at ../Objects/dictobject.c:848 > #20 0x00492758 in _PyModule_Clear (m=<module at remote 0xb7892364>) at > ../Objects/moduleobject.c:125 > #21 0x0054a33b in PyImport_Cleanup () at ../Python/import.c:530 > #22 0x0055c53c in Py_Finalize () at ../Python/pythonrun.c:458 > #23 0x0055fe9c in Py_Exit (sts=0) at ../Python/pythonrun.c:1783 > #24 0x0055e0fc in handle_system_exit () at ../Python/pythonrun.c:1151 > #25 0x0055e152 in PyErr_PrintEx (set_sys_last_vars=1) at > ../Python/pythonrun.c:1161 > #26 0x0055dd5b in PyErr_Print () at ../Python/pythonrun.c:1064 > #27 0x0055d61f in PyRun_SimpleFileExFlags (fp=0x7ee010, > filename=0xbffff7e6 "./bootstrap_gm_db_system.py", closeit=1, > flags=0xbffff4f4) at ../Python/pythonrun.c:952 > #28 0x0055cc4e in PyRun_AnyFileExFlags (fp=0x7ee010, > filename=0xbffff7e6 "./bootstrap_gm_db_system.py", closeit=1, > flags=0xbffff4f4) at ../Python/pythonrun.c:752 > #29 0x00577cb0 in Py_Main (argc=5, argv=0xbffff684) at > ../Modules/main.c:645 > #30 0x004259c8 in main (argc=5, argv=0xbffff684) at > ../Modules/python.c:20 > (gdb) quit > A debugging session is active. > > Inferior 1 [process 32024] will be killed. > > Quit anyway? (y or n) y > Dropping obsoleted staging database gnumed_v2 ... > (you may need to provide the password for root) > Dropping obsoleted staging database gnumed_v3 ... > ... > > Vague hints from the above might suggest that I go look for > whether I do have a second thread and where improperly formed > unicode data might come from. > > Karsten > -- https://mail.python.org/mailman/listinfo/python-list