[SRU] upgrade from 14.04 to 16.04 fails with: ca-certificates 20170717~16.04.1 failed to install/upgrade: triggers looping, abandoned

Bug #1723198 reported by MadCatmkII
52
This bug affects 9 people
Affects Status Importance Assigned to Milestone
ca-certificates-java (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Medium
Eric Desrochers
Zesty
Fix Released
Medium
Eric Desrochers

Bug Description

[Impact]

ca-certificates-java currently depend on openjdk-7 which no longer exist after Trusty. It triggers failures while doing release upgrade, due to triggers loop.

[Test Case]

# Install Ubuntu server 14.04.5 + all the updates.
(I used "uvt-kvm create trustylp1723198 release=trusty")

sudo apt-get update
sudo apt-get dist-upgrade

# Install ca-certificates-java and man-db.
sudo apt-get install ca-certificates-java man-db

# Upgrade to 16.04 LTS.
sudo do-release-upgrade

# Error:
..........................
Removing ca-certificates-java (20130815ubuntu1) ...
Removing openjdk-7-jre-headless:amd64 (7u151-2.6.11-2ubuntu0.14.04.1) ...
dpkg: cycle found while processing triggers:
chain of packages whose triggers are or may be responsible:
man-db -> ca-certificates
packages' pending triggers which are or may be unresolvable:
ca-certificates: update-ca-certificates
man-db: /usr/share/man
dpkg: error processing package ca-certificates (--remove):
triggers looping, abandoned

[Regression Potential]

 * Regression is low risk. Xenial and late doesn't have openjdk-7 available in the archive. It has openjdk-8. This will have the effect to make the release upgrade to work correctly when ca-certificates-java is installed. This patch has been already proven to work in Artful, Bionic and Debian upstream.

* The current "ca-certificates-java" installs openjdk-9 (universe), with this fix the new package will install openjdk-8 (main). This is a change in behaviour, but ca-certificates-java's dependency on openjdk-7-jre-headless | java-runtime-headless means the package manager handling of the dependency is inconsistent anyway. For more detail: See Comment #16, #17 & #18.

[Other Info]

 * Debian bug :
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863803

 * Debian commit:
 https://anonscm.debian.org/cgit/pkg-java/ca-certificates-java.git/commit/?id=0ddf3c9

[Original Description]
Test Case:
1. Install Ubuntu server 14.04.5 + all the updates
2. Install ca-certificates-java and man-db
3. Reboot
4. Upgrade to 16.04 LTS with do-release-upgrade and proceed with the upgrade

Actual Result
Upgrade fails with
Removing ca-certificates-java (20130815ubuntu1) ...
Removing openjdk-7-jre-headless:amd64 (7u151-2.6.11-2ubuntu0.14.04.1) ...
dpkg: cycle found while processing triggers:
 chain of packages whose triggers are or may be responsible:
  man-db -> ca-certificates
 packages' pending triggers which are or may be unresolvable:
  ca-certificates: update-ca-certificates
  man-db: /usr/share/man
dpkg: error processing package ca-certificates (--remove):
 triggers looping, abandoned

I have no further information to give at this time except to say that there were several errors during the upgrade process from 14.04.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: ca-certificates 20170717~16.04.1
ProcVersionSignature: Ubuntu 4.4.0-97.120-generic 4.4.87
Uname: Linux 4.4.0-97-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Thu Oct 12 17:52:19 2017
ErrorMessage: triggers looping, abandoned
InstallationDate: Installed on 2013-11-16 (1425 days ago)
InstallationMedia: Xubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.2
 apt 1.2.24
SourcePackage: ca-certificates
Title: package ca-certificates 20170717~16.04.1 failed to install/upgrade: triggers looping, abandoned
UpgradeStatus: Upgraded to xenial on 2017-10-12 (0 days ago)

Revision history for this message
MadCatmkII (madcat777) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ca-certificates (Ubuntu):
status: New → Confirmed
Revision history for this message
Duane Gibson (gibtec) wrote :

I'm new to ubuntu and just getting started.

Changed in ca-certificates (Ubuntu):
importance: Undecided → Critical
affects: ca-certificates (Ubuntu) → dpkg (Ubuntu)
description: updated
summary: - package ca-certificates 20170717~16.04.1 failed to install/upgrade:
- triggers looping, abandoned
+ upgrade from 14.04 to 16.04 fails with: ca-certificates 20170717~16.04.1
+ failed to install/upgrade: triggers looping, abandoned
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote : Re: upgrade from 14.04 to 16.04 fails with: ca-certificates 20170717~16.04.1 failed to install/upgrade: triggers looping, abandoned

dist-upgrade logs from 14.04 to 16.04

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

term log with dpkg debug mode enabled.

Revision history for this message
Eric Desrochers (slashd) wrote :

The root cause of the removal is ca-certificates-java in xenial Depends: openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java7-runtime-headless; java7-runtime-headless is provided by openjdk-8-jre-headless, but this will not cause apt to install openjdk-8-jre-headless on upgrade when openjdk-7-jre-headless is already installed.

openjdk-7-jre-headless is only available in Trusty, and has a dependency chain on an obsolete version of tzdata, so apt forces removal of tzdata-java -> openjdk-7-jre-headless -> ca-certificates-java

Switching ca-certificates-java in Xenial to explicitly prefer openjdk-8-jre-headless as the first alternative may be sufficient hint to the package manager for this upgrade to work correctly.

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

I have tested an upgrade with the new Xenial test package of "ca-certificates-java" that I have prepare using a local repository approach (since the pkg is not yet in Ubuntu archive). So far switching to "openjdk-8-jre-headless" has good result after 3 different upgrade attempt. (trusty->xenial)

I'll talk to foundation team tomorrow for them to sign-off on the proposal change before I proceed with the final upload.

* Before upgrade (Trusty)
--
ii ca-certificates 20170717~14.04.1 all Common CA certificates
ii ca-certificates-java 20130815ubuntu1 all Common CA certificates (JKS keystore)
ii man-db 2.6.7.1-1ubuntu1 amd64 on-line manual pager
--

* After upgrade (xenial)
--
ii ca-certificates 20170717~16.04.1 all Common CA certificates
ii ca-certificates-java 20160321ubuntu1~16.04.1testb2 all Common CA certificates (JKS keystore)
ii man-db 2.7.5-1 amd64 on-line manual pager
--

"ca-certificates-java 20160321ubuntu1~16.04.1testb2" being my test package.

Regards,
Eric

Eric Desrochers (slashd)
Changed in dpkg (Ubuntu Xenial):
status: New → Confirmed
status: Confirmed → In Progress
importance: Undecided → Medium
assignee: nobody → Eric Desrochers (slashd)
Revision history for this message
Eric Desrochers (slashd) wrote :

Output of "/var/log/dist-upgrade/screenlog.0"

-----------------------------------
Preparing to unpack .../ca-certificates-java_20160321ubuntu1~16.04.1testb2_all.deb ...^M
Unpacking ca-certificates-java (20160321ubuntu1~16.04.1testb2) over (20130815ubuntu1) ...^M
dpkg: openjdk-7-jre-headless:amd64: dependency problems, but removing anyway as you requested:^M
 ca-certificates-java depends on openjdk-8-jre-headless | java7-runtime-headless; however:^M
  Package openjdk-8-jre-headless is not installed.^M
  Package java7-runtime-headless is not installed.^M
  Package openjdk-7-jre-headless:amd64 which provides java7-runtime-headless is to be removed.^M
^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 53541 files and directories currently installed.)^M
Removing openjdk-7-jre-headless:amd64 (7u151-2.6.11-2ubuntu0.14.04.1) ...^M
Removing tzdata-java (2017c-0ubuntu0.14.04) ...^M
(Reading database ... ^M(Reading database ... 5%^M(Reading database ... 10%^M(Reading database ... 15%^M(Reading database ... 20%^M(Reading database ... 25%^M(Reading database ... 30%^M(Reading database ... 35%^M(Reading database ... 40%^M(Reading database ... 45%^M(Reading database ... 50%^M(Reading database ... 55%^M(Reading database ... 60%^M(Reading database ... 65%^M(Reading database ... 70%^M(Reading database ... 75%^M(Reading database ... 80%^M(Reading database ... 85%^M(Reading database ... 90%^M(Reading database ... 95%^M(Reading database ... 100%^M(Reading database ... 52927 files and directories currently installed.)^M
-----------------------------------

- Eric

tags: added: sts
tags: added: patch
Eric Desrochers (slashd)
description: updated
description: updated
Eric Desrochers (slashd)
description: updated
summary: - upgrade from 14.04 to 16.04 fails with: ca-certificates 20170717~16.04.1
- failed to install/upgrade: triggers looping, abandoned
+ [SRU] upgrade from 14.04 to 16.04 fails with: ca-certificates
+ 20170717~16.04.1 failed to install/upgrade: triggers looping, abandoned
Revision history for this message
Eric Desrochers (slashd) wrote :
Eric Desrochers (slashd)
Changed in dpkg (Ubuntu Zesty):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Eric Desrochers (slashd)
Revision history for this message
Eric Desrochers (slashd) wrote :
Changed in dpkg (Ubuntu Zesty):
status: Confirmed → In Progress
description: updated
Eric Desrochers (slashd)
no longer affects: dpkg (Ubuntu Zesty)
no longer affects: dpkg (Ubuntu Xenial)
no longer affects: dpkg (Ubuntu)
Changed in ca-certificates-java (Ubuntu):
status: New → Fix Released
Changed in ca-certificates-java (Ubuntu Xenial):
status: New → In Progress
Changed in ca-certificates-java (Ubuntu Zesty):
status: New → In Progress
Changed in ca-certificates-java (Ubuntu Xenial):
importance: Undecided → Medium
Changed in ca-certificates-java (Ubuntu Zesty):
importance: Undecided → Medium
Changed in ca-certificates-java (Ubuntu Xenial):
assignee: nobody → Eric Desrochers (slashd)
Changed in ca-certificates-java (Ubuntu Zesty):
assignee: nobody → Eric Desrochers (slashd)
description: updated
Eric Desrochers (slashd)
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

Would not it make sense to depend on default-jre-headless instead of a specific version of the jdk? This way you always depend on the jdk available on the release.

Revision history for this message
Eric Desrochers (slashd) wrote :

The "default-jre-headless" might be a good approach to look at to avoid to have to maintain Debian/Ubuntu ca-certificates-java package for situation like this or others possible scenarios.

IMHO, I think it's better to stick with the actual fix for now and maybe submitting a bug to Debian (if no already existing) to consider the approach mentioned by jibel in comment #14.

Thoughts ?

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

If I compare a pure installation via apt-get install ca-certificates-java in Xenial (no upgrade involve) I see a behaviour change between the package currently in the archive and the one I have fix in a PPA.

--------------------------------
# Current ca-certificates-java (from archive) #
It is installaing "openjdk-9-jre-headless"

sudo apt-get install ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  java-common libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libjpeg-turbo8 libjpeg8 liblcms2-2 libnspr4 libnss3 libnss3-nssdb libpcsclite1 libxi6 libxrender1 libxtst6 openjdk-9-jre-headless
  x11-common

# ca-certificates-java fix to depend on openjdk-8
It is now installing "openjdk-8-jre-headless"

sudo apt-get install ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fontconfig-config fonts-dejavu-core java-common libavahi-client3 libavahi-common-data libavahi-common3 libcups2 libfontconfig1 libjpeg-turbo8 libjpeg8 liblcms2-2 libnspr4 libnss3 libnss3-nssdb libpcsclite1
  libxi6 libxrender1 libxtst6 openjdk-8-jre-headless x11-common

# rmadison openjdk-9-jre-headless --suite=xenial
 openjdk-9-jre-headless | 9~b114-0ubuntu1 | xenial/universe | amd64, i386

# rmadison openjdk-8-jre-headless --suite=xenial
 openjdk-8-jre-headless | 8u77-b03-3ubuntu3 | xenial | amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
--------------------------------

This might have an impact on user already having ca-certificates-java with openjdk-9 at next package upgrade.

I consider that using the package found in main (openjdk-8) is IMHO a better approach than using the universe (openjdk-9), but while this may affect current ca-certificates-java user. I wonder if we should put the xenial package to depen on openjdk-9.

I'll look with foundation team.

- Eric

Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

I have quickly test, and haven't had any problem to upgrade from actual package of "ca-certificates-java" from the archive to the "ca-certificates-java" (including the openjdk-8 fix) on my PPA.

Seems like in this case openjdk-9 remain and openjdk-8 is discard. Keeping the most recent openjdk version installed.

But I would gladly appreciate foundation team review to double-check.

# sudo apt-get install ca-certificates-java -y
--------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  ca-certificates-java
1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded.
Need to get 14.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/slashd/sf164025/ubuntu xenial/main amd64 ca-certificates-java all 20160321ubuntu1~16.04.1ppab1 [14.5 kB]
Fetched 14.5 kB in 0s (50.9 kB/s)
(Reading database ... 54312 files and directories currently installed.)
Preparing to unpack .../ca-certificates-java_20160321ubuntu1~16.04.1ppab1_all.deb ...
Unpacking ca-certificates-java (20160321ubuntu1~16.04.1ppab1) over (20160321) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.
Setting up ca-certificates-java (20160321ubuntu1~16.04.1ppab1) ...
Processing triggers for ca-certificates (20170717~16.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

done.
done.

--------------------------

#dpkg
--------------------------
ii ca-certificates 20170717~16.04.1 all Common CA certificates
ii ca-certificates-java 20160321ubuntu1~16.04.1ppab1 all Common CA certificates (JKS keystore)
ii openjdk-9-jre-headless:amd64 9~b114-0ubuntu1 amd64 OpenJDK Java runtime, using Hotspot JIT (headless)
--------------------------

- Eric

Eric Desrochers (slashd)
description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

# Discussion with foundation team.

<slangasek> slashd: interesting that this is a behavior difference; we actually *would* want it to pull in openjdk-8-jre-headless by default instead of -9- in xenial, since 9 is in universe and 8 is in main. It is a behavior change that we should call out as part of the SRU (i.e. "regression potential"), but I don't consider it a blocker for the SRU.

<slangasek> The debdiff for xenial looks fine, the question is the test case. Did you verify already that having this package available in apt sources fixes the upgrade failure?

<slangasek> then +1 from me

description: updated
Revision history for this message
Eric Desrochers (slashd) wrote :

Uploaded for Xenial and Zesty.

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello MadCatmkII, or anyone else affected,

Accepted ca-certificates-java into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ca-certificates-java/20160321ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Changed in ca-certificates-java (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in ca-certificates-java (Ubuntu Zesty):
status: In Progress → Fix Committed
tags: added: verification-needed-zesty
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello MadCatmkII, or anyone else affected,

Accepted ca-certificates-java into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ca-certificates-java/20161107ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Eric Desrochers (slashd) wrote :

[JUSTIFICATION XENIAL]
----------------------

The upgrade has been tested in 2 ways :
- Release upgrade using the fix package via a local archive.
- Release upgrade using the fix package via xenial-proposed.

In both cases, the upgrade went well installing "ca-certificates-java" version "20160321ubuntu1" which now depend on openjdk-8 instead of -7-, fixing the trigger failure.

* [Trusty]
ii ca-certificates 20170717~14.04.1
ii ca-certificates-java 20130815ubuntu1
ii openjdk-7-jre-headless:amd64 7u151-2.6.11-2ubuntu0.14.04.1

* [Xenial]
ii ca-certificates-java 20160321ubuntu1
rc openjdk-7-jre-headless:amd64 7u151-2.6.11-2ubuntu0.14.04.1
ii openjdk-8-jre-headless:amd64 8u151-b12-0ubuntu0.16.04.2

- Eric

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Eric Desrochers (slashd) wrote :

[JUSTIFICATION ZESTY]
----------------------

Release upgrade using "ca-certificates-java" package from xenial-proposed (part of the current SRU) and upgraded to "ca-certificates-java" from zesty-proposed during the release upgrade.
To simulate the situation once both packages will land in $RELEASE-updates.

The upgrade went well installing "ca-certificates-java" version "20161107ubuntu1" which now depend on openjdk-8 instead of -7-, fixing the trigger failure.

[Xenial]
ii ca-certificates-java 20160321ubuntu1 <== Currently in xenial-proposed
ii openjdk-8-jre-headless:amd64 8u151-b12-0ubuntu0.16.04.2

[Zesty]
ii ca-certificates-java 20161107ubuntu1 <== Currently in zesty-proposed
ii openjdk-8-jre-headless:amd64 8u151-b12-0ubuntu0.17.04.2

- Eric

Revision history for this message
Eric Desrochers (slashd) wrote :

[JUSTIFICATION ZESTY] (Part 2)
----------------------
Release upgrade using "ca-certificates-java" package currently found in -updates and upgraded to zesty-proposed during the release upgrade.

The upgrade went well installing "ca-certificates-java" version "20161107ubuntu1" which now depend on openjdk-8 instead of -7-, fixing the trigger failure.

[Xenial]

ii ca-certificates-java 20160321 <== Currently in xenial-updates
ii openjdk-9-jre-headless:amd64 9~b114-0ubuntu1

(Note: This "ca-certificates-java" package version installs openjdk-9 part of 'universe' (as mentionned in [Regression potential] section) as oppose to its successor that will install openjdk-8 part of 'main'. This is not considered a blocker after a conversation with slangasek (SRU verification team).

[Zesty]

ii ca-certificates-java 20161107ubuntu1 <== Currently in zesty-proposed
ii openjdk-9-jre-headless:amd64 9~b161-1

To summarize the possible scenarios:

* If Xenial users has "ca-certificates-java" package lower than "20160321ubuntu1" installed, they will have openjdk-9- and it will follow during the release upgrade to Zesty.
* If Xenial users installs "ca-certificates-java" for the first time with version "20160321ubuntu1", they will have openjdk-8- and it will follow during the release upgrade to Zesty.
* If Xenial users already have "ca-certificates-java" intalled and upgrade to version "20160321ubuntu1", they will keep openjdk-9- and it will follow during the release upgrade to Zesty.

- Eric

tags: added: verification-done-zesty
removed: verification-needed-zesty
Eric Desrochers (slashd)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ca-certificates-java - 20161107ubuntu1

---------------
ca-certificates-java (20161107ubuntu1) zesty; urgency=medium

  * Depend on openjdk-8 instead of openjdk-7. (LP: #1723198)

 -- Eric Desrochers <email address hidden> Fri, 15 Dec 2017 00:12:19 -0500

Changed in ca-certificates-java (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for ca-certificates-java has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ca-certificates-java - 20160321ubuntu1

---------------
ca-certificates-java (20160321ubuntu1) xenial; urgency=medium

  * Depend on openjdk-8 instead of openjdk-7. (LP: #1723198)

 -- Eric Desrochers <email address hidden> Thu, 14 Dec 2017 15:38:26 -0500

Changed in ca-certificates-java (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Eric Desrochers (slashd) wrote :

To re-enforce the early release of the package, here's a comment that has been brought to my attention from a user impacted by this issue : "I have 3 VMs that were reproducing this 100%, but now they no longer can. This does appear to be fixed. Thanks for the diligence and quick turnaround!".

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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