git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (FLINK-9676) Deadlock during canceling task and recycling exclusive buffer


zhijiang created FLINK-9676:
-------------------------------

             Summary: Deadlock during canceling task and recycling exclusive buffer
                 Key: FLINK-9676
                 URL: https://issues.apache.org/jira/browse/FLINK-9676
             Project: Flink
          Issue Type: Bug
          Components: Network
    Affects Versions: 1.5.0
            Reporter: zhijiang
             Fix For: 1.5.1


It may cause deadlock between task canceler thread and task thread.

The detail is as follows:

Task canceler thread -> {{IC1#releaseAllResources}} -> recycle floating buffers -> {color:#FF0000}lock{color} ({{LocalBufferPool#availableMemorySegments) -> }}{{IC2#notifyBufferAvailable}}{{ -> {color:#FF0000}try to lock{color:#333333}({color}{color}}}{{IC2#bufferQueue)}}

{{Task thread -> IC2#recycle -> {color:#d04437}lock{color}(IC2#bufferQueue) -> }}{{bufferQueue#addExclusiveBuffer}} -> {{floatingBuffer#recycleBuffer}} -> {color:#d04437}try to lock{color}(LocalBufferPool#availableMemorySegments)

One solution is that {{listener#notifyBufferAvailable}} can be called outside the {{synchronized(availableMemorySegments) in }}{{LocalBufferPool#recycle.}}{{}}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)



( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-flink-development/msg07854.html on line 98
Call Stack
#TimeMemoryFunctionLocation
10.0006363608{main}( ).../msg07854.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-flink-development/msg07854.html on line 98
Call Stack
#TimeMemoryFunctionLocation
10.0006363608{main}( ).../msg07854.html:0