Import failure when Debian and Ubuntu publish different contents for the same package version string

Bug #1753800 reported by Nish Aravamudan on 2018-03-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
Medium
Unassigned

Bug Description

  03/06/2018 17:09:47 - INFO:Importing patches-unapplied 3.1~rc1+r3.0.13-12 to ubuntu/trusty-proposed
  03/06/2018 17:10:08 - ERROR:Found import tag importer/import/3.1_rc1+r3.0.13-12, but the corresponding tree does not match the published version. Will orphan commit.
  03/06/2018 17:10:11 - INFO:Importing patches-unapplied 3.1~rc1+r3.0.13-12 to ubuntu/trusty
  03/06/2018 17:10:14 - ERROR:Found import tag importer/import/3.1_rc1+r3.0.13-12, but the corresponding tree does not match the published version. Will orphan commit.
  03/06/2018 17:10:15 - ERROR:Command exited 128: git tag -a -m "git-ubuntu import v0.7.4" importer/orphan/3.1_rc1+r3.0.13-12 7fccb69ab4854d817815a861863b389acf06dc9d
  03/06/2018 17:10:15 - ERROR:stdout:
  03/06/2018 17:10:15 - ERROR:stderr: fatal: tag 'importer/orphan/3.1_rc1+r3.0.13-12' already exists

  Traceback (most recent call last):
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 1533, in import_publishes
      parent_overrides=parent_overrides,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 1309, in import_unapplied_spi
      upload_parent_commit,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 584, in commit_unapplied_patches_import
      None,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 564, in _commit_import
      tag, commit_hash
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 1461, in git_run
      **kwargs,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 203, in git_run
      return run(['git'] + list(args), env=env, **kwargs)
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/run.py", line 88, in run
      raise e
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/run.py", line 67, in run
      stdout=stdout, stderr=stderr, stdin=stdin)
    File "/snap/git-ubuntu/394/usr/lib/python3.6/subprocess.py", line 418, in run
      output=stdout, stderr=stderr)
  subprocess.CalledProcessError: Command '['git', 'tag', '-a', '-m', 'git-ubuntu import v0.7.4', 'importer/orphan/3.1_rc1+r3.0.13-12', '7fccb69ab4854d817815a861863b389acf06dc9d']' returned non-zero exit status 128.

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/snap/git-ubuntu/394/bin/git-ubuntu", line 11, in <module>
      load_entry_point('gitubuntu==0.7.4', 'console_scripts', 'git-ubuntu')()
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/__main__.py", line 243, in main
      sys.exit(args.func(args))
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 1657, in cli_main
      retry_backoffs=args.retry_backoffs,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 345, in main
      parent_overrides=parent_overrides,
    File "/snap/git-ubuntu/394/lib/python3.6/site-packages/gitubuntu/importer.py", line 1548, in import_publishes
      raise GitUbuntuImportError(msg) from e
  gitubuntu.importer.GitUbuntuImportError: Unable to import patches-unapplied 3.1~rc1+r3.0.13-12 to ubuntu

Failed to import libffi (attempt 3/3)

I believe this is another orphan tag corner case, which is about orphaning when the previously imported same version doesn't tree-match.

cf. git_repository.py LL1253 or so.

In that case, we *also* need to see if it's already been imported as an orphan commit, which happens to match.

I think we should chagne the if/else/elif to a for tag in (import_tag, orphan_tag, upload_tag) and if any of them treeish match, use it, else orphan.

Related branches

Robie Basak (racb) on 2018-05-24
tags: added: import import-edge-case
Robie Basak (racb) on 2018-05-24
tags: added: spec
Robie Basak (racb) wrote :

In this edge case, Debian libffi 3.1~rc1+r3.0.13-12 differs from Ubuntu libffi 3.1~rc1+r3.0.13-12 as follows:

diff -Nru libffi-3.1~rc1+r3.0.13/debian/changelog libffi-3.1~rc1+r3.0.13/debian/changelog
--- libffi-3.1~rc1+r3.0.13/debian/changelog 2014-03-29 15:21:03.000000000 +0000
+++ libffi-3.1~rc1+r3.0.13/debian/changelog 2014-03-28 08:57:07.000000000 +0000
@@ -1,9 +1,9 @@
-libffi (3.1~rc1+r3.0.13-12) unstable; urgency=high
+libffi (3.1~rc1+r3.0.13-12) trusty; urgency=medium

- * Revert 3.1~rc1-2 upload, ABI did change on x86, FFI_TRAMPOLINE_SIZE
- did change from 10 to 52. Closes: #742897. LP: #1298824.
+ * Revert 3.1~rc1-2 upload, it causes an unannounced ABI break on at least
+ i386, causing lots of segfaults. (LP: #1298824)

- -- Matthias Klose <email address hidden> Sat, 29 Mar 2014 16:20:56 +0100
+ -- Martin Pitt <email address hidden> Fri, 28 Mar 2014 09:55:09 +0100

 libffi (3.0.13-12) unstable; urgency=medium

summary: - libffi fails to import, due to orphan tags
+ Import failure when Debian and Ubuntu publish different contents for the
+ same package version string
Changed in usd-importer:
status: New → Triaged
importance: Undecided → Medium
Robie Basak (racb) wrote :

The result of this is that on two separate subsequent occasions (due to multiple publication events) the importer attempts to create an orphan tag because the previous import tag already exists but has a different tree. On the second attempt to create an orphan tag, it fails as the orphan tag already exists.

I suppose there are really two false assumptions here:

1) We have plans and MPs to fix this, but the algorithm in master right now doesn't cope well with the source package name and version string across distributions in Launchpad resulting in two different trees.

2) That orphaning only need happen once.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers