mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Novikov (Jira)" <j...@apache.org>
Subject [jira] [Commented] (DIRMINA-1119) Deadlock when using SSL and proxy
Date Mon, 10 Feb 2020 15:04:00 GMT

    [ https://issues.apache.org/jira/browse/DIRMINA-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17033661#comment-17033661
] 

Anton Novikov commented on DIRMINA-1119:
----------------------------------------

Is there a reason why ProxyFilter holds the lock when calling the next filter in the first
place? I looked through the relevant piece of code and it doesn't seem to be necessary. It
is harder to argue about SslFilter, but it probably shouldn't do that either. Unfortunately,
I am not familiar with the code, so I have to rely on the judgement of someone who is

> Deadlock when using SSL and proxy
> ---------------------------------
>
>                 Key: DIRMINA-1119
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1119
>             Project: MINA
>          Issue Type: Bug
>          Components: Core, Filter
>    Affects Versions: 2.1.3
>            Reporter: Sergey Staritsin
>            Priority: Critical
>         Attachments: Deadlock_QFJ Timer_NioProcessor.txt
>
>
> The issue seems to be the same as DIRMINA-995 (at least they have exactly the same
symptoms and conditions). 
>  
> 2019-09-09 12:04:38
> Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode):
> Found one Java-level deadlock:
> =============================
> "NioProcessor-138":
>  waiting to lock monitor 0x00000001040b88f8 (object 0xffffffff2ef07520, a org.apache.mina.filter.ssl.SslHandler),
>  which is held by "OutputEventRoutingHandler"
> "OutputEventRoutingHandler":
>  waiting to lock monitor 0x000000010386a108 (object 0xffffffff2eff53b0, a org.apache.mina.proxy.handlers.socks.Socks5LogicHandler),
>  which is held by "NioProcessor-138" 
>  
> Java stack information for the threads listed above:
>  ===================================================
>  "NioProcessor-138":
>  at org.apache.mina.filter.ssl.SslFilter.getSslSessionHandler(SslFilter.java:823)
>  - waiting to lock <0xffffffff2ef07520> (a org.apache.mina.filter.ssl.SslHandler)
>  at org.apache.mina.filter.ssl.SslFilter.messageReceived(SslFilter.java:499)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128)
>  at org.apache.mina.proxy.filter.ProxyFilter.messageReceived(ProxyFilter.java:153)
>  - locked <0xffffffff2eff53b0> (a org.apache.mina.proxy.handlers.socks.Socks5LogicHandler)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128)
>  at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:643)
>  at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:539)
>  at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$1200(AbstractPollingIoProcessor.java:68)
>  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1222)
>  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.process(AbstractPollingIoProcessor.java:1211)
>  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:683)
>  at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>  at java.lang.Thread.run(Thread.java:748)
>  "OutputEventRoutingHandler":
>  at org.apache.mina.proxy.filter.ProxyFilter.writeData(ProxyFilter.java:214)
>  - waiting to lock <0xffffffff2eff53b0> (a org.apache.mina.proxy.handlers.socks.Socks5LogicHandler)
>  at org.apache.mina.proxy.filter.ProxyFilter.filterWrite(ProxyFilter.java:198)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146)
>  at org.apache.mina.filter.ssl.SslHandler.flushFilterWrite(SslHandler.java:310)
>  at org.apache.mina.filter.ssl.SslFilter.filterWrite(SslFilter.java:668)
>  - locked <0xffffffff2ef07520> (a org.apache.mina.filter.ssl.SslHandler)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146)
>  at org.apache.mina.filter.codec.ProtocolCodecFilter.filterWrite(ProtocolCodecFilter.java:340)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1500(DefaultIoFilterChain.java:49)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.filterWrite(DefaultIoFilterChain.java:1146)
>  at org.apache.mina.core.filterchain.IoFilterAdapter.filterWrite(IoFilterAdapter.java:138)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callPreviousFilterWrite(DefaultIoFilterChain.java:753)
>  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireFilterWrite(DefaultIoFilterChain.java:746)
>  at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:570)
>  at org.apache.mina.core.session.AbstractIoSession.write(AbstractIoSession.java:515)
>  at quickfix.mina.IoSessionResponder.send(IoSessionResponder.java:63)
>  at quickfix.Session.send(Session.java:2661)
>  at quickfix.Session.sendRaw(Session.java:2590)
>  at quickfix.Session.send(Session.java:2648)
>  at quickfix.Session.sendToTarget(Session.java:681)
>  .....
>  at com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:129)
>  at java.lang.Thread.run(Thread.java:748)
> Found 1 deadlock.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org


Mime
View raw message