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

JVM crashes on failed 'open' call: "Error: os::init: cannot open /dev/zero"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 6
    • hotspot
    • generic
    • solaris

      JVM crashes on failed 'open' call: "Error: os::init: cannot open /dev/zero"

      I was imitating "failed open" by returning -1.
      If 'open' failure happens on 1th invocation of open JVM crashes with error:

      > jdk_b84_solaris_i586/bin/java -version
      INJECT_FAULT_AT=1
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # Internal Error (4F533F534F4C415249530E4350500FA6), pid=1788, tid=2
      #
      # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-b84 mixed mode, sharing)
      # An error report file with more information is saved as hs_err_pid1788.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Abort (core dumped)


      Fastdebug jvm fails with assertion:

      > jdk_b84_solaris_i586/fastdebug/bin/java -version
      # To suppress the following error report, specify this argument
      # after -XX: or in .hotspotrc: SuppressErrorAt=/os_solaris.cpp:4006]
      #
      # An unexpected error has been detected by Java Runtime Environment:
      #
      # Internal Error
      (/export0/BUILD_AREA/jdk6.0/hotspot/src/os/solaris/vm/os_solaris.cpp, 4006), pid=1789, tid=2
      #
      # Java VM: Java HotSpot(TM) Client VM (1.6.0-beta2-fastdebug-b84-debug mixed mode, sharing)
      #
      # Error: os::init: cannot open /dev/zero (Error 0)
      # An error report file with more information is saved as hs_err_pid1789.log
      #
      # If you would like to submit a bug report, please visit:
      # http://java.sun.com/webapps/bugreport/crash.jsp
      #
      Current thread is 2
      Dumping core ...
      Abort (core dumped)

      I think JVM should not crash in this case, it should handle the situation
      more gracefully.

      To reproduce the failure:
      1. login on solaris machine
      2. cp -fr /home/ep155969/work/FaultInjection/open YOUR_LOCAL_DIR
      3. cd YOUR_LOCAL_DIR
      4. make
      5. export LD_PRELOAD=./myopen.so
      6. export INJECT_FAULT_AT=1
      7. JAVA_PATH -version

      You can also inject failures in all places 'open' is called at and see when JVM
      does crash. To do it run inject_faults.sh:
          bash inject_faults.sh JAVA_PATH INJECTION_START INJECTION_END

      The failure results will be stored in ./results dir.

      Examples:
          bash inject_faults.sh /net/koori.sfbay/onestop/jdk/1.6.0/latest/binaries/solaris-i586/bin/java 1 33

      To see how many time 'open' is called run:
       /usr/sbin/dtrace -s opencalls.d -c "JAVA_PATH -version"

            Unassigned Unassigned
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: