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

Container process always takes task.shutdown.ms to shut down

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0, 1.1
    • 1.3
    • None
    • None

    Description

      https://issues.apache.org/jira/browse/SAMZA-1724 added a System.exit to LocalContainerRunner (now moved to ContainerLaunchUtil) in order to ensure the process exits. However, this seems to cause a partial deadlock when shutting down the container process. SamzaContainer adds a shutdown hook which joins on the run loop thread (which is also the main thread). During the shutdown process, when the main thread reaches the System.exit in ContainerLaunchUtil, it looks like it waits for the shutdown hook to complete. However, the shutdown hook is waiting for the main thread to join. Therefore, the shutdown hook will always wait task.shutdown.ms before giving up on joining the main thread, and then the process exits.

      This issue was not observed in a job on 0.14. The System.exit was only added in 1.0.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            abkshvn Abhishek Shivanna
            cameronlee Cameron Lee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h

                Slack

                  Issue deployment