git repository resync leads to "IndexError: list index out of range"

40 views
Skip to first unread message

Robert Oschwald

unread,
Apr 3, 2017, 1:24:00 PM4/3/17
to Trac Users
I'm unable to sync one of my 40 git repos. 

Anyone got an idea what the cause could be?

Trac 1.0.13 / CentOS7
MariaDB is using utf8mb4 / utf8mb4_bin

2017-04-03 18:37:52,145 Trac[env] INFO: -------------------------------- environment startup [Trac 1.0.13] --------------------------------
2017-04-03 18:37:53,060 Trac[git_fs] INFO: detected GIT version 1.8.3.1
Resyncing repository history for my-failed-repo.git... 
2017-04-03 18:37:53,085 Trac[cache] INFO: Cleaning cache
2017-04-03 18:37:53,088 Trac[cache] INFO: Resetting "repository_dir": git:/var/www/GIT_REPOS/my-failed-repo.git
2017-04-03 18:37:53,179 Trac[git_fs] INFO: Trying to sync revision [48306bab7abca0e423e32c451b5c0eba9c1823fe]
2017-04-03 18:37:53,235 Trac[git_fs] INFO: Trying to sync revision [c7faeff6c5d9a62bc10012c7d0a875ed28e8dc67]
2017-04-03 18:37:53,301 Trac[git_fs] INFO: Trying to sync revision [e1ba01ec4a4736dfe2cb1b0061f965ef2737d3a6]
2017-04-03 18:37:53,353 Trac[git_fs] INFO: Trying to sync revision [49292519960ce8f27928612213516c3318a19ff6]
2017-04-03 18:37:53,403 Trac[git_fs] INFO: Trying to sync revision [780cfaa0ace4e571e0c139efd13c1449f4835e85]
2017-04-03 18:37:53,453 Trac[git_fs] INFO: Trying to sync revision [dce661136c3bff811459423a0357856e126e4105]
2017-04-03 18:37:53,502 Trac[git_fs] INFO: Trying to sync revision [8466e5305de88784736e7100e4a7c809f9a9747b]
2017-04-03 18:37:53,551 Trac[git_fs] INFO: Trying to sync revision [490c4400f9c243fcf8b14fc1a7c98a92147e8353]
2017-04-03 18:37:53,601 Trac[git_fs] INFO: Trying to sync revision [080b5d9890415ed8a43c666aaedbee7765bb693e]
2017-04-03 18:37:53,650 Trac[git_fs] INFO: Trying to sync revision [59eedcf8c04706eaf20910f888d554aaad06911d]
2017-04-03 18:37:53,699 Trac[git_fs] INFO: Trying to sync revision [2193ae4d900c9c1bbe438fb0ed7d906640d1bc04]
2017-04-03 18:37:53,748 Trac[git_fs] INFO: Trying to sync revision [6073eabba9e9d183116406ddf6103ef39da8d54f]
2017-04-03 18:37:53,797 Trac[git_fs] INFO: Trying to sync revision [9f6a1194cbb77321db77536d04446a4fcd1e729d]
2017-04-03 18:37:53,847 Trac[git_fs] INFO: Trying to sync revision [c2f8dc1c456fb699a8ff557de64313cc69154cf1]
2017-04-03 18:37:53,896 Trac[git_fs] INFO: Trying to sync revision [08ee8e508de3f4020987f16d39152d6e8326abc5]
2017-04-03 18:37:53,946 Trac[git_fs] INFO: Trying to sync revision [4bc884bdd8f6d9f9eb480ea39a2f7c20b35695c6]
2017-04-03 18:37:53,995 Trac[git_fs] INFO: Trying to sync revision [bcf3eebfa788da3a9792ab3881f1b82305e6df94]
2017-04-03 18:37:54,059 Trac[git_fs] INFO: Trying to sync revision [896385fcda1b7a33053ad04c2103d9f8a882f00e]
2017-04-03 18:37:54,122 Trac[git_fs] INFO: Trying to sync revision [da8e3beae7b11056e8760049421954fe3b3c9972]
2017-04-03 18:37:54,203 Trac[git_fs] INFO: Trying to sync revision [55d4849f30caf3b18591853b31c273f2b0daf7e5]
2017-04-03 18:37:54,252 Trac[git_fs] INFO: Trying to sync revision [bd1cc5e323ee3e8b29a44777209699c409448a04]
2017-04-03 18:37:54,301 Trac[git_fs] INFO: Trying to sync revision [e52b9ce37e6b5e5666710f34341d1d98d780fe0f]
2017-04-03 18:37:54,351 Trac[git_fs] INFO: Trying to sync revision [3b62f04d34046b507332cfb41ee09d7ed3fbb307]
IndexError: list index out of range
2017-04-03 18:37:54,444 Trac[console] ERROR: Exception in trac-admin command: u"repository resync 'my-failed-repo.git'"
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/trac/admin/console.py", line 110, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/lib64/python2.7/cmd.py", line 220, in onecmd
    return self.default(line)
  File "/usr/lib/python2.7/site-packages/trac/admin/console.py", line 289, in default
    return self.cmd_mgr.execute_command(*args)
  File "/usr/lib/python2.7/site-packages/trac/admin/api.py", line 127, in execute_command
    return f(*fargs)
  File "/usr/lib/python2.7/site-packages/trac/versioncontrol/admin.py", line 156, in _do_resync
    self._sync(reponame, rev, clean=True)
  File "/usr/lib/python2.7/site-packages/trac/versioncontrol/admin.py", line 143, in _sync
    repos.sync(self._sync_feedback, clean=clean)
  File "/usr/lib/python2.7/site-packages/tracopt/versioncontrol/git/git_fs.py", line 141, in sync
    self._insert_changeset(db, rev, cset)
  File "/usr/lib/python2.7/site-packages/trac/versioncontrol/cache.py", line 285, in _insert_changeset
    for path, kind, action, bpath, brev in cset.get_changes():
  File "/usr/lib/python2.7/site-packages/tracopt/versioncontrol/git/git_fs.py", line 852, in get_changes
    self.repos.git.diff_tree(parent, self.rev, find_renames=True):
  File "/usr/lib/python2.7/site-packages/tracopt/versioncontrol/git/PyGIT.py", line 1054, in diff_tree
    yield __chg_tuple()
  File "/usr/lib/python2.7/site-packages/tracopt/versioncontrol/git/PyGIT.py", line 1045, in __chg_tuple
    chg[6] = self._fs_to_unicode(chg[6])
IndexError: list index out of range

RjOllos

unread,
Apr 3, 2017, 7:57:08 PM4/3/17
to Trac Users
Thank you for sharing the INFO level logging. Please run the following command and share the output:
$ cd /var/www/GIT_REPOS/my-failed-repo.git
$ git diff-tree -z -r -M e52b9ce37e6b5e5666710f34341d1d98d780fe0f 3b62f04d34046b507332cfb41ee09d7ed3fbb307

I'm having a hard-time seeing how we wouldn't hit one of these assertions:

Are you running Python with optimizations enabled? The optimizations disable assertions. We shouldn't be using assertions anyway, and we have an open ticket to fix it.

- Ryan

Jun Omae

unread,
Apr 5, 2017, 6:37:44 AM4/5/17
to trac-...@googlegroups.com
Thanks for the reporting.

On Tue, Apr 4, 2017 at 1:49 AM, Robert Oschwald
<roberto...@gmail.com> wrote:
> I'm unable to sync one of my 40 git repos.
>
> Anyone got an idea what the cause could be?

If a Git repository has file started with colon character and [git]
cached_repository option is enabled, this issue is reproduced on my
environment.

Is there such files started with colon character in your git repository?


> File "/usr/lib/python2.7/site-packages/tracopt/versioncontrol/git/PyGIT.py", line 1045, in __chg_tuple
> chg[6] = self._fs_to_unicode(chg[6])
> IndexError: list index out of range

I created new ticket about the issue at https://trac.edgewall.org/ticket/12758.

--
Jun Omae <jun...@gmail.com> (大前 潤)
Reply all
Reply to author
Forward
0 new messages