Uploaded image for project: 'Texen'
  1. Texen
  2. TEXEN-1

No upper limit on cached file handles causes random ResourceLoader exceptions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1
    • None
    • Operating System: other
      Platform: Other
    • 22976

    Description

      The Generator class caches filehandles while generating files. There is no
      upper limit on the number of filehandles it will cache, so when generating many
      files with the same generator, it eventually hits the per-process limits on the
      number of open files. This then causes failures in the resource loader because
      it cannot open any more files. I've seen this problem on OS X and Linux, but it
      should be a pretty universal problem.

      You can work around this problem by increasing the number of filehandles
      available to the ant task, but that isn't always easy to do when running it as a
      subtask from an IDE, and it should be fairly simple to implement a basic LRU scheme.

      An alternative fix would be to more accurately report the error - the current
      implementation just throws a ResourceNotFound exception, making it very hard to
      track down the root cause of the error.

      Attachments

        1. Generator.java.patch
          4 kB
          Daniel Martin
        2. breaktexen.xml
          0.8 kB
          Daniel Martin

        Activity

          People

            Unassigned Unassigned
            ian@skylist.net Ian Ragsdale
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: