← Back to team overview

openjdk team mailing list archive

[Bug 1438575] Re: OpenJdk 7 and OpenJdk 8 miss-report the os.arch field and cause java apps to crash.

 

------- Comment From tdaitx@xxxxxxxxxx 2015-04-15 21:40 EDT-------
(In reply to comment #13)
> there is currently no working patch for openjdk-7 afaics

Andrew Hughes made those patches for OpenJDK 7 and applied to IcedTea
master repository, it's going to be available on IcedTea 2.6 release.

There's a bug report at
http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2236

The patch itself was not added to the bug report but can be fetched from the following 2 commits:
http://icedtea.classpath.org//hg/icedtea7-forest/hotspot?cmd=changeset;node=4fdaf786d977
http://icedtea.classpath.org//hg/icedtea7-forest/jdk?cmd=changeset;node=bf4c2a6c354d

AFAIK RedHat's patch is the same as the ones available in both Fedora
and CentOS sources.

Fedora: http://koji.fedoraproject.org/koji/buildinfo?buildID=628482
(fetch, expand the source, and look for rh1191652-*.patch)

CentOS:
https://git.centos.org/blob/rpms!java-1.7.0-openjdk/3c3d8d7cb372ac0351f4881d0e50a1185d7e9466/SOURCES!rh1191652-jdk.patch
https://git.centos.org/blob/rpms!java-1.7.0-openjdk/3c3d8d7cb372ac0351f4881d0e50a1185d7e9466/SOURCES!rh1191652-hotspot.patch

Regards,
Tiago

** Bug watch added: Iced Tea Bugzilla #2236
   http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2236

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1438575

Title:
  OpenJdk 7 and OpenJdk 8 miss-report the os.arch field and cause java
  apps to crash.

Status in openjdk-7 package in Ubuntu:
  Incomplete
Status in openjdk-8 package in Ubuntu:
  New

Bug description:
  Problem Description
  =======================================
  OpenJdk 7 and OpenJdk 8 miss report the os.arch field and cause java apps to crash.

  When we run under OpenJDK on a ubuntu ppc64el system the os.arch
  system properites gets reported as ppc64.

  This causes multiple java libraries to load the wrong native
  architecture modules as it thinks this is a big endian machine, rather
  than a ppc64le machine.

  ---uname output---
  Linux tulgpu002 3.16.0-30-generic #40-Ubuntu SMP Mon Jan 12 22:07:11 UTC 2015 ppc64le ppc64le ppc64le GNU/Linux
   
  Machine Type = 8247-42L 

  Steps to Reproduce
  ===================================================
  make sure an openjdk is installed.
  sudo apt-get install openjdk-7-jdk

  Create a  very simple java properties dumper.

  cat >sysprop.java <<EOF
  class sysprop{
    public static void main(String[] args){
      System.getProperties().list(System.out);
     }
  }
  EOF

  and run it and look for the os.arch output.

  
  javac sysprop.java

  ralphbel@tulgpu002:~/java$ java sysprop |  grep arch
  os.arch=ppc64
  sun.arch.data.model=64

  == Comment: #2 - Ralph E. Bellofatto <ralphbel@xxxxxxxxxx> - 2015-03-17 05:39:29 ==
  Acutally this is ubuntu 14.10.

  ralphbel@tulgpu002:~/java$ lsb_release -a
  No LSB modules are available.
  Distributor ID: Ubuntu
  Description:    Ubuntu 14.10
  Release:        14.10
  Codename:       utopic

  I suspect this problem also exists on the ubuntu 14.04 releases
  although we have not tried that yet...

  == Comment: #3 - Ralph E. Bellofatto <ralphbel@xxxxxxxxxx> - 2015-03-17 05:51:04 ==
  more information on the package we are using:

  ralphbel@tulgpu002:~/jnr-ffi$ apt-cache policy openjdk-7-jdk
  openjdk-7-jdk:
    Installed: 7u75-2.5.4-1~utopic1
  and
  ralphbel@tulgpu002:~/jnr-ffi$ apt-cache policy openjdk-8-jdk
  openjdk-8-jdk:
    Installed: 8u40~b09-1

  == Comment: #4 - Ralph E. Bellofatto <ralphbel@xxxxxxxxxx> - 2015-03-18 15:04:51 ==
  This is an interesting comment in the openJDK bugs database:

  ****************************
  https://bugs.openjdk.java.net/browse/JDK-8073139
  ****************************

  apparently there was a decision to NOT give the architecture a unique
  name, and that is inconstant with other JDK/JRE's, and it breaks a LOT
  of code.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1438575/+subscriptions