Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7151897

gamma test broken in jdk7u and 8 [macosx]

XMLWordPrintable

    • unknown
    • os_x

      test_gamma script in Mac os X build is failing on 8 as shown in mail conversation below.
      To fix the problem in the 8 build means fixing it in 7u because it's a 7u libjava that is used
      with the gamma launcher. It will have to be fixed in 8 for future Java versions.

      The error doesn't affect the 7u build because the script detects a non Open JDK bootstrap is being used
      (the Apple JDK) and it exits quietly.

      >> The error occurs running ./test_gamma:
      >> ...
      >> echo "Doing vm.make build:"
      >> Doing vm.make build:
      >> All done.
      >> cd bsd_amd64_compiler2/product&& ./test_gamma
      >> Using java runtime at: /Users/stephen/Library/Java/JavaVirtualMachines/1.7.0_04-2012_03_04.jdk/Contents/Home/jre
      >> Error occurred during initialization of VM
      >> java.lang.NullPointerException
      >> at java.util.Hashtable.put(Hashtable.java:432)
      >> at java.lang.System.initProperties(Native Method)
      >> at java.lang.System.initializeSystemClass(System.java:1115)
      >
      > OK, I think I figured it out. It's our old friend LANG.
      >
      > Earlier in this thread, John had observed
      >
      >> The NPE is because libjava.dylib is handing a null value to Hashtable, for the key "user.language", in System.c.
      >
      > The user.language property comes from (or at least is related to) the LANG environment variable. If LANG is unset, I get this crash in test_gamma. If LANG is set to en_US.UTF-8 the build succeeds.
      >
      > Curiously, with LANG=en_US.UTF-8, the build log says
      >
      > WARNING: LANG has been set to en_US.UTF-8, this can cause build failures.
      > Try setting LANG to 'C'.
      >
      > but the build succeeds. There is no corresponding warning if LANG is unset. :-(
      >
      > Also curiously, the jdk7u build on Mac doesn't have the same sensitivity to the absence of LANG. I'll try this out on other platforms.
      >
      > I'm not sure, but it could be that this problem is unrelated to Michael's changes. If so, then sorry for the noise. But at least we might have gotten a lead on some other build mysteries.
      >
      > s'marks
      Great. That's good to know. From what I can see, the reason why 7u does not show the
      same symptom is because test_gamma bails out in the 7u build because it doesn't know
      the file/directory structure of the Apple (boot) JDK. So, it doesn't actually run the test.

      Since 8 is using an openjdk 7 bootstrap, it does know where to find the files and it runs
      the test. The main Java launcher is able to deal with LANG not being set. It sets
      user.language to a reasonable default. But, it appears like gamma doesn't do that
      (and hence the null key for Hashtable.put()).

            Unassigned Unassigned
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: