Bugs item #1166660, was opened at 2005-03-19 23:48 Message generated for change (Comment added) made by dcoder You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1166660&group_id=5470
Category: Threads Group: Platform-specific Status: Open Resolution: None Priority: 5 Submitted By: Yariv Ido (dcoder) Assigned to: Nobody/Anonymous (nobody) Summary: The readline module can cause python to segfault Initial Comment: When starting an interactive interpreter in another thread, with readline's completion functionality, there exists a race condition which causes the Python interpreter to segfault. There's a small discussion about this bug at <http://www.scipy.net/roundup/ipython/issue30>. Attached is a small proof-of-concept code. Please note that some people couldn't reproduce this on slower machines. I've managed to reproduce it on several Linux systems (Dual Xeon computers), using Python 2.3.4, 2.4 and 2.4.1c2. Thanks in advance. ---------------------------------------------------------------------- >Comment By: Yariv Ido (dcoder) Date: 2005-03-20 01:59 Message: Logged In: YES user_id=326689 I may be completely off track here, but shouldn't on_completion(...) (readline.c) use _PyOS_ReadlineTState instead of completer_tstate to restore the GIL? Also, in readline_until_enter_or_signal(...), shouldn't PyEval_SaveThread()'s return value be saved back to _PyOS_ReadlineTState? It seems that these patches manage to fix the above segmentation fault... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1166660&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com