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 mark.dickinson
Recipients chuck, mark.dickinson, ned.deily, ronaldoussoren
Date 2009-10-04.12:43:29
SpamBayes Score 1.6080914e-11
Marked as misclassified No
Message-id <1254660212.05.0.533173459281.issue7042@psf.upfronthosting.co.za>
In-reply-to
Content
I'm seeing this failure too, on a 64-bit build of the trunk on OS X 
10.6.1.

If I understand the test, it's setting up a timer that's supposed to run 
for 0.3 seconds of 'virtual time', signal, and then signal every 0.2 
seconds of virtual time thereafter.  The test passes after 4 (or is it 3?) 
signals have been handled, for a total of 0.9 seconds of virtual time.

The problem appears to be that the 'for i in xrange(100000000): ...' loop 
simply isn't long enough for 0.9 seconds of virtual time to even elapse:  
on my machine, around 0.06 seconds of virtual time appear to have elapsed 
by the time the loop is finished.

When I increase the loop to 'for i in xrange(10**10): ...', the test 
*eventually* passes.  Those 0.9 seconds of virtual time took over 29 
minutes of real time, on an otherwise mostly-idle machine.  (2.53GHz Core 
2 Duo.)

When I add some actual work into the xrange loop (computing pow(12345, 
67890, 10000001) and throwing away the result) then test_itimer_virtual 
passes, in a reasonably short amount of time (a second or so).

I don't know what the precise definition of virtual time is, or whether 
there's a defect in the way that Snow Leopard is measuring it.  At any 
rate, I don't think the reported behaviour is a bug in the signal module:  
the test should be fixed somehow, though (perhaps by adding that pow() 
call).
History
Date User Action Args
2009-10-04 12:43:32mark.dickinsonsetrecipients: + mark.dickinson, ronaldoussoren, ned.deily, chuck
2009-10-04 12:43:32mark.dickinsonsetmessageid: <1254660212.05.0.533173459281.issue7042@psf.upfronthosting.co.za>
2009-10-04 12:43:30mark.dickinsonlinkissue7042 messages
2009-10-04 12:43:29mark.dickinsoncreate