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.

Author James.Sanders
Recipients James.Sanders, akineko, asvetlov, jahakala, pbwinston
Date 2013-08-10.23:05:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376175917.76.0.429880331823.issue5527@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-08-10 23:05:17James.Sanderssetrecipients: + James.Sanders, akineko, jahakala, asvetlov, pbwinston
2013-08-10 23:05:17James.Sanderssetmessageid: <1376175917.76.0.429880331823.issue5527@psf.upfronthosting.co.za>
2013-08-10 23:05:17James.Sanderslinkissue5527 messages
2013-08-10 23:05:17James.Sanderscreate