threads / bug / 4217

[BUG] "stg pull" on qgit tree shows problems, including git-http-fetch segfault

Subject: [BUG] "stg pull" on qgit tree shows problems, including git-http-fetch segfault

## tl;dr

3 messages between May 20, 2006 and May 20, 2006.

replies: 2people: 2as markdown or json

Yann Dirson· May 20, 2006, 12:58 UTC · lore

With "master" branch pointing to tags/qgit-1.2~17 and "origin" to 0a327c900530d9dd293cd252894a24913d4172c3, with no patch applied on "master" stack, using stgit 0.9 and git 1.3.2:

$ stg pull Pulling from "origin"... Fetching refs/heads/master from http://digilander.libero.it/mcostalba/scm/qgit.git using http got 5d0d2f1703976e04c6db1e55ea6a044981b9ed20 walk 5d0d2f1703976e04c6db1e55ea6a044981b9ed20 [...] got 1f151284442358eee6da80394585491295c94380 error: File 24bd6f23c6d0161f7e775a0e6ab767725b6344ab (http://digilander.libero.it/mcostalba/scm/qgit.git/objects/f7/dc43059ca42dec2ea7214a33d1ff3c35e0aca5) corrupt Getting pack list for http://digilander.libero.it/mcostalba/scm/qgit.git/ got 63dc5a19ec0ac37fec09e4023cd51a62eb3efa15 [...] got 53563b4b6b32ba7ea184a4eeb555db76e276c8a6 error: XML error: syntax error got 73c20d6d667ff3860718d5e1382e686531360082 [...] got 0219d8723f9a4fa562d99eb0840741112a13466d error: The requested URL returned error: 405 Getting alternates list for http://digilander.libero.it/mcostalba/scm/qgit.git/ got 33e3b252eb5dbe84116a858136b9b35fe43bf768 Also look at <meta http-equiv="Refresh" content="5;URL=http://digiland.libe Also look at <BASE HREF="http://digiland.liber /usr/bin/git-fetch: line 268: 3725 Segmentation fault git-http-fetch -v -a "$head" "$remote/" stg pull: Failed "git-pull origin"

Running "stg pull" again gives only another "XML error", and finishes the pull.

After unpacking all packs (mv .git/objects/pack and git-unpack-object the contents) to be sure pruning does force everything to be re-fetched, the following commands allow to reproduce the problem:

 git-rev-parse tags/qgit-1.2~17 > .git/refs/heads/master 
 git-rev-parse tags/qgit-1.2~17 > .git/refs/bases/master 
 echo 0a327c900530d9dd293cd252894a24913d4172c3 >.git/refs/heads/origin 
 git-prune
 cg-reset
 stg pull

Output then reproducibly goes like the above, if one reruns the same 6 commands repeatedly, though the fetch order is not deterministic, which may explain slight differences in the output.

Using current HEAD git instead of 1.3.2 does not improve things.
Best regards,
-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>
Yann Dirson· May 20, 2006, 13:12 UTC · re: Yann Dirson · lore

Re: [BUG] "stg pull" on qgit tree shows problems, including git-http-fetch segfault

Let's be more precise - the command that repedetly fails is the following. It is reponsible for both the "XML error" message and the segfault.

git-http-fetch -v -a 79ac640b3129344d4e94573ddaea09ccda1b8e3b http://digilander.libero.it/mcostalba/scm/qgit.git/
Output goes like:

walk 79ac640b3129344d4e94573ddaea09ccda1b8e3b walk d8bc846d8d2709fa240887da512e8b125a669006 walk 5d0d2f1703976e04c6db1e55ea6a044981b9ed20 error: File f7dc43059ca42dec2ea7214a33d1ff3c35e0aca5 (http://digilander.libero.it/mcostalba/scm/qgit.git/objects/f7/dc43059ca42dec2ea7214a33d1ff3c35e0aca5) corrupt Getting pack list for http://digilander.libero.it/mcostalba/scm/qgit.git/ error: XML error: syntax error Getting index for pack c47999034002469dddee39ba0069c1b1a84487a5 error: Unable to open local file .git/objects/pack/pack-c47999034002469dddee39ba0069c1b1a84487a5.idx for pack index Getting alternates list for http://digilander.libero.it/mcostalba/scm/qgit.git/ Also look at <meta http-equiv="Refresh" content="5;URL=http://digiland.libe Also look at <BASE HREF="http://digiland.liber Segmentation fault (core dumped)

gdb backtrace is:

#0 0xb7caa5d0 in strncpy () from /lib/tls/libc.so.6 #1 0x0804c177 in process_alternates_response (callback_data=0xbfd428ec) at http-fetch.c:587 #2 0x0804a6c8 in process_curl_messages () at http.c:461 #3 0x0804a773 in step_active_slots () at http.c:379 #4 0x0804a7c7 in run_active_slot (slot=0x807f6a8) at http.c:400 #5 0x0804c565 in fetch_alternates (base=0xbfd45424 "http://digilander.libero.it/mcostalba/scm/qgit.git/") at http-fetch.c:668 #6 0x0804d46c in fetch (sha1=0x807f448 "÷ÜC\005\234¤-ì.§!J3Ñÿ<5ଥ\225¹\005\b") at http-fetch.c:1131 #7 0x0804a1ad in pull (target=0xbfd453fb "79ac640b3129344d4e94573ddaea09ccda1b8e3b") at fetch.c:168 #8 0x0804b590 in main (argc=5, argv=0xbfd43af4) at http-fetch.c:1269

The crash in process_alternates_response occurs on line:

587 strncpy(target + serverlen, data + i, 588 posn - i - 7);

(gdb) p target $1 = 0x80800b8 "http://digilander.libero.it//-->\n</script>\n\n<script language=\"Javascript\" src=\"/x/js/nu05.js\"></script>\n\n<script>\n<!--\n\nfunction loaded() {\n\tcommon_boot();\n\t\n\t\t\n}\n\nfunction unloaded() {\n\tcommon_unload"... (gdb) p target+serverlen $2 = 0x80800d3 "//-->\n</script>\n\n<script language=\"Javascript\" src=\"/x/js/nu05.js\"></script>\n\n<script>\n<!--\n\nfunction loaded() {\n\tcommon_boot();\n\t\n\t\t\n}\n\nfunction unloaded() {\n\tcommon_unload();\n\t}\n\nfunction eoc() {\n\tc"... (gdb) p data $3 = 0x809c840 "" (gdb) p i $4 = 134739640 (gdb) p posn $5 = 1304

Looks like something is going very wrong, like wrong assumptions about received HTML.
-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>
Marco Costalba· May 20, 2006, 14:26 UTC · re: Yann Dirson · lore

Re: [BUG] "stg pull" on qgit tree shows problems, including git-http-fetch segfault

On 5/20/06, Yann Dirson <ydirson@altern.org> wrote:
> With "master" branch pointing to tags/qgit-1.2~17 and "origin" to
> 0a327c900530d9dd293cd252894a24913d4172c3, with no patch applied on
> "master" stack, using stgit 0.9 and git 1.3.2:
>
Please reclone qgit repo and try again.

The public repository was broken by a my mistake few days ago. So you need to reclone.

Thanks Marco

← back to recent threads