[ https://issues.apache.org/jira/browse/FTPSERVER-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13003342#comment-13003342 ]
ArtemGr commented on FTPSERVER-403: ----------------------------------- P.S. This is an old bug, I encountered it periodically for at least a year. > FTP would periodically hang in MDC > ---------------------------------- > > Key: FTPSERVER-403 > URL: https://issues.apache.org/jira/browse/FTPSERVER-403 > Project: FtpServer > Issue Type: Bug > Components: Core, Server > Affects Versions: 1.0.3, 1.0.4, 1.0.5 > Environment: Encountered it both on Linux and FreeBSD, both on Sun > JVM 1.6 and OpenJDK 6. > Reporter: ArtemGr > > FTP works fine for the most time but once in a while (depended on how often > the FTP is used) it would hang, consuming 100% CPU, in > java.util.HashMap.removeEntryForKey (HashMap.java:586) > java.util.HashMap.remove (HashMap.java:555) > org.slf4j.helpers.BasicMDCAdapter.remove (BasicMDCAdapter.java:91) > org.slf4j.MDC.remove (MDC.java:156) > org.apache.mina.filter.logging.MdcInjectionFilter.filter > (MdcInjectionFilter.java:141) > org.apache.mina.filter.util.CommonEventFilter.messageSent > (CommonEventFilter.java:75) > > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageSent > (DefaultIoFilterChain.java:462) > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300 > (DefaultIoFilterChain.java:46) > > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageSent > (DefaultIoFilterChain.java:802) > org.apache.mina.filter.codec.ProtocolCodecFilter.messageSent > (ProtocolCodecFilter.java:287) > > org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageSent > (DefaultIoFilterChain.java:462) > org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300 > (DefaultIoFilterChain.java:46) > > org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageSent > (DefaultIoFilterChain.java:802) > org.apache.mina.core.filterchain.IoFilterEvent.fire > (IoFilterEvent.java:80) > org.apache.mina.core.session.IoEvent.run (IoEvent.java:63) > > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask > (OrderedThreadPoolExecutor.java:780) > > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks > (OrderedThreadPoolExecutor.java:772) > org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run > (OrderedThreadPoolExecutor.java:714) > The only MDC-related code that our application adds is the following in the > UserManager.authenticate implementation: > Map context = MDC.getCopyOfContextMap(); > if (context != null) System.out.println ("FTP user logged in: " + > context); > return user; > Seems like a synchronization issue to me. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira