James Sanders added the comment:

I recently got hit by this bug on 64-bit ubuntu 13.04, with python 3.3.1 and 
tcl/tk 8.5.13 installed from the Ubuntu repositories.  However, I tried 
building the same versions of tcl, tk, and python locally, and couldn't 
reproduce the bug.  I also built python 3.3.2 with several releases of tcl/tk.  
With 8.5.8 and earlier, I get a buffer overflow.  With 8.5.9-14 and recent 
trunk versions of tk and tcl, everything works.  With 8.6.0, I get the hang.

In the tcl/tk versions where the script works correctly, if I also have some 
tkinter code (such as instantiating a Tk and a Button) in the main process 
before the fork, then I sometimes get a crash with one of several different 
weird error messages from X, but this is very inconsistent.

The direct cause of the bug seems to be the call to Tcl_FindExecutable in 
_tkinter's initialization code, which tells tcl the path of the python 
executable, but as a side effect triggers tcl into running some initialization 
routines earlier than it would do otherwise.  Removing this call (which doesn't 
seem to have any adverse effects on my system) appears to "fix" the bug, but if 
anything else triggers tcl's initialization code before the fork (such as 
instantiating a tkinter.Tk object), the hang returns.

I'm not really sure where else to go with this.  I've attached a simplified 
python-3-compatible script displaying the problem in case someone else wants to 
have a look.

----------
nosy: +James.Sanders
versions: +Python 2.7, Python 3.3, Python 3.4 -Python 2.6
Added file: http://bugs.python.org/file31222/hanger.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5527>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to