Issue Type: Bug Bug
Affects Versions: 1.1.1
Assignee: Logback dev list
Attachments: SocketAppenderTest.gz
Components: logback-classic, logback-core
Created: 20/Mar/14 10:43 PM
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.

Environment:

on linux x86_64, though I doubt it is platform-specific

Project: logback
Labels: logging socket
Priority: Major Major
Reporter: Albert Louis Rossi
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira