Project

General

Profile

Bug #5570

Remap repositories always fail in RhodeCode community

Added by Thiet Pham Van 2 months ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
04.10.2019
Due date:
% Done:

0%

Estimated time:
Sorting:
Commit Number:
Affected Version:

Description

I have many git repos and hg repos in /media/data/repos folder that was set in Main Storage Location, when I copy a existing repo to it I will run Remap and Rescan to rescan our repos but it always failed.

community.log

return self._get_instance(cache=bool(cache), config=config)
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/model/db.py", line 2489, in _get_instance
    repo.count()  # cache rebuild
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/base.py", line 468, in count
    return len(self.commit_ids)
  File "/opt/rhodecode/store/rq6n4kdw9z8d44km9njnr5rxxyh01p4h-python2.7-zope.cachedescriptors-4.3.1/lib/python2.7/site-packages/zope/cachedescriptors/property.py", line 53, in __get__
    value = func(inst)
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/repository.py", line 103, in commit_ids
    commit_ids = self._get_all_commit_ids()
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/hg/repository.py", line 242, in _get_all_commit_ids
    return self._remote.get_all_commit_ids('visible')
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/client_http.py", line 130, in f
    return self._call(name, *args, **kwargs)
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/client_http.py", line 152, in _call_with_logging
    return RemoteRepo._call(self, name, *args, **kwargs)
  File "/opt/rhodecode/store/wrn4w4gzarahd4k877nxa8cz1a5ifz91-python2.7-rhodecode-enterprise-ce-4.17.3/lib/python2.7/site-packages/rhodecode/lib/vcs/exceptions.py", line 223, in wrapper
    raise _EXCEPTION_MAP[kind](*args)
UnhandledException: index 00changelog.i is corrupted
2019-10-04 17:08:59.003 [6358] INFO  [rhodecode.lib.middleware.request_wrapper] IP: 127.0.0.1 POST Request to /_admin/settings/mapping/update time: 63.002s [Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0]

vcsserver.log

2019-10-04 17:08:58.646 [<6212>  ] GNCRN 127.0.0.1       rqt:0.012962 200 51     "POST:/hg " usr:- "-" "PycURL/7.43.0.2 libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11 libssh2/1.8.0 nghttp2/1.24.0"
2019-10-04 17:08:58.765 [6212] DEBUG [vcsserver.http_main] method called:localrepository with kwargs:{} context_uid: 89fbed5b-bd8c-493b-a879-eb38906de30e
2019-10-04 17:08:58.773 [6212] INFO  [vcsserver.tweens] IP: 127.0.0.1 Request to path: `/hg` time: 0.009s
2019-10-04 17:08:58.774 [<6212>  ] GNCRN 127.0.0.1       rqt:0.009934 200 51     "POST:/hg " usr:- "-" "PycURL/7.43.0.2 libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11 libssh2/1.8.0 nghttp2/1.24.0"
2019-10-04 17:08:58.778 [6212] DEBUG [vcsserver.http_main] method called:get_all_commit_ids with kwargs:{} context_uid: 89fbed5b-bd8c-493b-a879-eb38906de30e
2019-10-04 17:08:58.797 [6212] ERROR [vcsserver.hg] Unhandled exception in hg remote call
Traceback (most recent call last):
  File "/opt/rhodecode/store/gw4159sv035nv616qkpc7m5vhhf9asn8-python2.7-rhodecode-vcsserver-4.17.3/lib/python2.7/site-packages/vcsserver/hg.py", line 103, in wrapper
    return func(*args, **kwargs)
  File "/opt/rhodecode/store/gw4159sv035nv616qkpc7m5vhhf9asn8-python2.7-rhodecode-vcsserver-4.17.3/lib/python2.7/site-packages/vcsserver/hg.py", line 536, in get_all_commit_ids
    revs = map(lambda x: hex(x[7]), repo.changelog.index)
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/repoview.py", line 213, in changelog
    unfichangelog = unfi.changelog
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/localrepo.py", line 100, in __get__
    return super(_basefilecache, self).__get__(unfi, type)
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/scmutil.py", line 1315, in __get__
    entry.obj = self.func(obj)
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/localrepo.py", line 1189, in changelog
    trypending=txnutil.mayhavepending(self.root))
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/changelog.py", line 296, in __init__
    checkambig=True, mmaplargeindex=True)
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/revlog.py", line 387, in __init__
    self._loadindex()
  File "/opt/rhodecode/store/s4nnxsslk0x3frd51nrnadk5jfh4fh6k-python2.7-mercurial-4.9.1/lib/python2.7/site-packages/mercurial/revlog.py", line 513, in _loadindex
    self.indexfile)
RevlogError: index 00changelog.i is corrupted
2019-10-04 17:08:58.867 [6212] DEBUG [vcsserver.lib.exc_tracking] Stored generated exception 139686482621432 as: /tmp/rc_exception_store_v1/139686482621432_vcsserver_1570183738.867341
2019-10-04 17:08:58.868 [6212] INFO  [vcsserver.tweens] IP: 127.0.0.1 Request to path: `/hg` time: 0.091s
2019-10-04 17:08:58.868 [<6212>  ] GNCRN 127.0.0.1       rqt:0.091343 200 4434   "POST:/hg " usr:- "-" "PycURL/7.43.0.2 libcurl/7.59.0 OpenSSL/1.0.2p zlib/1.2.11 libssh2/1.8.0 nghttp2/1.24.0"
2019-10-04 17:14:00 [6200] [INFO] Handling signal: term

History

#1 Updated by Marcin Kuzminski [staff] 2 months ago

Seems one of the repositories is corrupted as reflected in:

RevlogError: index 00changelog.i is corrupted

In the rhodecode logs on remap&rescann there should be info about which one is it.

Cheers,

Also available in: Atom PDF