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 ned.deily
Recipients ned.deily, serhiy.storchaka
Date 2014-10-30.23:05:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The changes to tkinter tests introduced by the changes for Issue22236 (2.7 32fdaf401e50, 3.4 dd1dffe6f0d2, and default/3.5 014060738f7f) may cause Python to crash due to a Tk segfault on OS X.  The crash only shows up when using the -j option to regrtest and is dependent on other factors, e.g. 64-bit vs 32-bit and randomized address space allocations, so it is not 100% reproducible.  But it happens often enough (to me) when running the Python test suite from an installed framework location with a current Cocoa Tk 8.5.x or 8.6.x, for example, with an instance from a binary installer:

    /usr/local/bin/python3.4 -m test -w -uall -j3

The reasons for the segfault are due to an arcane bug in Tk which shows up when Tcl interpreter instances are destroyed and created within the execution of an OS X app bundle, behavior which now happens as a result of the above changes when -j > 0 is used in an OS X framework build.  There is a more detailed analysis in the Tk bug I've opened:

The bug is not one that most Tk users would run into, I think, so it's certainly not a critical bug in Tk.  But it is annoying to run into when running Python tests.  On the other hand, I'm not sure that it is worth trying to work around the problem in the tests; I think the basic idea of the Issue22236 changes is sound.

There is a relatively easy workaround if one runs into the problem: exclude the two problematic Tk tests and run them separately sequentially.

    pythonx.y -m test -w -uall -j3 -x test_tk test_ttk_guionly
    pythonx.y -m test -w -uall        test_tk test_ttk_guionly

(-m test.regrtest for Python 2.7.x)

It may be sufficient to just document the workaround here in case others run into it.
Date User Action Args
2014-10-30 23:05:44ned.deilysetrecipients: + ned.deily, serhiy.storchaka
2014-10-30 23:05:44ned.deilysetmessageid: <>
2014-10-30 23:05:44ned.deilylinkissue22770 messages
2014-10-30 23:05:44ned.deilycreate