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 vstinner
Recipients Arfrever, gpolo, nadeem.vawda, terry.reedy, vstinner
Date 2012-09-18.22:23:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348007000.45.0.0899037648778.issue13888@psf.upfronthosting.co.za>
In-reply-to
Content
"python: ../../src/xcb_io.c:273: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed."

I get a similar XCB assertion error:
"xcb_io.c:221: poll_for_event: Assertion `(((long) (event_sequence) - (long) (dpy->request)) <= 0)' failed."

The problem is that a Tk thread is still alive while test_builtins is running. XInitThreads() must be the first call to the Xlib for multithreaded applications.

Extract of:
https://groups.google.com/forum/#!msg/comp.lang.tcl/gFcxwy9TxLc/drmHzhvM9YQJ

"3. Tk's thread support for unix/X11 is iffy.  There has been work done 
on making Tk thread safe, but Tk still doesn't call XInitThreads(), and 
probably won't anytime soon.  It seems that the XCB library has a 
superior implementation for threaded X11 interfaces anyway, so a 
complete rewrite would make more sense (to me).  Tk however can be used 
with threaded builds, and multiple threads, but only with a single 
thread using [package require Tk] as I understand it."

The correct fix is maybe to stop properly the Tk thread. (Example: Run test_tk in a subprocess? Call tk.quit()?)
History
Date User Action Args
2012-09-18 22:23:20vstinnersetrecipients: + vstinner, terry.reedy, nadeem.vawda, gpolo, Arfrever
2012-09-18 22:23:20vstinnersetmessageid: <1348007000.45.0.0899037648778.issue13888@psf.upfronthosting.co.za>
2012-09-18 22:23:19vstinnerlinkissue13888 messages
2012-09-18 22:23:19vstinnercreate