Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-961

SocketAppender queue thread never completes

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 1.1.1
    • on linux x86_64, though I doubt it is platform-specific

    Description

      There seems to be a deadlock which does not allow the SocketAppender to release its socket/thread resources.

      The attached code demonstrates this as follows:

      A simple socket server is booted on port 9867 for 2 minutes. Its configuration is set to write all received messages to a history.log, and internal ch.qos messages to server.log, at warn level.

      After a 3 second pause, the main test attempts to send an error message.
      The server exits after 2 minutes, but main in the test never completes.
      A thread dump shows that the problem seems to like in a thread pool wait
      (FutureTask which does not complete).

      This requires an explicit kill (cntrl-C) to make the shell script exit.

      Inspection of the history.log should reveal, however, that the message was sent and received successfully by the server.

      I note that there is no use of the java.util.concurrent.ThreadPoolExecutor in the previous version (1.0.12) ... not sure about 1.0.13.

      Attachments

        1. AbstractSocketAppender.java
          14 kB
          Albert Louis Rossi
        2. SocketAppenderTest.gz
          635 kB
          Albert Louis Rossi

        Activity

          People

            logback-dev Logback dev list
            arossi Albert Louis Rossi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: