Wrong sine value with openjdk 7 server VM

Bug #1044857 reported by Marc Madaule
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenJDK
Fix Released
Unknown
openjdk-7 (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Fix Released
Medium
Unassigned

Bug Description

Some sines values are wrong in java.
Using latest Ubuntu (12.04.1 32bits) and latest OpenJDK 7 (7~u3-2.1.1~pre1-1ubuntu3), I get wrong sine values with "server" VM. When using "cacao" VM, the results are correct.
Correct value is also returned when using Oracle JRE on the same machine and on the .class generated by OpenJDK.
No tests done in 64bits.
I'm posting this bug report from a vmware virtual machine, but this bug has been spotted on multiple non-virtual computers. In some cases, instead of returning a wrong value the JVM crashes. (see example here www.java-forum.org/allgemeine-java-themen/140418-java-vm-crash-math-sin-double.html)

Steps to produce :

1/ Install Ubuntu 12.04.1 32bits, check 'upgrade' during install.

2/ Install OpenJDK 7
sudo apt-get install openjdk-7-jdk

3/ create file Test.java with the following content :
public class Test {
   public static void main(String[] args) {
      System.out.println("" + Math.sin(1700000));
   }
}

4/ compile Test.java to Test.class
javac Test.java

5/ run Test with server VM
java -server Test
It prints out a wrong answer :
1.6099231170917123E-29

5/ run Test with cacao VM
java -cacao Test
It prints out the right answer:
0.5711113510481804

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: openjdk-7-jdk 7~u3-2.1.1~pre1-1ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24
Uname: Linux 3.2.0-29-generic-pae i686
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Sun Sep 2 01:03:54 2012
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: openjdk-7
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marc Madaule (marc-madaule) wrote :
description: updated
Changed in openjdk:
status: Unknown → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

fixed in quantal

Changed in openjdk-7 (Ubuntu):
status: New → Fix Released
Changed in openjdk-7 (Ubuntu Precise):
importance: Undecided → Medium
status: New → In Progress
milestone: none → precise-updates
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.8 KiB)

This bug was fixed in the package openjdk-7 - 7u7-2.3.2-1ubuntu0.12.04.1

---------------
openjdk-7 (7u7-2.3.2-1ubuntu0.12.04.1) precise-security; urgency=low

  * Make the avian VM a known runtime.

openjdk-7 (7u7-2.3.2-1ubuntu1) quantal; urgency=low

  * Fix 32bit hotspot build, don't set maximal heap space lower than
    minimal heap space for the docs build.
  * d/p/sane-library-paths.patch, d/p/ant-diagnostics.diff,
    d/p/fix-race-cond-print.diff, d/p/gcc-hotspot-opt-O[02].diff,
    d/p/gcc-mtune-generic.diff, d/p/openjdk-6986968.diff: Remove, not used.
  * Remove unused shark/llvm-3.0 patches.
  * d/p/zero-only-use-floating-point-if-floating-poi.patch: Remove, applied
    upstream.
  * Don't explicitly build with -march=i586 on i386 architectures.
  * Re-apply zero-missing-headers.diff.
  * Disable cacao builds, needs update for 7u7.
  * For Ubuntu quantal, set priorities for alternatives higher than for
    OpenJDK 6.
  * Call update-alternatives when the existing priority for the alternative
    is lower than the current one.
  * Configure with --disable-downloading.
  * Pass -avoid-version to libtool to create a JamVM libjvm.so without SONAME
    version numbers to match the Hotspot Server/Client libjvm.so. LP: #850433.
  * Revert the following change: Move libgnome2-0, libgnomevfs2-0, libgconf2-4
    from Depends of JRE package to Recommends (#661465).
    The proper fix is to create a -jdk-headless package, or not depending on
    these gnome packages at all (e.g. using XDG libraries).

openjdk-7 (7u7-2.3.2-1) experimental; urgency=low

  * New upstream IcedTea7 2.3.2 release.
  * Security fixes:
    - CVE-2012-4681: Reintroduce PackageAccessible checks removed in 6788531.
    - S7079902, CVE-2012-1711: Refine CORBA data models.
    - S7143606, CVE-2012-1717: File.createTempFile should be improved
      for temporary files created by the platform.
    - S7143614, CVE-2012-1716: SynthLookAndFeel stability improvement.
    - S7143617, CVE-2012-1713: Improve fontmanager layout lookup operations.
    - S7143851, CVE-2012-1719: Improve IIOP stub and tie generation in RMIC.
    - S7143872, CVE-2012-1718: Improve certificate extension processing.
    - S7152811, CVE-2012-1723: Issues in client compiler.
    - S7157609, CVE-2012-1724: Issues with loop.
    - S7160757, CVE-2012-1725: Problem with hotspot/runtime_classfile.
    - S7165628, CVE-2012-1726: Issues with java.lang.invoke.MethodHandles.Lookup.
  * Bump version to 7u7 (OpenJDK), 2.3.2 (IcedTea). Closes: #685276.
  * d/p/icedtea7-forest-jdk_7104625-XEvent_wrap_logging_calls_with_if.patch,
    d/p/hotspot-sparc.diff: Remove, integrated upstream.
  * d/p/{deb-multiarch,fix_extra_flags,hotspot-no-werror}.diff:
    Add variants for hotspot and zero builds.
  * d/p/default-jvm-cfg.diff, d/p/icedtea-4953367.patch,
    d/p/icedtea-patch.diff, d/p/icedtea-pretend-memory.diff,
    d/p/libpcsclite-dlopen.diff, d/p/nonreparenting-wm.diff:
    Update for 2.3.2.
  * Remove build support for Ubuntu releases earlier than hardy.
  * d/update-shasum.sh: Only update the shasums of the -dfsg tarballs.
  * Don't apply shark patches (not built anyway).

openjdk-7 (7~u3-2.1.1-3) unstable; urgency=low

...

Read more...

Changed in openjdk-7 (Ubuntu Precise):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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