RVM

BaseBasePoisoned build segfaults during VM bootup on pcc64-linux

Details

  • Number of attachments :
    0

Description

For ppc32-linux, BaseBasePoisoned can run dacapo fop successfully.
For ppc64-linux, BaseBasePoisoned crashes during VM bootup:

[dgrove@piano junk]$ ../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/rvm -verbose:gc -X:verboseBoot=20 -X:verbose -jar -verbose:jni ../dacapo-2006-10.jar fop
JikesRVM: loading from "../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/RVM.data.image"
JikesRVM: loading from "../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/RVM.code.image"
JikesRVM: loading from "../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/RVM.rmap.image"
JikesRVM: setting linkage
JikesRVM: boot record contents:
bootImageDataStart: 0x00000031000000
bootImageDataEnd: 0x00000032b83000
bootImageCodeStart: 0x00000035000000
bootImageCodeEnd: 0x00000035434000
bootImageRMapStart: 0x00000038000000
bootImageRMapEnd: 0x00000038044000
initialHeapSize: 0x00000001400000
maximumHeapSize: 0x00000006400000
tiRegister: 0x00000000040000
spRegister: 0x00000031e265d0
ipRegister: 0x000000352be4a0
tocRegister: 0x00000031080500
sysConsoleWriteCharIP:0x00000010010b98
JikesRVM: calling boot thread: jtoc = 0x00000031080500 pr = 0x0000003205af38 tid = 262144 fp = 0x00000031e265b8
Booting
Setting up static fields
Setting up current Processor
Doing thread initialization
JikesRVM: sysPthreadSelf: thread 323581872
Setting up memory manager: bootrecord = 0x0000000031000018
Initializing baseline compiler options to defaults
Fetching command-line arguments
Early stage processing of command line
Collector processing rest of boot options
Initializing bootstrap class loader: ../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/jksvm.jar:../rvm-trunk/dist/BaseBasePoisoned_ppc64-linux/rvmrt.jar
Running various class initializers
running class intializer for java.util.WeakHashMap
invoking method < BootstrapCL, Ljava/util/WeakHashMap; >.<clinit> ()V
running class intializer for org.jikesrvm.classloader.Atom$InternedStrings
invoking method < BootstrapCL, Lorg/jikesrvm/classloader/Atom$InternedStrings; >.<clinit> ()V
running class intializer for gnu.classpath.SystemProperties
invoking method < BootstrapCL, Lgnu/classpath/SystemProperties; >.<clinit> ()V
running class intializer for java.lang.Throwable$StaticData
invoking method < BootstrapCL, Ljava/lang/Throwable$StaticData; >.<clinit> ()V
running class intializer for java.lang.Runtime
invoking method < BootstrapCL, Ljava/lang/Runtime; >.<clinit> ()V
running class intializer for java.lang.System
invoking method < BootstrapCL, Ljava/lang/System; >.<clinit> ()V
running class intializer for sun.misc.Unsafe
invoking method < BootstrapCL, Lsun/misc/Unsafe; >.<clinit> ()V
running class intializer for java.lang.Character
invoking method < BootstrapCL, Ljava/lang/Character; >.<clinit> ()V
running class intializer for org.jikesrvm.classloader.TypeReferenceVector
invoking method < BootstrapCL, Lorg/jikesrvm/classloader/TypeReferenceVector; >.<clinit> ()V
running class intializer for org.jikesrvm.classloader.MethodVector
invoking method < BootstrapCL, Lorg/jikesrvm/classloader/MethodVector; >.<clinit> ()V
running class intializer for org.jikesrvm.classloader.FieldVector
invoking method < BootstrapCL, Lorg/jikesrvm/classloader/FieldVector; >.<clinit> ()V
running class intializer for java.lang.ThreadGroup
invoking method < BootstrapCL, Ljava/lang/ThreadGroup; >.<clinit> ()V
running class intializer for java.lang.ThreadLocal
invoking method < BootstrapCL, Ljava/lang/ThreadLocal; >.<clinit> ()V
running class intializer for java.lang.ThreadLocalMap
invoking method < BootstrapCL, Ljava/lang/ThreadLocalMap; >.<clinit> ()V
running class intializer for java.security.VMAccessController
invoking method < BootstrapCL, Ljava/security/VMAccessController; >.<clinit> ()V
Booting Lock
Booting scheduler
Using a time-slice of 10 ms
Setting up boot thread
Initializing JNI for boot thread
running class intializer for java.io.File
invoking method < BootstrapCL, Ljava/io/File; >.<clinit> ()V
running class intializer for java.lang.String
invoking method < BootstrapCL, Ljava/lang/String; >.<clinit> ()V
running class intializer for gnu.java.security.provider.DefaultPolicy
invoking method < BootstrapCL, Lgnu/java/security/provider/DefaultPolicy; >.<clinit> ()V
running class intializer for java.net.URL
invoking method < BootstrapCL, Ljava/net/URL; >.<clinit> ()V
running class intializer for java.net.URLClassLoader
invoking method < BootstrapCL, Ljava/net/URLClassLoader; >.<clinit> ()V
running class intializer for java.net.URLConnection
invoking method < BootstrapCL, Ljava/net/URLConnection; >.<clinit> ()V
running class intializer for gnu.java.net.protocol.jar.Connection$JarFileCache
invoking method < BootstrapCL, Lgnu/java/net/protocol/jar/Connection$JarFileCache; >.<clinit> ()V
running class intializer for java.lang.ClassLoader$StaticData
invoking method < BootstrapCL, Ljava/lang/ClassLoader$StaticData; >.<clinit> ()V
running class intializer for java.lang.Class$StaticData
invoking method < BootstrapCL, Ljava/lang/Class$StaticData; >.<clinit> ()V
running class intializer for java.nio.charset.Charset
has no clinit method
running class intializer for java.nio.charset.CharsetEncoder
invoking method < BootstrapCL, Ljava/nio/charset/CharsetEncoder; >.<clinit> ()V
running class intializer for java.nio.charset.CoderResult
invoking method < BootstrapCL, Ljava/nio/charset/CoderResult; >.<clinit> ()V
running class intializer for java.io.PrintWriter
invoking method < BootstrapCL, Ljava/io/PrintWriter; >.<clinit> ()V
running class intializer for java.io.PrintStream
invoking method < BootstrapCL, Ljava/io/PrintStream; >.<clinit> ()V
running class intializer for java.util.Locale
invoking method < BootstrapCL, Ljava/util/Locale; >.<clinit> ()V
running class intializer for java.util.ResourceBundle
invoking method < BootstrapCL, Ljava/util/ResourceBundle; >.<clinit> ()V
running class intializer for java.util.zip.CRC32
invoking method < BootstrapCL, Ljava/util/zip/CRC32; >.<clinit> ()V
running class intializer for java.util.zip.Inflater
invoking method < BootstrapCL, Ljava/util/zip/Inflater; >.<clinit> ()V
running class intializer for java.util.zip.DeflaterHuffman
invoking method < BootstrapCL, Ljava/util/zip/DeflaterHuffman; >.<clinit> ()V
running class intializer for java.util.zip.InflaterDynHeader
invoking method < BootstrapCL, Ljava/util/zip/InflaterDynHeader; >.<clinit> ()V
running class intializer for java.util.zip.InflaterHuffmanTree
invoking method < BootstrapCL, Ljava/util/zip/InflaterHuffmanTree; >.<clinit> ()V
Running late class initializers
Segmentation fault

Activity

Hide
David Grove added a comment -

Both ppc32-aix and ppc64-aix hang in the same place during bootup as ppc64-linux crashes.

This leads me to suspect that it is a problem interacting with the PowerOpenABI (which is used by all three of the failing configs and is not used by ppc32-linux).

I haven't verified that this was still the case, but before the hang/crash was coming in the "prologue" sequence of a JNI Function (transition from C back to Java). Most likely the problem lies in here, perhaps with the linkage triplets used in PowerOpen?

Show
David Grove added a comment - Both ppc32-aix and ppc64-aix hang in the same place during bootup as ppc64-linux crashes. This leads me to suspect that it is a problem interacting with the PowerOpenABI (which is used by all three of the failing configs and is not used by ppc32-linux). I haven't verified that this was still the case, but before the hang/crash was coming in the "prologue" sequence of a JNI Function (transition from C back to Java). Most likely the problem lies in here, perhaps with the linkage triplets used in PowerOpen?
Hide
David Grove added a comment -

ran out of time for the day, but I suspect this code in JNIEnvironment is probably part of the problem. If the linkage triplet arrays are getting poisoned, then we will explode in more or less exactly the place we are exploding....

/**

  • Initialize the array of JNI functions.
  • This function is called during bootimage writing.
    */
    public static void initFunctionTable(FunctionTable functions) {
    JNIFunctions = functions;
    if (VM.BuildForPowerOpenABI)
    Unknown macro: { // Allocate the linkage triplets in the bootimage too (so they won't move) LinkageTriplets = new AddressArray[functions.length()]; for (int i = 0; i < functions.length(); i++) { LinkageTriplets[i] = AddressArray.create(3); } }

    }

/**

  • Initialization required during VM booting; only does something if
  • we are on a platform that needs linkage triplets.
    */
    public static void boot() {
    if (VM.BuildForPowerOpenABI)
    Unknown macro: { // fill in the TOC and IP entries for each linkage triplet for (int i = 0; i < JNIFunctions.length(); i++) { AddressArray triplet = LinkageTriplets[i]; triplet.set(1, Magic.getTocPointer()); triplet.set(0, Magic.objectAsAddress(JNIFunctions.get(i))); } }

    }
Show
David Grove added a comment - ran out of time for the day, but I suspect this code in JNIEnvironment is probably part of the problem. If the linkage triplet arrays are getting poisoned, then we will explode in more or less exactly the place we are exploding.... /**
  • Initialize the array of JNI functions.
  • This function is called during bootimage writing. */ public static void initFunctionTable(FunctionTable functions) { JNIFunctions = functions; if (VM.BuildForPowerOpenABI)
    Unknown macro: { // Allocate the linkage triplets in the bootimage too (so they won't move) LinkageTriplets = new AddressArray[functions.length()]; for (int i = 0; i < functions.length(); i++) { LinkageTriplets[i] = AddressArray.create(3); } }
    }
/**
  • Initialization required during VM booting; only does something if
  • we are on a platform that needs linkage triplets. */ public static void boot() { if (VM.BuildForPowerOpenABI)
    Unknown macro: { // fill in the TOC and IP entries for each linkage triplet for (int i = 0; i < JNIFunctions.length(); i++) { AddressArray triplet = LinkageTriplets[i]; triplet.set(1, Magic.getTocPointer()); triplet.set(0, Magic.objectAsAddress(JNIFunctions.get(i))); } }
    }
Hide
Daniel Frampton added a comment -

In r14850 I have introduced a new RuntimeTable that should make the linkage triplets safe for poisoning and raw reading from assembly code.

I can not test on AIX but did test the creation and GC scanning of the tables on IA32 by temporarily commenting out the conditionals in JNIEnvironment.

Show
Daniel Frampton added a comment - In r14850 I have introduced a new RuntimeTable that should make the linkage triplets safe for poisoning and raw reading from assembly code. I can not test on AIX but did test the creation and GC scanning of the tables on IA32 by temporarily commenting out the conditionals in JNIEnvironment.
Hide
Daniel Frampton added a comment -

ppc64-linux seems to be happier also, I ran a quick test and BaseBasePoisoned passed DaCapo antlr.

Show
Daniel Frampton added a comment - ppc64-linux seems to be happier also, I ran a quick test and BaseBasePoisoned passed DaCapo antlr.
Hide
David Grove added a comment -

nice.

verified that ppc32-aix and ppc64-aix BaseBasePoisoned can run DaCapo fop successfully.

Show
David Grove added a comment - nice. verified that ppc32-aix and ppc64-aix BaseBasePoisoned can run DaCapo fop successfully.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: