Deadlock at shutdown
Brought to you by:
mguessan
The java process is deadlocked in shutdown.
I tried killing it using ctrl-C initially, then proceeded with various other signals to both the davmail.sh process and to the java process.
A thread dump is attached, showing a deadlock between an ImapConnection thread and a Shutdown thread.
This was created on CentOS 6 x86_64, using davmail-linux-x86_64-4.1.0-2042
Thread dump showing deadlock
A simple way to avoid this would be to patch MultiThreadedHttpConnectionManager.shutdownAll and synchronize REFERENCE_TO_CONNECTION_SOURCE only locally:
synchronized (REFERENCE_TO_CONNECTION_SOURCE) {
REFERENCE_TO_CONNECTION_SOURCE.clear();
}
Another question: is this always reproducible ?
Fix available in trunk
Released in 4.8.6