vcs-import of libvdpau (git) fails: bzrlib.errors.BzrError: The remote server unexpectedly closed the connection

Bug #445156 reported by Stephen Warren
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Medium
Jelmer Vernooij
Launchpad itself
Fix Released
Medium
Michael Hudson-Doyle

Bug Description

Import of git://anongit.freedesktop.org/%7Eaplattner/libvdpau failes; see https://code.launchpad.net/~vcs-imports/libvdpau/master and log http://launchpadlibrarian.net/33192483/libvdpau-master-log.txt:

2009-10-07 02:14:49 INFO 72 bytes transferred |
2009-10-07 02:14:49 INFO
Traceback (most recent call last):
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/scripts/code-import-worker.py", line 61, in ?
    script.main()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/scripts/code-import-worker.py", line 56, in main
    import_worker.run()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/lib/lp/codehosting/codeimport/worker.py", line 398, in run
    self._doImport()
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/lib/lp/codehosting/codeimport/worker.py", line 492, in _doImport
    overwrite=True)
  File "<string>", line 4, in pull_write_locked
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/eggs/bzr-2.0.0-py2.4-linux-x86_64.egg/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/branch.py", line 405, in pull
    graph=graph)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/branch.py", line 368, in update_revisions
    interrepo.fetch_objects(determine_wants, self.source.mapping)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/fetch.py", line 467, in fetch_objects
    store.get_raw, progress)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/remote.py", line 259, in fetch_objects
    self.fetch_pack(determine_wants, graph_walker, lambda x: os.write(fd, x), progress)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/remote.py", line 252, in fetch_pack
    pack_data, progress)
  File "/srv/importd.launchpad.net/production/launchpad-rev-8513/optionalbzrplugins/git/remote.py", line 114, in fetch_pack
    raise BzrError(e)
bzrlib.errors.BzrError: The remote server unexpectedly closed the connection.
Import failed:
Traceback (most recent call last):
Failure: twisted.internet.error.ProcessTerminated: A process has ended with a probable error condition: process ended with exit code 1.

I ran "git clone" of that URL on my laptop and it works fine. I wasn't able to get bzr-git working locally to test that.

Related branches

Curtis Hovey (sinzui)
affects: launchpad → launchpad-code
Revision history for this message
Tim Penhey (thumper) wrote :

As far as I can see, this path doesn't exist.

Changed in launchpad-code:
status: New → Incomplete
Revision history for this message
Stephen Warren (srwarren) wrote :

Really? It works perfectly for me:

[swarren@swarren-lx1 tmpxxx]$ git clone git://anongit.freedesktop.org/~aplattner/libvdpau
Initialized empty Git repository in /home/swarren/tmpxxx/libvdpau/.git/
remote: Counting objects: 154, done.
Receiving objects: 100% (154/154), 156.77 KiB, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 154 (delta 64), reused 154 (delta 64)
Resolving deltas: 100% (64/64), done.
[swarren@swarren-lx1 tmpxxx]$ find
.
./libvdpau
./libvdpau/include
./libvdpau/include/vdpau
./libvdpau/include/vdpau/vdpau_x11.h
./libvdpau/include/vdpau/vdpau.h
./libvdpau/Makefile.am
./libvdpau/INSTALL
./libvdpau/autogen.sh
./libvdpau/README
./libvdpau/COPYING
./libvdpau/.gitignore
./libvdpau/configure.ac
./libvdpau/doc
./libvdpau/doc/Makefile.am
./libvdpau/doc/vdpau_data_flow.png
./libvdpau/doc/Doxyfile
./libvdpau/acinclude.m4
./libvdpau/vdpau.pc.in
./libvdpau/src
./libvdpau/src/Makefile.am
./libvdpau/src/vdpau_wrapper.c
./libvdpau/AUTHORS
./libvdpau/NEWS
./libvdpau/trace
./libvdpau/trace/Makefile.am
./libvdpau/trace/vdpau_trace.cpp
./libvdpau/.git
./libvdpau/.git/packed-refs
./libvdpau/.git/HEAD
./libvdpau/.git/logs
./libvdpau/.git/logs/HEAD
./libvdpau/.git/logs/refs
./libvdpau/.git/logs/refs/heads
./libvdpau/.git/logs/refs/heads/master
./libvdpau/.git/logs/refs/remotes
./libvdpau/.git/logs/refs/remotes/origin
./libvdpau/.git/logs/refs/remotes/origin/HEAD
./libvdpau/.git/config
./libvdpau/.git/info
./libvdpau/.git/info/exclude
./libvdpau/.git/objects
./libvdpau/.git/objects/info
./libvdpau/.git/objects/pack
./libvdpau/.git/objects/pack/pack-bdd2aa1c903234d931fa78ba6d9cf280cbc7511f.pack
./libvdpau/.git/objects/pack/pack-bdd2aa1c903234d931fa78ba6d9cf280cbc7511f.idx
./libvdpau/.git/branches
./libvdpau/.git/index
./libvdpau/.git/description
./libvdpau/.git/refs
./libvdpau/.git/refs/heads
./libvdpau/.git/refs/heads/master
./libvdpau/.git/refs/remotes
./libvdpau/.git/refs/remotes/origin
./libvdpau/.git/refs/remotes/origin/HEAD
./libvdpau/.git/refs/tags
./libvdpau/.git/hooks
./libvdpau/.git/hooks/applypatch-msg.sample
./libvdpau/.git/hooks/update.sample
./libvdpau/.git/hooks/prepare-commit-msg.sample
./libvdpau/.git/hooks/post-update.sample
./libvdpau/.git/hooks/pre-rebase.sample
./libvdpau/.git/hooks/post-receive.sample
./libvdpau/.git/hooks/post-commit.sample
./libvdpau/.git/hooks/commit-msg.sample
./libvdpau/.git/hooks/pre-applypatch.sample
./libvdpau/.git/hooks/pre-commit.sample

Changed in launchpad-code:
status: Incomplete → New
Revision history for this message
Stephen Warren (srwarren) wrote :

(If you're talking about %7e vs. ~, then note that I entered ~ into the URL in launchpad, and it translated it to %7e for me. I think somebody tried fiddling with the import at some point in time to try both %7e and ~ but neither worked)

Revision history for this message
Paul Hummer (rockstar) wrote :

Odd. Here's the output of my git clone-

[-(Mon 2010-01-04 17:26:04)-(~/)-]> git clone git://anongit.freedesktop.org/%7Eaplattner/libvdpau
Initialized empty Git repository in /home/rockstar/libvdpau/.git/
fatal: The remote end hung up unexpectedly

[-(Mon 2010-01-04 17:26:08)-(~/)-]> git clone git://anongit.freedesktop.org/~aplattner/libvdpau
Initialized empty Git repository in /home/rockstar/libvdpau/.git/
remote: Counting objects: 154, done.
remote: Compressing objects: 100% (74/74), done.
remote: Total 154 (delta 64), reused 154 (delta 64)
Receiving objects: 100% (154/154), 156.78 KiB, done.
Resolving deltas: 100% (64/64), done.

It looks like git handles %7e different than ~ in requesting a URL, so maybe the escaping is also breaking bzr-git. Jelmer, could you shed some light on this?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 445156] Re: vcs-import of libvdpau (git) fails: bzrlib.errors.BzrError: The remote server unexpectedly closed the connection

Hi Paul,

On Tue, 2010-01-05 at 00:30 +0000, Paul Hummer wrote:
> Odd. Here's the output of my git clone-
>
> [-(Mon 2010-01-04 17:26:04)-(~/)-]> git clone git://anongit.freedesktop.org/%7Eaplattner/libvdpau
> Initialized empty Git repository in /home/rockstar/libvdpau/.git/
> fatal: The remote end hung up unexpectedly
>
> [-(Mon 2010-01-04 17:26:08)-(~/)-]> git clone git://anongit.freedesktop.org/~aplattner/libvdpau
> Initialized empty Git repository in /home/rockstar/libvdpau/.git/
> remote: Counting objects: 154, done.
> remote: Compressing objects: 100% (74/74), done.
> remote: Total 154 (delta 64), reused 154 (delta 64)
> Receiving objects: 100% (154/154), 156.78 KiB, done.
> Resolving deltas: 100% (64/64), done.
>
> It looks like git handles %7e different than ~ in requesting a URL, so
> maybe the escaping is also breaking bzr-git. Jelmer, could you shed
> some light on this?
As far as I understand git basically just splits the URL into a host and
a path part and then runs the equivalent of:

ssh "$host" git upload-pack "$path"

(or something similar with netcat when using git://)

It doesn't seem to do any sort of further parsing (including url
de-escaping) of $path.

A strace confirms this:

12553 write(4, "0048git-upload-pack /%7Eaplattne"..., 72) = 72

So bzr-git/dulwich should probably just make sure to urllib.unquote
paths before sending them to a remote server.

  affects bzr-git
  status triaged
  importance medium

Cheers,

Jelmer

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

We now unescape properly, but this doesn't seem to have fixed this issue.

Changed in bzr-git:
status: Triaged → Fix Released
status: Fix Released → Triaged
Changed in launchpad-code:
status: New → Incomplete
importance: Undecided → Medium
Revision history for this message
Stephen Warren (srwarren) wrote :

What is missing that makes this incomplete; the import is still failing...

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Well, fair enough. What's the status for "it's a bug, but we don't have a clue"?

Changed in launchpad-code:
status: Incomplete → Confirmed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Ah ok, it fails with bzr-git too, I think. So once it's fixed in bzr-git (or dulwich), the launchpad-code part is just deploying the new version.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

More clues... this is what git sends:

0045git-upload-pack ~aplattner/libvdpau^@host=anongit.freedesktop.org^@

(the ^@s should be NULs)

and this is what bzr-git sends:

0046git-upload-pack /~aplattner/libvdpau^@host=anongit.freedesktop.org^@

I guess it's that slash in the front that's screwing things up?

Tim Penhey (thumper)
tags: added: code-import
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

On Fri, 2010-02-05 at 00:42 +0000, Michael Hudson wrote:
> More clues... this is what git sends:
>
> 0045git-upload-pack ~aplattner/libvdpau^@host=anongit.freedesktop.org^@
>
> (the ^@s should be NULs)
>
> and this is what bzr-git sends:
>
> 0046git-upload-pack /~aplattner/libvdpau^@host=anongit.freedesktop.org^@
>
> I guess it's that slash in the front that's screwing things up?
Yeah, that would explain it.

I wonder what the best way is for bzr-git to support locations that do
start with double slashes. Perhaps we should make sure to always just
strip a single slash, never more than that?

Cheers,

Jelmer

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

  status fixreleased

Fixed in trunk now, I've verified with the libvdpau branch that this now
works.

Changed in bzr-git:
status: Triaged → Fix Released
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

  affects bzr-git
  assignee jelmer
  status fixreleased

Changed in bzr-git:
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I'll land the bzr-git update for launchpad soon.

Changed in launchpad-code:
status: Confirmed → In Progress
milestone: none → 10.02
assignee: nobody → Michael Hudson (mwhudson)
Changed in launchpad-code:
status: In Progress → Fix Committed
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Yay, it worked at last.

Changed in launchpad-code:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.