Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-7319

External commands sometimes hang in Windows

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2 GA
    • Fix Version/s: 5.5
    • Component/s: Preview
    • Environment:
      Windows (XP, Vista, 7, 2008R2)

      Description

      External command executions sometimes don't return.

      This can be seen in unit tests. Example: org.nuxeo.ecm.platform.convert.tests.TestPDFToImage
      Steps to reproduce:

      • install ImageMagick but not Ghostscript
      • run "mvn test" in nuxeo-platform-convert
        -> the process hangs
        If you check the command that is run, it's a simple "convert a.tmp b.png".
        The same command run manually outputs a (verbose) error message and ends.

      Possible analysis:
      The external command is run through the CommandLineExecutor, in this case I think it's the ShellExecutor implementation.
      The ShellExecutor doesn't read the error stream.
      Buffer saturation is known to hang processes on some platform (like Windows in this case): cf. Process java documentation.
      -> buffer fills -> process hangs -> waitFor() never returns -> the executor never returns

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: