Page MenuHomePhabricator

Update Java 7 to Java 8
Closed, DeclinedPublic

Description

Update Java 7 to Java 8 is urgently needed for use on some toollabs projects

Event Timeline

doctaxon created this task.Dec 9 2015, 9:59 PM
doctaxon raised the priority of this task from to High.
doctaxon updated the task description. (Show Details)
doctaxon added a project: Toolforge.
doctaxon added subscribers: doctaxon, Merl.
Restricted Application added a project: Cloud-Services. · View Herald TranscriptDec 9 2015, 9:59 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
doctaxon renamed this task from Update Java 7 to Java 9 to Update Java 7 to Java 8.Dec 9 2015, 10:02 PM
doctaxon updated the task description. (Show Details)
doctaxon set Security to None.
doctaxon updated the task description. (Show Details)Dec 9 2015, 10:26 PM
Krenair raised the priority of this task from High to Needs Triage.Dec 9 2015, 10:27 PM
Krenair added a subscriber: Krenair.

{{cn}}

Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptDec 9 2015, 10:27 PM

Please elaborate why this is urgent for the general audience.

Because Java 7 isn't supported by Oracle any more, not public way.
https://www.java.com/de/download/faq/java_7.xml
Are security updates unsupported, too?

Merl added a comment.Dec 10 2015, 12:18 AM

Two additional reasons:
First one is caused by wikimedia plan to change to ssl only, please read my comment at T105794#1574563. So I need Java 1.8 to keep my bot working.

The second one is that it causes much more work for me to always remember which java features are not available on labs. No one really writes new scripts in java 7 today. I am a professional java programmer and we don't use java 7 since two years. At the moment i am already dealing with java 9. To learn new language features i am writing many example programs. In the past i always wrote bots scripts which were asked by wikipedians so that as side affect wikipedia benefit from the time i investigated in learning the new language. Downgrading from java 9 to java 7 is nearly writing in a new language.

For me it would be ok if only few sge executions host support this and i can limit my scripts to these by a sge resource request.

Change 258113 had a related patch set uploaded (by Merlijn van Deen):
toollabs: install openjdk-8-headless

https://gerrit.wikimedia.org/r/258113

Once merged, this will install

openjdk version "1.8.0_40-internal"
OpenJDK Runtime Environment (build 1.8.0_40-internal-b09)
OpenJDK 64-Bit Server VM (build 25.40-b13, mixed mode)

on all trusty exec hosts. We don't have packages for precise and jessie available.

valhallasw triaged this task as Low priority.Dec 10 2015, 9:07 AM
valhallasw added a subscriber: MoritzMuehlenhoff.EditedDec 10 2015, 8:04 PM

Ok, so it's slightly more complicated. There is a trusty package in apt.wm.o, but it's outdated and currently no-one is responsible for it. I discussed the situation with @MoritzMuehlenhoff, and tried building the package for Trusty with these steps:

dget -ux http://apt.wikimedia.org/wikimedia/pool/backports/o/openjdk-8/openjdk-8_8u66-b17-1~bpo8%2b1.dsc
cd openjdk-8-8u66-b17
debian/rules debian/control distrel=trusty
DIST=trusty pdebuild

which gave me

root@tools-packages:/data/project/dpkg/src/openjdk# ls /var/cache/pbuilder/result/trusty-amd64/openjdk-8*
/var/cache/pbuilder/result/trusty-amd64/openjdk-8_8u66-b17-1~bpo8+1_amd64.changes
/var/cache/pbuilder/result/trusty-amd64/openjdk-8_8u66-b17-1~bpo8+1.diff.gz
/var/cache/pbuilder/result/trusty-amd64/openjdk-8_8u66-b17-1~bpo8+1.dsc
/var/cache/pbuilder/result/trusty-amd64/openjdk-8_8u66-b17.orig.tar.gz
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-dbg_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-demo_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-doc_8u66-b17-1~bpo8+1_all.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-jdk_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-jre_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-jre-headless_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-jre-jamvm_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-jre-zero_8u66-b17-1~bpo8+1_amd64.deb
/var/cache/pbuilder/result/trusty-amd64/openjdk-8-source_8u66-b17-1~bpo8+1_all.deb

which took about 3.5 hours:

I: Current time: Thu Dec 10 13:22:28 UTC 2015
I: Current time: Thu Dec 10 16:49:33 UTC 2015

Unfortunately, there seems to be a whole bunch of tests that don't pass :/. See the build log here: https://tools.wmflabs.org/dpkg/openjdk-8.build.gz (520KB).

Ah, that's another gotcha I forgot to mention about the openjdk packages: Not all tests of the test suite complete :-/

What I do for the updates in Debian is to compare the test suite results of the earlier build, that's something we could do here as well.

I compared the log file with the result from https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa/+build/8156693, as well as the i386 build from https://buildd.debian.org/status/logs.php?pkg=openjdk-8&arch=amd64, in this way:

grep openjdk-8_8u66-b17-1~bpo8+1_amd64.build -e "^\(Passed\|Error\|FAILED\)" | sort -k 2 | uniq > newlog
curl "https://launchpadlibrarian.net/221932084/buildlog_ubuntu-wily-amd64.openjdk-8_8u66-b17-1_BUILDING.txt.gz" | gunzip -c - | grep -e "^\(Passed\|Error\|FAILED\)" | sort -k 2 | uniq > oldlog

which shows 500-550 tests failing:

$ diff -u oldlog newlog  | grep '^+' | wc -l
533

which is *a lot*, even though typically ~90 tests are failing already.

https://code.launchpad.net/~malte.swart/+recipe/openjdk-8-backport is basically as bad, so I'm actually not that hopeful that this is going to be possible anymore...

valhallasw closed this task as Declined.Dec 11 2015, 9:53 PM
valhallasw claimed this task.

I spent a bit more time on this, but I don't see this working: the packages need more work (dependencies are wrong) and I have no way to easily confirm why the test cases are failing (OpenJDK uses a test framework that I don't understand and that I'm not willing to put enough time in to understand).

So:

  • until there is an official (ubuntu-supported) backport of openjdk-8, or,
  • we can build the backport ourselves based on an official version with minimal effort (i.e. 'run these four commands and a .deb runs out'),

there unfortunately will be no openjdk-8 on precise or trusty. @Merl, I'm not entirely sure what options we can offer to help you run your bot, but I will make a task for that shortly.

intracer added a comment.EditedJan 26 2016, 1:13 PM

You can now use https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa

OpenJDK 8 for for trusty and precise were published there on 2015-12-16

I just installed OpenJDK 8 from there with

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk

We don't use PPA's, because they effectively give the PPA owner root access to our systems. See T114645: Define policy for tools-local packages.

Change 258113 abandoned by Merlijn van Deen:
toollabs: install openjdk-8-headless on trusty

Reason:
Now solved on k8s instead

https://gerrit.wikimedia.org/r/258113