Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 2.0
    • Component/s: Utilities
    • Labels:
      None
    • Environment:

      Description

      The following code in FileCleaningTrackerTestCase never exits, hanging the whole compilation/testing process:

      private void waitUntilTrackCount() {
      while (theInstance.getTrackCount() != 0) {
      int total = 0;
      while (theInstance.getTrackCount() != 0)

      { byte[] b = new byte[1024 * 1024]; b[0] = (byte) System.currentTimeMillis(); total = total + b[0]; System.gc(); }

      }
      }

      It is clear that in theory this code might loop forever, as the allocation of the byte arrays might never unleash a garbage collection complete enough to deallocate all marker objects, so to bring the track count to zero. Believe me, it's not only theory .

        Activity

        Hide
        Niall Pemberton added a comment -

        I have copied the code from BeanUtils MemoryLeakTestCase to try and force garbage collection. Hopefully that will be more successful in ytour environment, but if not then it should now throw an exception rather than hanging

        http://svn.apache.org/viewvc?view=rev&revision=723153

        Show
        Niall Pemberton added a comment - I have copied the code from BeanUtils MemoryLeakTestCase to try and force garbage collection. Hopefully that will be more successful in ytour environment, but if not then it should now throw an exception rather than hanging http://svn.apache.org/viewvc?view=rev&revision=723153

          People

          • Assignee:
            Niall Pemberton
            Reporter:
            Sebastiano Vigna
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development