non-monotonic index when using http://?
hoi :)
At work I'm getting the following error message, any ideas?
Quoted 1 line
git --version
git version 1.4.2.rc4.g242a
Quoted 1 line
git pull upstream
Fetching refs/heads/master from http://git.kernel.org/pub/scm/git/git.git using http
error: non-monotonic index
walk 43134fcb350fb70d26634be163db1f71c14db19f
walk 55c3eb434ab6d489c632263239be15a1054df7f2
Getting alternates list for http://git.kernel.org/pub/scm/git/git.git/
Getting pack list for http://git.kernel.org/pub/scm/git/git.git/
error: non-monotonic index/home/tcmc_mwz/i686/bin/git-fetch: line 402: 2077 Segmentation fault git-http-fetch -v -a "$head" "$remote/"
zsh: exit 1 git pull upstream
Quoted 1 line
gdb git-http-fetch
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL3rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(gdb) run -v -a 43134fcb350fb70d26634be163db1f71c14db19f http://git.kernel.org/pub/scm/git/git.git/
Starting program: /autohome/tcmc_mwz/src/git/git-http-fetch -v -a 43134fcb350fb70d26634be163db1f71c14db19f http://git.kernel.org/pub/scm/git/git.git/
error: non-monotonic index
walk 43134fcb350fb70d26634be163db1f71c14db19f
walk 55c3eb434ab6d489c632263239be15a1054df7f2
Getting alternates list for http://git.kernel.org/pub/scm/git/git.git/
Getting pack list for http://git.kernel.org/pub/scm/git/git.git/
error: non-monotonic index
Program received signal SIGSEGV, Segmentation fault. 0x0804c1e2 in setup_index (repo=0x991a058,
sha1=0xbfffa420 "y:\236\223(mleiA\227}.[Iï¿¿\205fï¿¿ï¿¿") at http-fetch.c:501
501 new_pack->next = repo->packs;
(gdb) bt
#0 0x0804c1e2 in setup_index (repo=0x991a058,
sha1=0xbfffa420 "y:\236\223(mleiA\227}.[Iï¿¿\205fï¿¿ï¿¿") at http-fetch.c:501
#1 0x0804d17c in fetch_indices (repo=0x991a058) at http-fetch.c:946
#2 0x0804d217 in fetch_pack (repo=0x991a058,
sha1=0x994eb9c "Uï¿¿\230Dï¿¿\036 &p\aihï¿¿\rï¿¿\017ï¿¿hs.ï¿¿") at http-fetch.c:978
#3 0x0804d7f6 in fetch (sha1=0x994eb9c "Uï¿¿\230Dï¿¿\036 &p\aihï¿¿\rï¿¿\017ï¿¿hs.ï¿¿")
at http-fetch.c:1130
#4 0x0804a414 in loop () at fetch.c:179
#5 0x0804a77b in pull (targets=1, target=0xbfffb600, write_ref=0x0,
write_ref_log_details=0xbfffd3b9 "http://git.kernel.org/pub/scm/git/git.git/") at fetch.c:288#6 0x0804dbd7 in main (argc=5, argv=0xbfffb5f4) at http-fetch.c:1282
Signature · 1 line
Martin Waitz
Quoted 6 lines · Martin Waitz
hoi :)
At work I'm getting the following error message, any ideas?
Quoted 1 line
git --version
git version 1.4.2.rc4.g242a
Quoted 8 lines
Quoted 1 line
git pull upstream
Fetching refs/heads/master from http://git.kernel.org/pub/scm/git/git.git using http
error: non-monotonic index
walk43134fcb350fb70d26634be163db1f71c14db19f
walk55c3eb434ab6d489c632263239be15a1054df7f2
Getting alternates list for http://git.kernel.org/pub/scm/git/git.git/
Getting pack list for http://git.kernel.org/pub/scm/git/git.git/
error: non-monotonic index
The "non monotonic index" check is to make sure pack .idx file is sane, and it appears that you are getting the error before you fetch new pack from the server, which means one of your local packs is bad.
I just cloned from the kernel.org archive over http (I usually don't, but your report was alarming enough) and the packfile I have there do not seem to have the problem.
Quoted 4 lines · Junio C Hamano
The "non monotonic index" check is to make sure pack .idx file is sane, and it appears that you are getting the error before you fetch new pack from the server, which means one of your local packs is bad.
You are right, the local archive is corrupted, it works with a fresh clone.
For some reason, I have a .git/objects/pack/pack-793a9e93286d6c656941977d2e5b49e28566edcd.idx without the corresponding .pack file.
Has anybody seen something like this before?
Should GIT bail out earlier when it sees this non-monotonic-index corruption?
At least, it should not SEGV later...
Signature · 1 line
Martin Waitz
Quoted 3 lines · Martin Waitz
For some reason, I have a .git/objects/pack/pack-793a9e93286d6c656941977d2e5b49e28566edcd.idx without the corresponding .pack file.
It is worrysome why. In the meantime you could remove it (if it were a .pack file without .idx then you may want to try feeding it to unpack-objects but .idx without corresponding .pack is pretty much useless).
Quoted 1 line
At least, it should not SEGV later...
Absolutely. The particular code in http-fetch (your gdb session tells us exactly where) seems quite loosely written, and there may be other places that do not check return values.