Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-1756

System exit calls in ApplicationRunnerMain break ProcessJob and cause unit tests to get skipped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.15
    • 1.0
    • None
    • None

    Description

      A recent change from SAMZA-1724 introduced a System.exit call at the end of ApplicationRunnerMain. However, ProcessJob has a non-daemon thread that needs to stay alive in order to deploy the container and then shut down the job model manager after the container shuts down.

      The System.exit will either:

      1. Kill the ProcessJob thread before it can start the process
      2. Kill the job model manager from ProcessJobFactory, so the new container process (if it does get started) is unable to reach the coordinator to get configs

      Also, this System.exit causes the execution of unit tests to stop early because the main method is called in TestApplicationRunnerMain. The Thread.setDefaultUncaughtExceptionHandler also causes test execution to exit incorrectly, since that handler seems to get triggered by some other test.

      From what I can tell, the ApplicationRunnerMain changes are there to be defensive, but there was no explicit case that it was fixing right now. For now, we can revert those changes until we know how to solve these issues.

      Attachments

        Issue Links

          Activity

            People

              cameronlee Cameron Lee
              cameronlee Cameron Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: