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

java.security.SecureRandom.generateSeed freeze when /dev/random is disabled

    Details

      Description

      FULL PRODUCT VERSION :
      java version "1.8.0_77"
      Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
      Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      2.6.32-042stab113.21 #1 SMP Wed Mar 23 11:05:25 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      Its an VPS running under openvz

      A DESCRIPTION OF THE PROBLEM :
      When I execute the command:

      cat /proc/sys/kernel/random/entropy_avail

      I'm always getting 0 (zero) as result.

      When the java code calls java.security.SecureRandom.generateSeed(int), the code stay blocked (frozen).

      Checking with VPS provider, I was notified that /dev/random was disabled.

      I believe that JVM should throws an Exception or use a different approach to generate seed

      REGRESSION. Last worked in version 8u77

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Disable /dev/random and call the mentioned method abova.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      I have asked to VPS provider enable /dev/random

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wetmore Bradford Wetmore
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: