Invalid read in bzr. Reproducible: Always Steps to Reproduce: valgrind bzr Actual Results: Memcheck, a memory error detector. Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al. Using LibVEX rev 1884, a library for dynamic binary translation. Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP. Using valgrind-3.4.1, a dynamic binary instrumentation framework. Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al. For more details, rerun with: -v Invalid read of size 4 at 0x4EB9FF4: PyObject_Free (in /usr/lib64/libpython2.6.so.1.0) by 0x4E8ABCA: code_dealloc (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2BA54: load_source_module (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C861: import_submodule (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2CAF0: load_next (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2D11B: import_module_level (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2D684: PyImport_ImportModuleLevel (in /usr/lib64/libpython2.6.so.1.0) by 0x4F1034C: builtin___import__ (in /usr/lib64/libpython2.6.so.1.0) by 0x4E72FE6: PyObject_Call (in /usr/lib64/libpython2.6.so.1.0) by 0x4F10914: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython2.6.so.1.0) by 0x4F139F8: PyEval_EvalFrameEx (in /usr/lib64/libpython2.6.so.1.0) by 0x4F178F0: PyEval_EvalCodeEx (in /usr/lib64/libpython2.6.so.1.0) Address 0x5f0c020 is 208 bytes inside a block of size 568 free'd at 0x4C269DF: free (vg_replace_malloc.c:323) by 0x5AF52C8: __fopen_internal (in /lib64/libc-2.9.so) by 0x4F293B2: find_module (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C9B2: import_submodule (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2CAF0: load_next (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2D11B: import_module_level (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2D684: PyImport_ImportModuleLevel (in /usr/lib64/libpython2.6.so.1.0) by 0x4F1034C: builtin___import__ (in /usr/lib64/libpython2.6.so.1.0) by 0x4E72FE6: PyObject_Call (in /usr/lib64/libpython2.6.so.1.0) by 0x4F10914: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython2.6.so.1.0) by 0x4F139F8: PyEval_EvalFrameEx (in /usr/lib64/libpython2.6.so.1.0) by 0x4F178F0: PyEval_EvalCodeEx (in /usr/lib64/libpython2.6.so.1.0) ...and more errors. Just "bzr" does not cause segmentation faults (only shows errors when executed in Valgrind), but when I try to branch something, it always segfaults.
No problems here when branching. Please try 2.0.4.
Thank you for report, Erik. Similar bug report at ubuntu: https://bugs.launchpad.net/bzr/+bug/449372 I guess bzr-2.0.3 should work as it uses pyrex 0.9.8.5, while 2.0.1 uses 0.9.6.4. Could you try bzr-2.0.3 and report if the problem persist there? If not we'll stabilize 2.0.3 shortly.
(In reply to comment #2) > I guess bzr-2.0.3 should work as it uses pyrex 0.9.8.5, while 2.0.1 uses 0.9.6.4. Could you try bzr-2.0.3 and report if the problem persist there? If not we'll stabilize 2.0.3 shortly. Unfortunately bzr-2.0.3 also has this bug. I have dev-python/pyrex-0.9.8.5-r1 installed. There is no bzr-2.0.4 (I just synced). I tried to emerge bzr-2.1.0_beta1, but got this error: * Cannot find $EPATCH_SOURCE! Value for $EPATCH_SOURCE is: * * /usr/portage/dev-util/bzr/files/bzr-2.1-no-pyrex-citon.patch * ( bzr-2.1-no-pyrex-citon.patch )
2.0.4 does not exist, correct, it was a typo from my side and the failing patch for 2.1.0 is known.
Erik, now patch in place. Could you try bzr-2.1.0_beta4?
(In reply to comment #5) > Erik, now patch in place. Could you try bzr-2.1.0_beta4? It still fails: Invalid read of size 4 at 0x4EB8FF4: PyObject_Free (in /usr/lib64/libpython2.6.so.1.0) by 0x4E89BCA: code_dealloc (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2AA54: load_source_module (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2B861: import_submodule (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2BAF0: load_next (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C11B: import_module_level (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C684: PyImport_ImportModuleLevel (in /usr/lib64/libpython2.6.so.1.0) by 0x4F0F34C: builtin___import__ (in /usr/lib64/libpython2.6.so.1.0) by 0x4E71FE6: PyObject_Call (in /usr/lib64/libpython2.6.so.1.0) by 0x4F0F914: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython2.6.so.1.0) by 0x4F129F8: PyEval_EvalFrameEx (in /usr/lib64/libpython2.6.so.1.0) by 0x4F168F0: PyEval_EvalCodeEx (in /usr/lib64/libpython2.6.so.1.0) Address 0x5f0a020 is 544 bytes inside a block of size 568 free'd at 0x4C259DF: free (vg_replace_malloc.c:323) by 0x5AF261F: __fopen_internal (in /lib64/libc-2.10.1.so) by 0x4F283B2: find_module (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2B9B2: import_submodule (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2BAF0: load_next (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C11B: import_module_level (in /usr/lib64/libpython2.6.so.1.0) by 0x4F2C684: PyImport_ImportModuleLevel (in /usr/lib64/libpython2.6.so.1.0) by 0x4F0F34C: builtin___import__ (in /usr/lib64/libpython2.6.so.1.0) by 0x4E71FE6: PyObject_Call (in /usr/lib64/libpython2.6.so.1.0) by 0x4F0F914: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython2.6.so.1.0) by 0x4F129F8: PyEval_EvalFrameEx (in /usr/lib64/libpython2.6.so.1.0) by 0x4F168F0: PyEval_EvalCodeEx (in /usr/lib64/libpython2.6.so.1.0)
Erik, I'm unable to reproduce this problem, so could you report this issue upstream, please, and post here link? https://bugs.launchpad.net/bzr
(In reply to comment #4) > 2.0.4 does not exist, correct, it was a typo from my side Now 2.0.4 exists. I had to unmask sys-apps/portage-2.1.7.17 with ~amd64 keyword to get EAPI 4. Then I could upgrade to bzr-2.0.4. But it still fails.
(In reply to comment #7) > Erik, I'm unable to reproduce this problem, so could you report this issue > upstream, please, and post here link? https://bugs.launchpad.net/bzr https://bugs.launchpad.net/bzr/+bug/528909
Try with 2.1.0 if you can, please.
(In reply to comment #10) > Try with 2.1.0 if you can, please. We have 2.1.1 in the tree and I would like to know if it is still reproducable.
Reopen if this is still an issue for you. Thanks.
(In reply to comment #12) > Reopen if this is still an issue for you. Thanks. It still fails with version 2.1.1.
I tried to install python3.1 and change the first line of /usr/bin/bzr to "#!/usr/bin/python3" and still got a similar error: Invalid read of size 4 at 0x4EB60DE: PyObject_Realloc (in /usr/lib64/libpython3.1.so.1.0) by 0x4E86AF3: _PyBytes_Resize (in /usr/lib64/libpython3.1.so.1.0) by 0x4EDE479: PyUnicodeUCS4_EncodeUTF8 (in /usr/lib64/libpython3.1.so.1.0) by 0x4EDEC5F: _PyUnicodeUCS4_AsDefaultEncodedString (in /usr/lib64/libpython3.1.so.1.0) by 0x4EDEC96: _PyUnicode_AsStringAndSize (in /usr/lib64/libpython3.1.so.1.0) by 0x4ECC554: type_new (in /usr/lib64/libpython3.1.so.1.0) by 0x4EC0282: type_call (in /usr/lib64/libpython3.1.so.1.0) by 0x4E78A07: PyObject_Call (in /usr/lib64/libpython3.1.so.1.0) by 0x4F01061: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython3.1.so.1.0) by 0x4F0080E: builtin___build_class__ (in /usr/lib64/libpython3.1.so.1.0) by 0x4F07889: PyEval_EvalFrameEx (in /usr/lib64/libpython3.1.so.1.0) by 0x4F09590: PyEval_EvalCodeEx (in /usr/lib64/libpython3.1.so.1.0) Address 0x5f29020 is not stack'd, malloc'd or (recently) free'd Invalid read of size 4 at 0x4EB5B23: PyObject_Free (in /usr/lib64/libpython3.1.so.1.0) by 0x4E8DD6A: code_dealloc (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1E5F0: load_source_module (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1F42D: import_submodule (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1F6BD: load_next (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1FDB4: import_module_level (in /usr/lib64/libpython3.1.so.1.0) by 0x4F20334: PyImport_ImportModuleLevel (in /usr/lib64/libpython3.1.so.1.0) by 0x4F0066E: builtin___import__ (in /usr/lib64/libpython3.1.so.1.0) by 0x4E78A07: PyObject_Call (in /usr/lib64/libpython3.1.so.1.0) by 0x4F01061: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython3.1.so.1.0) by 0x4F05619: PyEval_EvalFrameEx (in /usr/lib64/libpython3.1.so.1.0) by 0x4F09590: PyEval_EvalCodeEx (in /usr/lib64/libpython3.1.so.1.0) Address 0x5f03020 is 38,376 bytes inside a block of size 40,858 free'd at 0x4C259DF: free (vg_replace_malloc.c:323) by 0x4F22A5C: PyMarshal_ReadLastObjectFromFile (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1E537: load_source_module (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1F42D: import_submodule (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1F6BD: load_next (in /usr/lib64/libpython3.1.so.1.0) by 0x4F1FDB4: import_module_level (in /usr/lib64/libpython3.1.so.1.0) by 0x4F20334: PyImport_ImportModuleLevel (in /usr/lib64/libpython3.1.so.1.0) by 0x4F0066E: builtin___import__ (in /usr/lib64/libpython3.1.so.1.0) by 0x4E78A07: PyObject_Call (in /usr/lib64/libpython3.1.so.1.0) by 0x4F01061: PyEval_CallObjectWithKeywords (in /usr/lib64/libpython3.1.so.1.0) by 0x4F05619: PyEval_EvalFrameEx (in /usr/lib64/libpython3.1.so.1.0) by 0x4F09590: PyEval_EvalCodeEx (in /usr/lib64/libpython3.1.so.1.0)
Please test dev-vcs/bzr-2.2.2-r1.