This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: pydoc -k zip throws segmentation fault
Type: Stage:
Components: None Versions: Python 2.7
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: ned.deily, pitrou, r.david.murray, shank
Priority: normal Keywords:

Created on 2012-06-24 23:44 by shank, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg163875 - (view) Author: Shanker (shank) Date: 2012-06-24 23:44
user@test:~/learn/python$ pydoc -k zip
zipimport - zipimport provides support for importing Python modules from Zip archives.
gzip - Functions that read and write gzipped files.
lib2to3.fixes.fix_itertools - Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and
lib2to3.fixes.fix_itertools_imports - Fixer for imports of itertools.(imap|ifilter|izip|ifilterfalse)
lib2to3.fixes.fix_zip - Fixer that changes zip(seq0, seq1, ...) into list(zip(seq0, seq1, ...)
zipfile - Read and write ZIP files.

** (python2.7:2599): CRITICAL **: pyg_register_boxed: assertion `boxed_type != 0' failed
Segmentation fault (core dumped)
user@test:~/learn/python$ 

user@test:~/learn/python$ uname -a
Linux govinda 3.2.0-24-generic #39-Ubuntu SMP Mon May 21 16:52:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
user@test:~/learn/python$
msg163880 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-25 00:51
This works fine for me.  It is almost certain to be a case of something on your pythonpath crashing when pydoc imports it while looking for things that match the keyword.  There is unfortunately no way to bullet proof pydoc against this.
msg163881 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2012-06-25 01:21
Which version of Python 2.7.x are you running?  If it is less than Python 2.7.3, this is likely a duplicate of Issue7425, the fix for which improved the robustness of pydoc -k as of 2.7.3.
msg163882 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-06-25 01:34
Ned: since it is a core dump, I doubt the patch for ignoring exceptions during import will fix this.  Note that 'pyg_register_boxed' is not a string that appears in the python source, so it is pretty certainly a third party extension module that is segfaulting the interpreter.  

The following ubuntu bug appears to be relevant: https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/896836
msg195952 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2013-08-23 08:25
Yeah, pydoc will walk and import all installed Python modules, which may trigger various kinds of issues with buggy third-party stuff.

Note that in 2.x, extension modules compiled with different fundamental options (such as debug/non-debug) aren't differentiated, which may the be cause of the present issue.
History
Date User Action Args
2022-04-11 14:57:32adminsetgithub: 59380
2013-08-23 08:25:05pitrousetstatus: pending -> closed

nosy: + pitrou
messages: + msg195952

resolution: rejected
2013-08-21 19:18:23serhiy.storchakasetstatus: open -> pending
2012-06-25 01:35:00r.david.murraysetmessages: + msg163882
2012-06-25 01:21:31ned.deilysetnosy: + ned.deily
messages: + msg163881
2012-06-25 00:51:59r.david.murraysetnosy: + r.david.murray
messages: + msg163880
2012-06-24 23:44:48shankcreate