Broken package dependencies when installing OpenJDK 7 on Ubuntu 12.04 machines

RESOLVED WONTFIX

Status

task
--
major
RESOLVED WONTFIX
5 years ago
5 years ago

People

(Reporter: whimboo, Unassigned)

Tracking

({regression})

Details

(Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1235] [qa-automation-blocked])

About 2 weeks ago I accidentally re-imaged one of our VMs with kickstart and Ubuntu 12.04. Since the landing of my patch on bug 1008880 we fail to install Java on Ubuntu 12.04 because broken dependencies of the tzdata-java package:

The following packages have unmet dependencies:
 tzdata-java : Depends: tzdata (= 2012e-0ubuntu0.12.04.1) but 2014a-0ubuntu0.12.04 is to be installed
E: Unable to correct problems, you have held broken packages.

I get lots of email with puppet failures, and somehow we even end-up in an infinite loop for restarts. About each 5 minutes the box (10.22.73.141) is rebooted.

Why do we have those package dependency conflicts? The old system should not use a 14.04 repo. As sources list file show we get the updates from here:

# cat precise.list 
# Managed by puppet
deb http://repos/repos/apt/ubuntu precise main restricted universe
[root@mm-ub-1204-64 sources.list.d]# cat precise-security.list 
# Managed by puppet
deb http://repos/repos/apt/ubuntu precise-security main restricted universe

Dustin, is there something wrong with the package index, so we mix-up Precise and Trusty?
Here the full log output from Puppet agent:

The following packages have unmet dependencies:
 openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u15-2.3.7-0ubuntu1~12.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Wrapped exception:
Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install openjdk-7-jre' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u15-2.3.7-0ubuntu1~12.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Tue Jul 15 05:05:39 -0700 2014 /Stage[main]/Packages::Java/Package[openjdk-7-jre]/ensure (err): change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install openjdk-7-jre' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openjdk-7-jre : Depends: openjdk-7-jre-headless (= 7u15-2.3.7-0ubuntu1~12.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.



When I try to install openjdk-7-jre-headless I see:

# apt-get install openjdk-7-jre-headless
[..]
The following packages have unmet dependencies:
 openjdk-7-jre-headless : Depends: tzdata-java (>= 2012e-0ubuntu0.12.04.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


# apt-get install tzdata-java
The following packages have unmet dependencies:
 tzdata-java : Depends: tzdata (= 2012e-0ubuntu0.12.04.1) but 2014a-0ubuntu0.12.04 is to be installed
E: Unable to correct problems, you have held broken packages.


# apt-cache policy tzdata-java
tzdata-java:
  Installed: (none)
  Candidate: 2012e-0ubuntu0.12.04.1
  Version table:
     2012e-0ubuntu0.12.04.1 0
        500 http://repos/repos/apt/ubuntu/ precise-security/main amd64 Packages
     2012b-1 0
        500 http://repos/repos/apt/ubuntu/ precise/main amd64 Packages

# apt-cache show openjdk-7-jre-headless
Package: openjdk-7-jre-headless
Priority: optional
Section: universe/java
Installed-Size: 48019
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: OpenJDK Team <openjdk@lists.launchpad.net>
Architecture: amd64
Source: openjdk-7
Version: 7u15-2.3.7-0ubuntu1~12.04
Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless
Depends: openjdk-7-jre-lib (= 7u15-2.3.7-0ubuntu1~12.04), ca-certificates-java, tzdata-java (>= 2012e-0ubuntu0.12.04.1), java-common (>= 0.28), libcups2 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628-2), libjpeg8 (>= 8c), libnss3-1d (>= 3.12.9+ckbi-1.82-0ubuntu4), libpcsclite1, libc6 (>= 2.14), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.26.0), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4)
Pre-Depends: multiarch-support
Recommends: icedtea-7-jre-jamvm (= 7u15-2.3.7-0ubuntu1~12.04)
Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, fonts-ipafont-gothic, fonts-ipafont-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts-core, ttf-telugu-fonts, ttf-oriya-fonts, ttf-kannada-fonts, ttf-bengali-fonts
Conflicts: icedtea-netx (<< 1.1.1-2~)
Filename: pool/universe/o/openjdk-7/openjdk-7-jre-headless_7u15-2.3.7-0ubuntu1~12.04_amd64.deb
Size: 35340954
MD5sum: e5f396a2f6a2bd50334f3a58f36ecc5d
SHA1: c95e8efb87744a4b52bf88e1564b1a6e053f8af3
SHA256: b35cbaf816ef59035de9c76e2da482c1692e6059064957947767875015b6bfcb
Description: OpenJDK Java runtime, using Hotspot JIT (headless)
Multi-Arch: same
Homepage: http://openjdk.java.net/
Description-md5: c5ec89b1a6bac9cd86f6e61756d18fb9
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu

Package: openjdk-7-jre-headless
Priority: optional
Section: universe/java
Installed-Size: 82167
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: OpenJDK Team <openjdk@lists.launchpad.net>
Architecture: amd64
Source: openjdk-7
Version: 7~u3-2.1.1~pre1-1ubuntu2
Provides: java-runtime-headless, java2-runtime-headless, java5-runtime-headless, java6-runtime-headless, java7-runtime-headless
Depends: openjdk-7-jre-lib (>= 7~u3-2.1.1~pre1-1ubuntu2), ca-certificates-java, tzdata-java, java-common (>= 0.28), libcups2 (>= 1.4.0), liblcms2-2 (>= 2.2+git20110628-2), libjpeg8 (>= 8c), libnss3-1d (>= 3.12.9+ckbi-1.82-0ubuntu4), libpcsclite1, libc6 (>= 2.14), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgcc1 (>= 1:4.1.1), libglib2.0-0 (>= 2.26.0), libstdc++6 (>= 4.1.1), zlib1g (>= 1:1.1.4)
Pre-Depends: multiarch-support
Recommends: icedtea-7-jre-cacao (= 7~u3-2.1.1~pre1-1ubuntu2), icedtea-7-jre-jamvm (= 7~u3-2.1.1~pre1-1ubuntu2)
Suggests: libnss-mdns, sun-java6-fonts, ttf-dejavu-extra, fonts-ipafont-gothic, fonts-ipafont-mincho, ttf-wqy-microhei | ttf-wqy-zenhei, ttf-indic-fonts-core, ttf-telugu-fonts, ttf-oriya-fonts, ttf-kannada-fonts, ttf-bengali-fonts
Conflicts: icedtea-netx (<< 1.1.1-2~)
Filename: pool/universe/o/openjdk-7/openjdk-7-jre-headless_7~u3-2.1.1~pre1-1ubuntu2_amd64.deb
Size: 28060512
MD5sum: 3a0d2bee651081d860cd0088face49b1
SHA1: bdfd77a1c56639dd2bc0ffcb84b597eed965734f
SHA256: 6e6a2ff03a570eedba76496950e10a06f41523a5b26bde9a1ac7616974b02f56
Description: OpenJDK Java runtime, using Hotspot JIT (headless)
Multi-Arch: same
Homepage: http://openjdk.java.net/
Description-md5: c5ec89b1a6bac9cd86f6e61756d18fb9
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
# apt-cache show tzdata
Package: tzdata
Priority: required
Section: libs
Installed-Size: 1651
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: all
Version: 2014a-0ubuntu0.12.04
Replaces: libc0.1, libc0.3, libc6, libc6.1
Provides: tzdata-wheezy
Depends: debconf (>= 0.5) | debconf-2.0
Filename: ./precise/pool/main/t/tzdata/tzdata_2014a-0ubuntu0.12.04_all.deb
Size: 448494
MD5sum: 0abff496ade26ddd0cc04b3b5392e6a2
SHA1: 44eb302e8185da45d03ac67807bf67ea1c501822
SHA256: 5c51f5008d283508912ca44bff81b758ce399d373076e90baa66bfae8a6054ac
SHA512: 56101d7ebd1b34009b0f47d374767d618588617d5280b20609937bca5d026f3214176e908b108cc14580bbc439598586d7fd171fd62b1308e9d85c530fdcf58b
Description: time zone and daylight-saving time data
Multi-Arch: foreign
Homepage: http://www.iana.org/time-zones

Package: tzdata
Priority: required
Section: libs
Installed-Size: 1702
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: all
Version: 2012e-0ubuntu0.12.04.1
Replaces: libc0.1, libc0.3, libc6, libc6.1
Provides: tzdata-wheezy
Depends: debconf (>= 0.5) | debconf-2.0
Filename: pool/main/t/tzdata/tzdata_2012e-0ubuntu0.12.04.1_all.deb
Size: 474432
MD5sum: 7256a50605411c320a651448c8ad198e
SHA1: e690999f83b40a01be7471bb6afcc42d653bac32
SHA256: e94002ba7e7d08b789bb583199a2541e05215a37d807e921e1fcb5d19ebf1afb
Description: time zone and daylight-saving time data
Multi-Arch: foreign
Homepage: http://www.iana.org/time-zones
Description-md5: a77a3cc9a67658dd7cfdc6547391b8f8
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal

Package: tzdata
Priority: required
Section: libs
Installed-Size: 1700
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: all
Version: 2012b-1
Replaces: libc0.1, libc0.3, libc6, libc6.1
Provides: tzdata-wheezy
Depends: debconf (>= 0.5) | debconf-2.0
Filename: pool/main/t/tzdata/tzdata_2012b-1_all.deb
Size: 407444
MD5sum: c0ebf4d8da53d20a1d3f60bbe0fa5587
SHA1: 43b9c88db28833a899d6cc8f0654e5a5a7669f8c
SHA256: 4603ff30e1570003a8a2423c83ca02fafc8ff391ddc17e7b2e3c7f54bce5b00e
Description: time zone and daylight-saving time data
Multi-Arch: foreign
Homepage: http://www.iana.org/time-zones
Description-md5: a77a3cc9a67658dd7cfdc6547391b8f8
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y
Task: minimal
Dustin, is there a reason why trusty is listed under /data/repos/apt/ubuntu/precise/dists ?

# ll
total 16
drwxr-xr-x 5 puppetsync puppetsync 4096 Feb 22  2013 precise
drwxr-xr-x 5 puppetsync puppetsync 4096 Feb 22  2013 precise-security
drwxr-xr-x 5 puppetsync puppetsync 4096 May 30 19:35 trusty
drwxr-xr-x 5 puppetsync puppetsync 4096 May 30 19:35 trusty-security

Shouldn't this only contain Package indexes for precise?
Summary: Broken package dependencies when installing Java on Ubuntu 12.04 machines → Broken package dependencies when installing OpenJDK 7 on Ubuntu 12.04 machines
Ok, so the latest tzdata-java requires a tzdata version which is not available on our mirror:
http://packages.ubuntu.com/de/precise/tzdata-java

tzdata-java (2014e-0ubuntu0.12.04) => tzdata (= 2014e-0ubuntu0.12.04) 

# ll /data/repos/apt/ubuntu/pool/main/t/tzdata
total 2324
-rw-r--r-- 1 puppetsync puppetsync 407444 Mar  6  2012 tzdata_2012b-1_all.deb
-rw-r--r-- 1 puppetsync puppetsync  99844 Mar  6  2012 tzdata_2012b-1.debian.tar.xz
-rw-r--r-- 1 puppetsync puppetsync   1912 Mar  6  2012 tzdata_2012b-1.dsc
-rw-r--r-- 1 puppetsync puppetsync 207782 Mar  6  2012 tzdata_2012b.orig.tar.gz
-rw-r--r-- 1 puppetsync puppetsync 474432 Sep 20  2012 tzdata_2012e-0ubuntu0.12.04.1_all.deb
-rw-r--r-- 1 puppetsync puppetsync 100900 Sep 20  2012 tzdata_2012e-0ubuntu0.12.04.1.debian.tar.xz
-rw-r--r-- 1 puppetsync puppetsync   1397 Sep 20  2012 tzdata_2012e-0ubuntu0.12.04.1.dsc
-rw-r--r-- 1 puppetsync puppetsync 206251 Aug 14  2012 tzdata_2012e.orig.tar.gz
-rw-r--r-- 1 puppetsync puppetsync 181992 Apr  2 21:39 tzdata_2014b-1_all.deb
-rw-r--r-- 1 puppetsync puppetsync 100732 Apr  2 21:39 tzdata_2014b-1.debian.tar.xz
-rw-r--r-- 1 puppetsync puppetsync   1281 Apr  2 21:39 tzdata_2014b-1.dsc
-rw-r--r-- 1 puppetsync puppetsync 220771 Apr  2 21:39 tzdata_2014b.orig.tar.gz
-rw-r--r-- 1 puppetsync puppetsync 134014 Mar  6  2012 tzdata-java_2012b-1_all.deb
-rw-r--r-- 1 puppetsync puppetsync 139538 Sep 20  2012 tzdata-java_2012e-0ubuntu0.12.04.1_all.deb
-rw-r--r-- 1 puppetsync puppetsync  71966 Apr  2 21:39 tzdata-java_2014b-1_all.deb
That subdirectory is in place for compatibility when we were considering moving to distinct trusty and precise repos, but Jake showed me the error of my ways and we never deployed that.  All Ubuntu systems -- trusty and precise -- use /data/repos/apt/ubuntu directly.

[root@releng-puppet2.srv.releng.scl3.mozilla.com ubuntu]# ls
dists  pool  precise  project

[root@releng-puppet2.srv.releng.scl3.mozilla.com ubuntu]# ls -l precise/
total 0
lrwxrwxrwx 1 root root  8 Apr 22 06:38 dists -> ../dists
lrwxrwxrwx 1 root root  7 Apr 22 06:38 pool -> ../pool
lrwxrwxrwx 1 root root 10 Apr 22 06:38 project -> ../project
Also not sure where '2014a-0ubuntu0.12.04' is coming from. We do not have this at all. Dustin, I would need your help here.
Maybe we should get rid of the Java (OpenJDK) installation on Ubuntu 12.04. We will stop using that version really soon anyway.
The tzdata problem is what the (awkwardly-named) releng-updates repo is for.  Just put the updated package there, hopefully with few or no dependencies, and you should be good to go.
Talked with Dustin on IRC, and he want to get this fixed. Just as note this problem only exists for precise but not trusty.
Assignee: relops → dustin
Status: NEW → ASSIGNED
Specifically, I agreed to get tzdata 2014e into releng-updates.  Oddly, releng-updates has tzdata 2014a, while the upstream precise mirror has 2014b -- I'm not sure how that happened.
Given that this system here is running in our staging environment, I hope that we can get this fixed soon. The worst fallback would be to re-create the VM based off the template.
Severity: normal → major
Whiteboard: [qa-automation-blocked]
(In reply to Dustin J. Mitchell [:dustin] from comment #10)
> Specifically, I agreed to get tzdata 2014e into releng-updates.  Oddly,
> releng-updates has tzdata 2014a, while the upstream precise mirror has 2014b
> -- I'm not sure how that happened.

To answer this, the upstream mirror has 2014b, but that's only in Trusty's indexes.

Existing ubuntu systems have tzdata 2014a installed, so I hope that updating to 2014e would be OK, but I don't know how to guarantee that short of creating a full staging environment and running all tests on all branches (a multi-day, multi-person endeavor).

I copied http://us.archive.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2014e-1_all.deb into the repo and (run against the relabs puppetmaster)

[root@talos-linux32-ix-022 ~]# apt-cache policy tzdata
tzdata:
  Installed: 2014a-0ubuntu0.12.04
  Candidate: 2014e-1
  Version table:
     2014e-1 0
        500 http://relabs-puppet2.relabs.releng.scl3.mozilla.com/repos/apt/releng-updates/ precise-updates/all i386 Packages
 *** 2014a-0ubuntu0.12.04 0
        500 http://relabs-puppet2.relabs.releng.scl3.mozilla.com/repos/apt/releng-updates/ precise-updates/all i386 Packages
        100 /var/lib/dpkg/status
     2012e-0ubuntu0.12.04.1 0
        500 http://relabs-puppet2.relabs.releng.scl3.mozilla.com/repos/apt/ubuntu/ precise-security/main i386 Packages
     2012b-1 0
        500 http://relabs-puppet2.relabs.releng.scl3.mozilla.com/repos/apt/ubuntu/ precise/main i386 Packages

so new installs and anything running 'apt-get upgrade' would get the new version of this package.  We might want to be using 2014e-0ubuntu0.12.04 instead, as a backport.  I'm not really sure.

One option is to pin the package for releng systems, but that's ugly.

Is it possible to just install tzdata-java_2104b-1 instead, since we already have the tzdata required by that package?
Rail suggests another option: add a new repo for java and any of its dependencies that aren't in the trusty repos.

That's probably the cleanest and least risky option here, and pretty easy to set up using the same technique as you did for flash.  We should probably just call that the best practice..
So for Flash it didn't work this way because there are packages outside of the default repos. That is not the case for openjdk. All are part of the default repos. We always want to base on the latest. So I don't see the reason why we really need another repo here. Otherwise we would have to do this for nearly all the packages someone will install, which are available by default. I'm not so satisfied by this option.
Ok, so i was able to get the Oracle version of Java installed for now on that host. Question is if we should better use that one as openjdk, given that the latter could cause various problems. It's nothing I can do until I'm back from vacation.
Also keep in mind that we (QA) want to get rid of 12.04 once the 14.04 nodes are online and fully puppetized.
" We always want to base on the latest. So I don't see the reason why we really need another repo here."

That's your reason!  At least for Precise, "latest" and the existing repos are mutually incompatible.

Another option may be, for precise, to take the latest java version that was available when our precise repo was frozen.
I can't tell if this is resolved, but the part I was going to do is done..
Assignee: dustin → hskupin
Dustin, which part have you done? Having more details on that would help me to see what's left. Not sure if I'm able to fix that through. My knowledge in package handling on Ubuntu is not that good, and I don't have the time right now to learn about all that.
Assignee: hskupin → relops
Status: ASSIGNED → NEW
comment 10 is what I did

In the interim, we've also adopted the best practice of putting new functionality in new custom/ repos.

So some of the remaining options are:
 * maybe it just works now that tzdata 2014e is in releng-updates
 * install tzdata-java_2104b-1 instead by pinning its version and installing it before the jdk
 * put the JDK package and all of its dependencies (including tzdata 2014e) into custom/openjdk7

In think that aptly might help with the third option.

Updated

5 years ago
Whiteboard: [qa-automation-blocked] → [kanban:engops:https://kanbanize.com/ctrl_board/6/398] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/398] [qa-automation-blocked] → [kanban:engops:https://kanbanize.com/ctrl_board/6/405] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/405] [qa-automation-blocked] → [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [qa-automation-blocked] → [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1224] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1224] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1230] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1230] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1233] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked]

Updated

5 years ago
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1233] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1235] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked]
Whiteboard: [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1235] [kanban:engops:https://kanbanize.com/ctrl_board/6/515] [qa-automation-blocked] → [kanban:engops:https://mozilla.kanbanize.com/ctrl_board/6/1235] [qa-automation-blocked]
This hasn't been a problem for 14.04, and QA isn't using 12.04 anymore.  So we're going to close this for the moment.  If we run into it with newer Ubuntu versions, we'll have a better idea of how to fix it.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.