Chukwa
  1. Chukwa
  2. CHUKWA-640

JVM not terminating if agent is not started

    Details

    • Type: Bug Bug
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5.0
    • Fix Version/s: None
    • Component/s: Data Collection
    • Labels:
      None

      Description

      I am seeing that if my agents are not up, it is preventing my program to terminate.
      I'm using ChukwaDailyRollingFileAppender.
      I debugged and found that ChukwaAgentController tries to retry and schedules to create a new adapter.

      Since it is not a daemon thread, my program just keeps waiting for all these retry scheduled threads to finish even after my main method finishes.

      1. patch2.txt
        0.8 kB
        Abhijit Dhar

        Activity

        Hide
        Hudson added a comment -

        Integrated in Chukwa-trunk #447 (See https://builds.apache.org/job/Chukwa-trunk/447/)
        CHUKWA-640. Revert changes to async adaptor registration. (Revision 1353372)

        Result = FAILURE
        eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1353372
        Files :

        • /incubator/chukwa/trunk/CHANGES.txt
        • /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
        Show
        Hudson added a comment - Integrated in Chukwa-trunk #447 (See https://builds.apache.org/job/Chukwa-trunk/447/ ) CHUKWA-640 . Revert changes to async adaptor registration. (Revision 1353372) Result = FAILURE eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1353372 Files : /incubator/chukwa/trunk/CHANGES.txt /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
        Eric Yang made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Eric Yang added a comment -

        This patch is making registration of the adaptors async. This will cause data loss, if the registration is never succeeded during the life cycle of the running program. TestAdaptorController test cases are failing due to the registration keeping the agent controlling port busy and new agent was unable to bind to the same port due to race conditions between agent and parent program. Given the reasons, I think we should not allow async adaptor registration. Instead, it may be better to use SocketAppender with SocketAdaptor, if you like to allow your program continue execution without logging.

        Show
        Eric Yang added a comment - This patch is making registration of the adaptors async. This will cause data loss, if the registration is never succeeded during the life cycle of the running program. TestAdaptorController test cases are failing due to the registration keeping the agent controlling port busy and new agent was unable to bind to the same port due to race conditions between agent and parent program. Given the reasons, I think we should not allow async adaptor registration. Instead, it may be better to use SocketAppender with SocketAdaptor, if you like to allow your program continue execution without logging.
        Hide
        Hudson added a comment -

        Integrated in Chukwa-trunk #445 (See https://builds.apache.org/job/Chukwa-trunk/445/)
        CHUKWA-640. Use timer thread to schedule adaptor registration. (Abhijit Dhar via Eric Yang) (Revision 1343117)

        Result = SUCCESS
        eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1343117
        Files :

        • /incubator/chukwa/trunk/CHANGES.txt
        • /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
        Show
        Hudson added a comment - Integrated in Chukwa-trunk #445 (See https://builds.apache.org/job/Chukwa-trunk/445/ ) CHUKWA-640 . Use timer thread to schedule adaptor registration. (Abhijit Dhar via Eric Yang) (Revision 1343117) Result = SUCCESS eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1343117 Files : /incubator/chukwa/trunk/CHANGES.txt /incubator/chukwa/trunk/src/main/java/org/apache/hadoop/chukwa/datacollection/controller/ChukwaAgentController.java
        Eric Yang made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Eric Yang added a comment -

        I just committed this again.

        Show
        Eric Yang added a comment - I just committed this again.
        Eric Yang made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Eric Yang added a comment -

        Made a mistake in commit.

        Show
        Eric Yang added a comment - Made a mistake in commit.
        Hide
        Hudson added a comment -

        Integrated in Chukwa-trunk #443 (See https://builds.apache.org/job/Chukwa-trunk/443/)
        CHUKWA-640. Use timer thread to schedule adatpor registration. (Abhijit Dhar via Eric Yang) (Revision 1328977)

        Result = SUCCESS
        eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1328977
        Files :

        • /incubator/chukwa/trunk/CHANGES.txt
        Show
        Hudson added a comment - Integrated in Chukwa-trunk #443 (See https://builds.apache.org/job/Chukwa-trunk/443/ ) CHUKWA-640 . Use timer thread to schedule adatpor registration. (Abhijit Dhar via Eric Yang) (Revision 1328977) Result = SUCCESS eyang : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1328977 Files : /incubator/chukwa/trunk/CHANGES.txt
        Eric Yang made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Eric Yang added a comment -

        I just committed this. Thanks Abhijit.

        Show
        Eric Yang added a comment - I just committed this. Thanks Abhijit.
        Eric Yang made changes -
        Assignee Abhijit Dhar [ abhijitdhar ]
        Hide
        Eric Yang added a comment -

        +1 looks good.

        Show
        Eric Yang added a comment - +1 looks good.
        Abhijit Dhar made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Abhijit Dhar made changes -
        Field Original Value New Value
        Attachment patch2.txt [ 12522878 ]
        Hide
        Abhijit Dhar added a comment -

        Patch attached

        Show
        Abhijit Dhar added a comment - Patch attached
        Abhijit Dhar created issue -

          People

          • Assignee:
            Abhijit Dhar
            Reporter:
            Abhijit Dhar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development