Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-6057

DomainSocketWatcher.watcherThread should be marked as daemon thread

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.4.0
    • 2.4.0
    • hdfs-client
    • None

    Description

      Running the tip of branch-2.4, I'm observing some zombie processes in my environment. jstack shows the following thread preventing the JVM from shutting down:

      "Thread-3" prio=10 tid=0x00007f0a908a5800 nid=0x3ee9 runnable [0x00007f0a89471000]
         java.lang.Thread.State: RUNNABLE
      	at org.apache.hadoop.net.unix.DomainSocketWatcher.doPoll0(Native Method)
      	at org.apache.hadoop.net.unix.DomainSocketWatcher.access$800(DomainSocketWatcher.java:52)
      	at org.apache.hadoop.net.unix.DomainSocketWatcher$1.run(DomainSocketWatcher.java:455)
      	at java.lang.Thread.run(Thread.java:679)
      

      Marking the DomainSocketWatcher.watcherThread as a daemon thread would prevent this situation. Is there any reason it isn't classified as such?

      Also, tracing through the code, I don't see any code path where DomainSocketWatcher.close() is invoked (though this would seem to be a larger issue – maybe I'm missing something...).

      Attachments

        1. hdfs-6057-v1.txt
          1 kB
          Ted Yu
        2. HDFS-6057.002.patch
          8 kB
          Colin McCabe
        3. HDFS-6057.003.patch
          8 kB
          Colin McCabe

        Activity

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

          People

            cmccabe Colin McCabe
            sirianni Eric Sirianni
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment