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.

classification
Title: tkinter's 'after' and 'threads' on multiprocessor
Type: Stage:
Components: Tkinter Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: loewis Nosy List: drewp, loewis, zoranbosnjak
Priority: normal Keywords:

Created on 2003-10-09 13:15 by zoranbosnjak, last changed 2022-04-10 16:11 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
testfile1 zoranbosnjak, 2003-10-09 13:15 simple testfile that produces a bug
Messages (4)
msg18589 - (view) Author: Zoran Bosnjak (zoranbosnjak) Date: 2003-10-09 13:15
I have attached simple testfile which works fine on
single processor machine, but it does not work on
multiprocessor machine (dual XEON - HT 2x 2.4GHz,
python 2.1.1 (or python 2.2), RedHat 9.0 distr.,
linux-kernel 2.4.20-20-9smp).
At the moment I can not tell where the problem is. It
could be 
- in python core,
- in threading module
- in tkinter, TCL, Tk
- in linux kernel
Problem description:
- I use tkinter's (Tk's) after method for periodic calls
- I also start a few dummy threads which have nothong
to do with tkinter.
- (see the attached file)
- After a while, one or more threads stop running and
'after' method stops working (they simply block). The
situation is different each time I run the script. The
problem is random and probability raises with number of
threads. Normaly the problem occours after a few
seconds with 8 threads.
I am willing to run additional tests if someone has any
idea where to start debugging.
regards,
Zoran Bosnjak
msg18590 - (view) Author: Drew Perttula (drewp) Date: 2003-10-13 07:59
Logged In: YES 
user_id=127598

The given test program works for me on a dual AMD 1400MHz with
py2.2.2 and linux 2.4.19. By 'works', I mean that after
60sec, the
program is still outputting spurts like this:

8 1066031758.16
5 1066031758.16
1 1066031758.16
7 1066031758.16
3 1066031758.16
6 1066031758.16
4 1066031758.16
2 1066031758.21

I am also available for running additional tests. My email is
drewp at big asterisk .com less the spaces.
msg18591 - (view) Author: Drew Perttula (drewp) Date: 2003-10-13 19:28
Logged In: YES 
user_id=127598

I forgot to show the after loop's output, which appears in
random
positions among the other threads' output. The more complete
version of the output I see looks like this:

3 1066073253.53
1066073253.53
1066073253.53
7 4 1066073253.53
5 1066073253.53
1 1066073253.53
6 1066073253.53
2 1066073253.58
8 1066073253.85
1066073254.03
1 1066073254.03
2 1066073254.03
5 1066073254.03

So, no bug confirmation yet.
msg18592 - (view) Author: Zoran Bosnjak (zoranbosnjak) Date: 2003-10-14 13:29
Logged In: YES 
user_id=583469

I couldn't reproduce this bug under python2.3.2 any more
(with the same testprogram). 
History
Date User Action Args
2022-04-10 16:11:40adminsetgithub: 39389
2003-10-09 13:15:19zoranbosnjakcreate