trying to make tracebacks reproducible

Christian Ebert blacktrash at gmx.net
Fri Jul 2 06:15:12 CDT 2010


* Martin Geisler on Friday, July 02, 2010 at 11:36:53 +0200
> Christian Ebert <blacktrash at gmx.net> writes:
> 
>> * Martin Geisler on Thursday, July 01, 2010 at 23:33:24 +0200
>>> Christian Ebert <blacktrash at gmx.net> writes:
>>>> Since a few days -- sorry for being vague, but this is actually
>>>> part of the problem, I _sometimes_ get tracebacks with
>>>> crew-stable (basically 1.6 I'd say). I cannot reproduce them
>>>> "reliably", i.e. in the following example, I reissued the command
>>>> and got the diff as expected. I can reduce the loaded extensions
>>>> etc. but I'd like to reproduce this reliably first. It seems to
>>>> happen at random - well, in the true sense of the word, if you
>>>> look at the final lines of the traceback.
>>> 
>>> Heh, nice one :-)
>>> 
>>>> I'd be grateful for any ideas.
>>> 
>>>>   mod = _origimport(name, globals, locals)
>>>> File "/sw/lib/python2.6/random.py", line 59, in <module>
>>>>   LOG4 = _log(4.0)
>>>> ValueError: math domain error
>>> 
>>> Can you make it fail if you do something like
>>> 
>>>  while python -c 'import random; print random.LOG4'; do done
>> 
>> That's evil!
>> 
>> Yes, I can/could. After rebooting the problem has gone away. Probably
>> I overtortured my machine with multithreaded video conversion. Well,
>> let's hope this is not a sign of senility - of the machine I mean.
> 
> Poor machine :-)

Processes:  71 total, 3 running, 68 sleeping... 234 threads             13:08:53
Load Avg:  1.42,  1.18,  0.63    CPU usage: 74.88% user,  2.46% sys, 22.66% idle
PhysMem:  477M wired,  625M active, 1274M inactive, 2382M used, 1714M free.
VM: 50G + 0   39216(0) pageins, 0(0) pageouts

  PID COMMAND      %CPU   TIME   #TH #PRTS #MREGS RPRVT  RSHRD  RSIZE  VSIZE
 1296 mencoder   149.6%  8:41.66   5    48      0     0      0    54M   666M
[...]

Perhaps a mencoder/x264 (threading) problem, I just could
reproduce it again. This did not use to happen though.

>>> The error looks quite strange to me -- there should be nothing fishy
>>> about taking the natural logarithm of 4.0 :-)
>> 
>> And now, additionally, I have to read up on what a natural
>> logarithm is. Things like that do not come naturally to me.
> 
> Heh, I get it :-) It's a logarithm with the number e as the base:
> 
>>>> import math
>>>> math.e
>  2.7182818284590451
>>>> math.log(4)
>  1.3862943611198906
>>>> math.e**math.log(4)
>  3.9999999999999996

Thanks. Unfortunately I have to start with things like:
https://secure.wikimedia.org/wikipedia/en/wiki/Logarithm
;-)

c
-- 
Wer auf sein Elend tritt, steht höher.
_HÖLDERLIN: H Y P E R I O N_  --->> http://www.blacktrash.org/hyperion/


More information about the Mercurial-devel mailing list