Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-8241

Exec command failures using Java 8 on Unix

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.14.0
    • Fix Version/s: 2.14.2, 2.15.0
    • Component/s: camel-core
    • Labels:
      None
    • Environment:

      JDK 1.8 on Unix systems

    • Estimated Complexity:
      Unknown

      Description

      I'm attaching a test case that shows an issue I've been running into with the exec command since updating my environment to Java 8. It appears that I'm running into a race condition where a stream is sometimes closed prematurely before DefaultExecutor has a chance to close it, causing DefaultExecCommandExecutor to throw and exit (even though the command did execute properly). I've tested this against the updated version of commons-exec as well just to make sure this hasn't somehow been fixed in that library.

      Please note that the attached test doesn't always fail; you may need to run it a few times before the error will show up.

        Attachments

        1. CamelExecTest.java
          3 kB
          Dave Heath

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              dheath Dave Heath
            • Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: