Docker ppc64le/ubuntu image cannot run Java on Docker for Mac

Bug #1708516 reported by Terry ZUo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
Won't Fix
Undecided
Unassigned

Bug Description

134094This error came out when I was trying to install default-java for ppc64le/ubuntu. My laptop is a Macbook and the Docker is "Docker for Mac"

Docker version:
Client:
 Version: 17.06.0-ce
 API version: 1.30
 Go version: go1.8.3
 Git commit: 02c1d87
 Built: Fri Jun 23 21:31:53 2017
 OS/Arch: darwin/amd64

Server:
 Version: 17.06.0-ce
 API version: 1.30 (minimum version 1.12)
 Go version: go1.8.3
 Git commit: 02c1d87
 Built: Fri Jun 23 21:51:55 2017
 OS/Arch: linux/amd64
 Experimental: true

First error I met is "cannot install default-jdk" :
------------------------------------------------------
root@3a0105267ef5:/# apt-get install -f -y default-jdk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  ca-certificates ca-certificates-java dbus default-jdk-headless default-jre default-jre-headless fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra hicolor-icon-theme java-common
  krb5-locales libasound2 libasound2-data libasyncns0 libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcairo2 libcap-ng0 libcups2 libdatrie1 libdbus-1-3
  libdrm-amdgpu1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libffi6 libflac8 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7 libgl1-mesa-dri
  libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgraphite2-3 libgssapi-krb5-2 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libhogweed4 libice-dev libice6
  libicu55 libidn11 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libllvm4.0 libnettle6 libnspr4 libnss3 libnss3-nssdb libogg0 libp11-kit0
  libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcsclite1 libpixman-1-0 libpng12-0 libpthread-stubs0-dev libpulse0 libsensors4 libsm-dev libsm6 libsndfile1 libsqlite3-0 libssl1.0.0 libtasn1-6
  libthai-data libthai0 libtiff5 libtxc-dxtn-s2tc0 libvorbis0a libvorbisenc2 libwrap0 libx11-6 libx11-data libx11-dev libx11-doc libx11-xcb1 libxau-dev libxau6 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0
  libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb1 libxcb1-dev libxcomposite1 libxcursor1 libxdamage1 libxdmcp-dev libxdmcp6 libxext6 libxfixes3 libxi6 libxinerama1 libxml2 libxrandr2
  libxrender1 libxshmfence1 libxt-dev libxt6 libxtst6 libxxf86vm1 openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless openssl sgml-base shared-mime-info tcpd ucf x11-common
  x11proto-core-dev x11proto-input-dev x11proto-kb-dev xdg-user-dirs xml-core xorg-sgml-doctools xtrans-dev
Suggested packages:
  dbus-user-session | dbus-x11 default-java-plugin libasound2-plugins alsa-utils cups-common gnutls-bin krb5-doc krb5-user librsvg2-common gvfs libice-doc liblcms2-utils pcscd pulseaudio lm-sensors
  libsm-doc libxcb-doc libxt-doc openjdk-8-demo openjdk-8-source visualvm icedtea-8-plugin libnss-mdns fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei fonts-wqy-zenhei fonts-indic
  sgml-base-doc debhelper
The following NEW packages will be installed:
  ca-certificates ca-certificates-java dbus default-jdk default-jdk-headless default-jre default-jre-headless fontconfig fontconfig-config fonts-dejavu-core fonts-dejavu-extra hicolor-icon-theme
  java-common krb5-locales libasound2 libasound2-data libasyncns0 libatk1.0-0 libatk1.0-data libavahi-client3 libavahi-common-data libavahi-common3 libbsd0 libcairo2 libcap-ng0 libcups2 libdatrie1
  libdbus-1-3 libdrm-amdgpu1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libedit2 libelf1 libexpat1 libffi6 libflac8 libfontconfig1 libfreetype6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgif7
  libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglib2.0-0 libglib2.0-data libgmp10 libgnutls30 libgraphite2-3 libgssapi-krb5-2 libgtk2.0-0 libgtk2.0-bin libgtk2.0-common libharfbuzz0b libhogweed4
  libice-dev libice6 libicu55 libidn11 libjbig0 libjpeg-turbo8 libjpeg8 libjson-c2 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 liblcms2-2 libllvm4.0 libnettle6 libnspr4 libnss3 libnss3-nssdb
  libogg0 libp11-kit0 libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpcsclite1 libpixman-1-0 libpng12-0 libpthread-stubs0-dev libpulse0 libsensors4 libsm-dev libsm6 libsndfile1 libsqlite3-0
  libssl1.0.0 libtasn1-6 libthai-data libthai0 libtiff5 libtxc-dxtn-s2tc0 libvorbis0a libvorbisenc2 libwrap0 libx11-6 libx11-data libx11-dev libx11-doc libx11-xcb1 libxau-dev libxau6 libxcb-dri2-0
  libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-render0 libxcb-shm0 libxcb-sync1 libxcb1 libxcb1-dev libxcomposite1 libxcursor1 libxdamage1 libxdmcp-dev libxdmcp6 libxext6 libxfixes3 libxi6
  libxinerama1 libxml2 libxrandr2 libxrender1 libxshmfence1 libxt-dev libxt6 libxtst6 libxxf86vm1 openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless openssl sgml-base
  shared-mime-info tcpd ucf x11-common x11proto-core-dev x11proto-input-dev x11proto-kb-dev xdg-user-dirs xml-core xorg-sgml-doctools xtrans-dev
0 upgraded, 148 newly installed, 0 to remove and 8 not upgraded.
Need to get 76.8 MB of archives.
After this operation, 429 MB of additional disk space will be used.
...
....<details are in file error1.txt>
...
Unpacking tcpd (7.6.q-25) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
/sbin/ldconfig.real: 1: /sbin/ldconfig.real: Syntax error: end of file unexpected
/sbin/ldconfig.real: 1: /sbin/ldconfig.real: Syntax error: end of file unexpected
dpkg: error processing package libc-bin (--unpack):
 subprocess installed post-installation script returned error exit status 2
Processing triggers for systemd (229-4ubuntu17) ...
Errors were encountered while processing:
 libc-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@3a0105267ef5:/#

The second error I met is cannot execute Java in the docker container:
------------------------------------------------------------------------
docker run -it --rm --name ppc64le -v /Users/xxx/Development/dockerImage/maketest/sdk/xl6490:/java -v /Users/xxx/Development/dockerImage/qemu_lib_static/qemu-ppc64le-static:/usr/bin/qemu-ppc64le-static ppc64le/ubuntu
root@9000c10344e4:/# /java/bin/java -version
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
root@9000c10344e4:/#

Did I miss any part to execute the Docker ppc64le/ubuntu image?

Tags: docker
Revision history for this message
Terry ZUo (terryzuoty) wrote :

upload the error1 file

Revision history for this message
Tianon Gravi (tianon) wrote :

This is likely due to Docker for Mac's transparent use of QEMU user mode emulation via binfmt-misc. I don't think I've ever seen OpenJDK work successfully under QEMU's user mode emulation, but I seem to recall the last time I went looking for an issue about it I wasn't very successful.

I think the most obvious place I saw issues was in the output of "java -version", which was incorrect under QEMU but correct on a real device (this was ARM, but ppc64le is likely in a similar boat, since QEMU is the common thread).

In other words, this isn't likely to be a bug in Ubuntu, OpenJDK, or even Docker, but rather in QEMU (although fixing it in OpenJDK itself might be possible). It's also possible that the POWER machine being emulated by QEMU is missing some (possibly newer?) instructions that Ubuntu's OpenJDK builds are trying to use.

Revision history for this message
Andrew Vagin (avagin-b) wrote :

We meet the same issue. We use Docker and qemu-user-static to build our project (CRIU) in travis-ci. We used ppc64le/ubuntu:trusty and it worked fine, but it was broken about a month ago (#1710399). I tried to use ppc64le/ubuntu:xenial and meed this issue.

Revision history for this message
Cristovao Cordeiro (cjdc) wrote :

This is a very old and inactive bug. Please re-open if the issue is still there in more recent versions.

Changed in cloud-images:
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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