#1056656 dgit: Crash while running dgit rpush-source

#1056656#5
Date:
2023-11-24 13:24:35 UTC
From:
To:
I've been starting to enjoy `dgit rpush-source` so that I can offload my test
building from my laptop. This works for many repositories/packages, but when it fails,
it does so in a way that is very hard to diagnose. This is what I end up with:

   siretart@x1:~$ dgit  rpush-source builder:/home/siretart/packages/golang-github-containers-buildah --new experimental
   Format `3.0 (quilt)', need to check/update patch stack
   canonical suite name for experimental is rc-buggy
   dgit: split brain (separate dgit view) may be needed (--quilt=gbp).
   dgit view: found cached (commit id b157dabf1cec0b379b95559e28273c403995ae9e)
   dpkg-source: info: using source format '3.0 (quilt)'
   dpkg-source: info: building golang-github-containers-buildah using existing ./golang-github-containers-buildah_1.33.1+ds1.orig.tar.xz
   dpkg-source: info: using patch list from debian/patches/series
   dpkg-source: info: building golang-github-containers-buildah in golang-github-containers-buildah_1.33.1+ds1-1.debian.tar.xz
   dpkg-source: info: building golang-github-containers-buildah in golang-github-containers-buildah_1.33.1+ds1-1.dsc
   package seems new, not specifying -v<version>
   dpkg-genchanges: info: including full source code in upload
   no version available from the archive

   Package not found in the archive, but has allegedly been pushed using dgit.
   Perhaps the upload is stuck in incoming.  Using the version from git.

   dgit: split brain (separate dgit view) may be needed (--quilt=gbp).
   dgit view: found cached (commit id b157dabf1cec0b379b95559e28273c403995ae9e)
   Checking that HEAD includes all changes in archive...
   Declaring that HEAD includes all changes in 1.32.0+ds1-1...
   Made pseudo-merge of 1.32.0+ds1-1 into dgit view.
   checking that golang-github-containers-buildah_1.33.1+ds1-1.dsc corresponds to HEAD
   dpkg-source: warning: extracting unsigned source package (/home/siretart/packages/golang-github-containers-buildah/../golang-github-containers-buildah_1.33.1+ds1-1.dsc)
   dpkg-source: info: extracting golang-github-containers-buildah in golang-github-containers-buildah-1.33.1+ds1
   dpkg-source: info: unpacking golang-github-containers-buildah_1.33.1+ds1.orig.tar.xz
   dpkg-source: info: unpacking golang-github-containers-buildah_1.33.1+ds1-1.debian.tar.xz
   dpkg-source: info: using patch list from debian/patches/series
   dpkg-source: info: applying manpage-fixes.patch
   dpkg-source: info: applying root-testfail-ignore.patch
   dpkg-source: info: applying avoid-buildkit-checksum.patch
   dpkg-source: info: applying avoid-buildkit-heredoc.patch
   ../golang-github-containers-buildah_1.33.1+ds1-1_source.changes already has appropriate .orig(s) (if any)
   Format `3.0 (quilt)', need to check/update patch stack
   Use of uninitialized value in concatenation (.) or string at /usr/bin/dgit line 5544.
    at /usr/share/perl5/Debian/Dgit.pm line 175.
   	Debian::Dgit::__ANON__("Use of uninitialized value in concatenation (.) or string at "...) called at /usr/bin/dgit line 5544
   	main::i_resp_want("signed-tag") called at /usr/bin/dgit line 5422
   	main::i_method("i_resp", "want", "signed-tag") called at /usr/bin/dgit line 5474
   	main::rpush_core("push-source") called at /usr/bin/dgit line 5429
   	main::cmd_rpush_source() called at /usr/bin/dgit line 8319
   ! Push failed, before we got started.
   ! You can retry the push, after fixing the problem, if you like.


What's wrong with /usr/bin/dgit line 5544?

#1056656#10
Date:
2023-11-24 13:45:34 UTC
From:
To:

Just for the record, in this particular instance, passing the argument `--gbp` allowed me
to proceed. So I've used this invocation:

   dgit --gbp  rpush-source ubuntu-builder:/home/siretart/packages/golang-github-containers-buildah --new experimental


Clearly, the diagnostics of the current dgit implementation leaves room for improvement.

Thanks for providing dgit and its infrastructure. I has really made working with debian source packages much more enjoyable!

#1056656#15
Date:
2023-11-24 15:29:54 UTC
From:
To:
Hi.  Thanks for the bug report.

Reinhard Tartler writes ("Bug#1056656: dgit: Crash while running dgit rpush-source"):

Hrm.  Obviously it shouldn't do that :-).

Can you provide me a "steps to reproduce" ?

In particular, can you tell me, in
  /home/siretart/packages/golang-github-containers-buildah
what commitid is your HEAD and where can I get it?

What .orig tarballs will I need?
of the rpush protocol (between the two dgits).  I think it is crashing
because $i_param{'splitbrain'} is undef but $do_split_brain is set.

I think I'll have to repro this locally to diagnose and fix it.  I
think there are at least two bugs: 1. whatever caused it to take this
error path 2. when this is detected, the attempt to construct the
error message fails so it crashes even worse.

Reinhard Tartler writes ("Bug#1056656: dgit: Crash while running dgit rpush-source"):

That's interesting.  I preusme that your branch is in fact in
unapplied (gbp) format?  So your original invocation (without --gbp)
may have been in error.  dgit attempts to detect this mistake and
provide a bespoke error message for it, but (if that's what's
happening here) that isn't working.

Thanks for the kind words.  You're welcome.

Ian.