"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: fix gotd rejecting multiple have lines
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 18 Jan 2023 12:44:45 +0100

Download raw body.

Thread
On 2023/01/18 12:14:23 +0100, Stefan Sperling <stsp@stsp.name> wrote:
> While testing 'git pull' against got.gameoftrees.org I came across
> this error:
> 
>   fetch-pack: protocol error: bad band #69
>   fatal: protocol error: bad pack header
>   gotsh: unexpected 'have' packet
> 
> This occurs if there is a deep enough branch history to trigger
> git into sending lots of have-lines until the server sends an ack.
> Because this communication happens asynchronously we might already
> be expecting a 'done' packet while more have-lines keep arriving.
> 
> Fix this problem and add a test to hopefully trigger the issue reliably.
> Because this problem depends on timing it might not be 100% reproducible.
> But the test kept failing reliably on my laptop at least.

run the regress a few times against an unpatched gotd and failed
reilably for me too.

> This might also fix the spurious 'unexpected flush packet' errors seen with
> 'got fetch' while already up-to-date, but I have not yet confirmed this.
> 
> ok?

ok op@

> [...]
> +	got tree -R -r $testroot/repo-clone2 > $testroot/stdout
> +	cat > $testroot/stdout.expected <<EOF
> +alpha
> +beta
> +gamma/
> +gamma/delta

These two shouldn't be there:

> +psi/
> +psi/new

otherwise the test always fails for me.

> +EOF
> [...]
> +}

style nit: double empty line

> +
> +
>  test_parseargs "$@"
>  run_test test_send_basic
> +run_test test_fetch_more_history