trying to make tracebacks reproducible
Faheem Mitha
faheem at email.unc.edu
Thu Jul 1 14:11:22 CDT 2010
On Thu, 1 Jul 2010 20:21:48 +0200, Christian Ebert <blacktrash at gmx.net> wrote:
> Hi,
>
> 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.
> I'd be grateful for any ideas.
The standard technique for reproducing random errors is to set the
seed, thus 'freezing' the randomness. So, try your example for
different seeds - maybe automate the seed to vary randomly, and exit
if you get an error?
Regards, Faheem.
> c
>
>
> $ hg diff -r default
> ** unknown exception encountered, details follow
> ** report bug details to http://mercurial.selenic.com/bts/
> ** or mercurial at selenic.com
> ** Python 2.6.5 (r265:79063, May 13 2010, 09:27:41) [GCC 4.0.1 (Apple Inc. build 5493)]
> ** Mercurial Distributed SCM (version 1.5.4+190-521c8e0c93bf)
> ** Extensions loaded: keyword, mq, convert, patchbomb, graphlog, record, extdiff, color, pager, crecord
> Traceback (most recent call last):
> File "/usr/local/bin/hg", line 27, in <module>
> mercurial.dispatch.run()
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 16, in run
> sys.exit(dispatch(sys.argv[1:]))
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 34, in dispatch
> return _runcatch(u, args)
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 54, in _runcatch
> return _dispatch(ui, args)
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 483, in _dispatch
> cmdpats, cmdoptions)
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 351, in runcommand
> ret = _runcommand(ui, options, cmd, d)
> File "/usr/local/lib/python2.6/site-packages/mercurial/extensions.py", line 160, in wrap
> return wrapper(origfn, *args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/hgext/pager.py", line 95, in pagecmd
> return orig(ui, options, cmd, cmdfunc)
> File "/usr/local/lib/python2.6/site-packages/mercurial/extensions.py", line 160, in wrap
> return wrapper(origfn, *args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/hgext/color.py", line 213, in colorcmd
> return orig(ui_, opts, cmd, cmdfunc)
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 534, in _runcommand
> return checkargs()
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 488, in checkargs
> return cmdfunc()
> File "/usr/local/lib/python2.6/site-packages/mercurial/dispatch.py", line 481, in <lambda>
> d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
> File "/usr/local/lib/python2.6/site-packages/mercurial/util.py", line 408, in check
> return func(*args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/mercurial/extensions.py", line 116, in wrap
> util.checksignature(origfn), *args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/mercurial/util.py", line 408, in check
> return func(*args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/hgext/mq.py", line 2791, in mqcommand
> return orig(ui, repo, *args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/mercurial/util.py", line 408, in check
> return func(*args, **kwargs)
> File "/usr/local/lib/python2.6/site-packages/mercurial/commands.py", line 1452, in diff
> cmdutil.diffordiffstat(ui, repo, diffopts, node1, node2, m, stat=stat)
> File "/usr/local/lib/python2.6/site-packages/mercurial/cmdutil.py", line 677, in diffordiffstat
> changes, diffopts):
> File "/usr/local/lib/python2.6/site-packages/mercurial/patch.py", line 1492, in difflabel
> for chunk in func(*args, **kw):
> File "/usr/local/lib/python2.6/site-packages/mercurial/patch.py", line 1449, in diff
> changes = repo.status(ctx1, ctx2, match=match)
> File "/usr/local/lib/python2.6/site-packages/mercurial/localrepo.py", line 1088, in status
> mf2.set(f, ctx2.flags(f))
> File "/usr/local/lib/python2.6/site-packages/mercurial/context.py", line 737, in flags
> flag = findflag(self._parents[0])
> File "/usr/local/lib/python2.6/site-packages/mercurial/context.py", line 731, in findflag
> ff = self._repo.dirstate.flagfunc(lambda x: flag or '')
> File "/usr/local/lib/python2.6/site-packages/mercurial/dirstate.py", line 131, in flagfunc
> if self._checklink:
> File "/usr/local/lib/python2.6/site-packages/mercurial/util.py", line 163, in __get__
> result = self.func(obj)
> File "/usr/local/lib/python2.6/site-packages/mercurial/dirstate.py", line 115, in _checklink
> return util.checklink(self._root)
> File "/usr/local/lib/python2.6/site-packages/mercurial/util.py", line 697, in checklink
> name = tempfile.mktemp(dir=path, prefix='hg-checklink-')
> File "/usr/local/lib/python2.6/site-packages/mercurial/demandimport.py", line 75, in __getattribute__
> self._load()
> File "/usr/local/lib/python2.6/site-packages/mercurial/demandimport.py", line 47, in _load
> mod = _origimport(head, globals, locals)
> File "/sw/lib/python2.6/tempfile.py", line 34, in <module>
> from random import Random as _Random
> File "/usr/local/lib/python2.6/site-packages/mercurial/demandimport.py", line 106, in _demandimport
> mod = _origimport(name, globals, locals)
> File "/sw/lib/python2.6/random.py", line 59, in <module>
> LOG4 = _log(4.0)
> ValueError: math domain error
>
More information about the Mercurial-devel
mailing list