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

[ubsan] G1CSetCandidateGroup::liveness() reports division by 0

XMLWordPrintable

    • gc

      When running on linux aarch64 with ubsan-enabled binaries, test
      gc/logging/TestUnifiedLoggingSwitchStress.java
      showed this issue :

      /priv/jenkins/client-home/workspace/openjdk-jdk-weekly-linux_aarch64-opt/jdk/src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp:69:66: runtime error: division by zero
          #0 0xffffa4bc9f64 in G1CSetCandidateGroup::liveness() const src/hotspot/share/gc/g1/g1CollectionSetCandidates.cpp:69
          #1 0xffffa4be2868 in G1PrintRegionLivenessInfoClosure::log_cset_candidate_group_add_total(G1CSetCandidateGroup*, char const*) src/hotspot/share/gc/g1/g1ConcurrentMark.cpp:3113
          #2 0xffffa4be2e9c in G1PrintRegionLivenessInfoClosure::log_cset_candidate_groups() src/hotspot/share/gc/g1/g1ConcurrentMark.cpp:3163
          #3 0xffffa4be3430 in G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() src/hotspot/share/gc/g1/g1ConcurrentMark.cpp:3092
          #4 0xffffa4be3430 in G1PrintRegionLivenessInfoClosure::~G1PrintRegionLivenessInfoClosure() src/hotspot/share/gc/g1/g1ConcurrentMark.cpp:3082
          #5 0xffffa4cf84ac in G1Policy::record_concurrent_mark_cleanup_end(bool) src/hotspot/share/gc/g1/g1Policy.cpp:1317
          #6 0xffffa4be6d70 in G1ConcurrentMark::cleanup() src/hotspot/share/gc/g1/g1ConcurrentMark.cpp:1541
          #7 0xffffa4d48768 in VM_G1PauseConcurrent::doit() src/hotspot/share/gc/g1/g1VMOperations.cpp:154
          #8 0xffffa6266504 in VM_Operation::evaluate() src/hotspot/share/runtime/vmOperations.cpp:74
          #9 0xffffa62707f0 in VMThread::evaluate_operation(VM_Operation*) src/hotspot/share/runtime/vmThread.cpp:284
          #10 0xffffa6272550 in VMThread::inner_execute(VM_Operation*) src/hotspot/share/runtime/vmThread.cpp:421
          #11 0xffffa6272c70 in VMThread::loop() src/hotspot/share/runtime/vmThread.cpp:487
          #12 0xffffa6272d74 in VMThread::run() src/hotspot/share/runtime/vmThread.cpp:177
          #13 0xffffa60dbf20 in Thread::call_run() src/hotspot/share/runtime/thread.cpp:243
          #14 0xffffa597dc74 in thread_native_entry src/hotspot/os/linux/os_linux.cpp:868
          #15 0xffffa90d2b3c in start_thread (/lib64/libc.so.6+0x80b3c)
          #16 0xffffa913d158 in thread_start (/lib64/libc.so.6+0xeb158)

      Seems this happens in the division
         return (size_t) ceil(((capacity - _reclaimable_bytes) * 100.0) / capacity);
      at the end of G1CSetCandidateGroup::liveness() .

            tschatzl Thomas Schatzl
            mbaesken Matthias Baesken
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: