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

JVM crashes if the number of bound CPUs changed during runtime

    Details

    • Subcomponent:
    • Verification:
      Not verified

      Issue Links

        Activity

        Hide
        minqi Yumin Qi added a comment -
        This looks not is_MP() escaping problem. In fact in is_MP():
          // Interface for detecting multiprocessor system
          static inline bool is_MP() {
            assert(_processor_count > 0, "invalid processor count");
            return _processor_count > 1;
          }
          _processor_count is the real number of processors, it is not number of online processors. For both Linux and Solaris, we get this number by
          sysconf(_SC_NPROCESSORS_CONF)
          which returns the number of processors in system. I have tested and the result showed on multiple core platform, always return the number of cores. it is calculated once and no change thereafter.
          That is, is_MP() will not escape when number of online CPUs adjusted from 1 to > 1.
        Show
        minqi Yumin Qi added a comment - This looks not is_MP() escaping problem. In fact in is_MP():   // Interface for detecting multiprocessor system   static inline bool is_MP() {     assert(_processor_count > 0, "invalid processor count");     return _processor_count > 1;   }   _processor_count is the real number of processors, it is not number of online processors. For both Linux and Solaris, we get this number by   sysconf(_SC_NPROCESSORS_CONF)   which returns the number of processors in system. I have tested and the result showed on multiple core platform, always return the number of cores. it is calculated once and no change thereafter.   That is, is_MP() will not escape when number of online CPUs adjusted from 1 to > 1.
        Hide
        dholmes David Holmes added a comment -
        The issue is not the number of "online" CPU's changing but the number of configured CPUs. You need to do this experiment with Solaris Zones where the number of configured CPUs can be changed dynamically.
        Show
        dholmes David Holmes added a comment - The issue is not the number of "online" CPU's changing but the number of configured CPUs. You need to do this experiment with Solaris Zones where the number of configured CPUs can be changed dynamically.
        Hide
        dholmes David Holmes added a comment -
        You may also be able to do it simply with processor sets on Solaris. (I can't test it because my Solaris system is already a zone and I don't seem to be able to create processor sets when already in a zone.)
        Show
        dholmes David Holmes added a comment - You may also be able to do it simply with processor sets on Solaris. (I can't test it because my Solaris system is already a zone and I don't seem to be able to create processor sets when already in a zone.)
        Hide
        minqi Yumin Qi added a comment -
        This is the bug in putback comment, the others are dup of this.
        Show
        minqi Yumin Qi added a comment - This is the bug in putback comment, the others are dup of this.
        Hide
        dcubed Daniel Daugherty added a comment -
        Changeset: 1b90c7607451
        Author: minqi
        Date: 2013-03-27 17:03 -0700
        URL: http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/1b90c7607451

        2178143: JVM crashes if the number of bound CPUs changed during runtime
        Summary: Supply a new flag -XX:+AssumeMP to workaround the problem. With the flag is turned on, assume VM run on MP platform so is_MP() will return true that sync calls will not skip away.
        Reviewed-by: dholmes, acorn, dcubed, jmasa
        Contributed-by: yumin.qi@oracle.com

        ! src/share/vm/runtime/arguments.cpp
        ! src/share/vm/runtime/globals.hpp
        ! src/share/vm/runtime/os.hpp
        Show
        dcubed Daniel Daugherty added a comment - Changeset: 1b90c7607451 Author: minqi Date: 2013-03-27 17:03 -0700 URL: http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/1b90c7607451 2178143: JVM crashes if the number of bound CPUs changed during runtime Summary: Supply a new flag -XX:+AssumeMP to workaround the problem. With the flag is turned on, assume VM run on MP platform so is_MP() will return true that sync calls will not skip away. Reviewed-by: dholmes, acorn, dcubed, jmasa Contributed-by: yumin.qi@oracle.com ! src/share/vm/runtime/arguments.cpp ! src/share/vm/runtime/globals.hpp ! src/share/vm/runtime/os.hpp

          People

          • Assignee:
            minqi Yumin Qi
            Reporter:
            dsamersoff Dmitriy Samersoff
          • Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Imported:
              Indexed: