HPROF: use of fopen() in java runtime profiling support (fd limits of stdio.h)

XMLWordPrintable

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: P5
    • None
    • Affects Version/s: 1.4.0
    • Component/s: tools
    • sparc
    • solaris_7

      The platform library routine fopen() can (on 32-bit Solaris at least) only
      use file descriptors up to 255.
      However the VM sets the files that can be opened by a JRE process
      on Solaris to at least 1024.

      These two limits conflict such that a Java program may open 256 files, then
      perform some action which utilises fopen may needlessly fail.
      The following cases should be rewritten to use open().

                  FILE *fp = fopen(DUMP_FILE, "a"); /* append the latest */
      ./share/tools/hprof/hprof.c
                  fp = fopen(output_filename, "w");
                  fp = fopen(output_filename, "wb");
              prelude_fd = fopen(prelude_file, "r");
      ./share/tools/hprof/hprof_setup.c

          if ((temp_file = fopen(temp_file_name, "wb+")) == NULL ) {
              if ((result_file = fopen(filename, "rb")) == NULL) {
      ./share/tools/jcov/jcov_file.c

      ----------------------------------------------------

      This will be fixed in the new hprof in 1.5.
      It will not use fopen.

      -kto

      ###@###.### 2003-10-17

            Assignee:
            Kelly Ohair (Inactive)
            Reporter:
            Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: