[Bug 5130] New: repo corruption using pure
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Tue Mar 8 13:11:20 UTC 2016
https://bz.mercurial-scm.org/show_bug.cgi?id=5130
Bug ID: 5130
Summary: repo corruption using pure
Product: Mercurial
Version: 3.7.1
Hardware: PC
OS: Linux
Status: UNCONFIRMED
Severity: bug
Priority: wish
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: timeless at gmail.com
CC: mercurial-devel at selenic.com
(py)[timeless at gcc2-power8 tests]$ echo py > ../mercurial/modulepolicy
(py)[timeless at gcc2-power8 tests]$ ./run-tests.py -l --runs-per-test=10
test-commit-1000-pure.t
..
--- tests/test-commit-1000-pure.t
+++ tests/test-commit-1000-pure.t.err
@@ -7,3 +7,57 @@
... fh.write(str(''))
$ hg -q commit -A -m '1000 files'
$ hg st f
+ ** unknown exception encountered, please report by visiting
+ ** https://mercurial-scm.org/wiki/BugTracker
+ ** Python 2.7.8 (default, Jul 8 2015, 18:13:08) [GCC 4.9.2 20150212 (Red
Hat 4.9.2-6)]
+ ** Mercurial Distributed SCM (version 3.7.2+345-7c21b7f1e223)
+ ** Extensions loaded:
+ Traceback (most recent call last):
+ File "hg", line 43, in <module>
+ mercurial.dispatch.run()
+ File "mercurial/dispatch.py", line 54, in run
+ sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
+ File "mercurial/dispatch.py", line 120, in dispatch
+ ret = _runcatch(req)
+ File "mercurial/dispatch.py", line 191, in _runcatch
+ return _dispatch(req)
+ File "mercurial/dispatch.py", line 908, in _dispatch
+ cmdpats, cmdoptions)
+ File "mercurial/dispatch.py", line 676, in runcommand
+ ret = _runcommand(ui, options, cmd, d)
+ File "mercurial/dispatch.py", line 1039, in _runcommand
+ return checkargs()
+ File "mercurial/dispatch.py", line 999, in checkargs
+ return cmdfunc()
+ File "mercurial/dispatch.py", line 905, in <lambda>
+ d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
+ File "mercurial/util.py", line 992, in check
+ return func(*args, **kwargs)
+ File "mercurial/commands.py", line 6456, in status
+ opts.get('subrepos'))
+ File "mercurial/localrepo.py", line 1815, in status
+ listsubrepos)
+ File "mercurial/context.py", line 351, in status
+ listunknown)
+ File "mercurial/context.py", line 1620, in _buildstatus
+ s = self._dirstatestatus(match, listignored, listclean, listunknown)
+ File "mercurial/context.py", line 1593, in _dirstatestatus
+ modified2, fixup = self._checklookup(cmp)
+ File "mercurial/context.py", line 1538, in _checklookup
+ if (f not in pctx or self.flags(f) != pctx.flags(f)
+ File "mercurial/context.py", line 87, in __contains__
+ return key in self._manifest
+ File "mercurial/util.py", line 724, in __get__
+ result = self.func(obj)
+ File "mercurial/context.py", line 531, in _manifest
+ return self._repo.manifest.read(self._changeset[0])
+ File "mercurial/manifest.py", line 1012, in read
+ text = self.revision(node)
+ File "mercurial/revlog.py", line 1207, in revision
+ text = mdiff.patches(text, bins)
+ File "mercurial/pure/mpatch.py", line 88, in patches
+ pull([], frags, p2 - p1) # what got deleted
+ File "mercurial/pure/mpatch.py", line 60, in pull
+ f = src.pop()
+ IndexError: pop from empty list
+ [1]
ERROR: test-commit-1000-pure.t output changed
!
...
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
Failed test-commit-1000-pure.t: output changed
# Ran 10 tests, 0 skipped, 0 warned, 8 failed.
python hash seed: 1320538841
(py)[timeless at gcc2-power8 tests]$ cat test-commit-1000-pure.t
$ hg init
$ touch f
$ hg -q commit -A -m initial
$ hg st f
>>> for i in range(1000):
... with open(str(i), 'wb') as fh:
... fh.write(str(''))
$ hg -q commit -A -m '1000 files'
$ hg st f
(py)[timeless at gcc2-power8 tests]$ hg version
Mercurial Distributed SCM (version 3.7.2+345-7c21b7f1e223)
(see https://mercurial-scm.org for more information)
Copyright (C) 2005-2016 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Run again, the results are:
# Ran 10 tests, 0 skipped, 0 warned, 6 failed.
python hash seed: 4110993643
I generally get about a 50% failure rate (the 100% above was surprising)
This is using 7c21b7f1e2233ea8d88bcbba9dcee58de7f2e375 to manage the module
policy.
But you can use 9974b8236cac (current default/default) and get the same result
if you apply this change:
diff --git a/mercurial/__init__.py b/mercurial/__init__.py
--- a/mercurial/__init__.py
+++ b/mercurial/__init__.py
@@ -23,7 +23,7 @@ modulepolicy = '@MODULELOADPOLICY@'
# By default, require the C extensions for performance reasons.
if modulepolicy == '@' 'MODULELOADPOLICY' '@':
- modulepolicy = 'c'
+ modulepolicy = 'py'
# PyPy doesn't load C extensions.
#
I originally hit this while running test-clone-uncompressed.t, and these are
the files that seemed interesting when I compared py and c modulepolicy:
Files /tmp/hgtests.bazMWR/child1/test-clone-uncompressed.t/server/.hg/dirstate
and /tmp/hgtests.8qhtQ5/child1/test-clone-uncompressed.t/server/.hg/dirstate
differ
Files
/tmp/hgtests.bazMWR/child1/test-clone-uncompressed.t/server/.hg/store/00manifest.i
and
/tmp/hgtests.8qhtQ5/child1/test-clone-uncompressed.t/server/.hg/store/00manifest.i
differ
Files
/tmp/hgtests.bazMWR/child1/test-clone-uncompressed.t/server/.hg/store/fncache
and
/tmp/hgtests.8qhtQ5/child1/test-clone-uncompressed.t/server/.hg/store/fncache
differ
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list