[OPNFLWPLUG-150] Openflow Plugin piggybacks threads not owned by it - potential deadlocks Created: 06/May/14  Updated: 27/Sep/21  Due: 01/Aug/14  Resolved: 01/Aug/14

Status: Resolved
Project: OpenFlowPlugin
Component/s: General
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Tony Tkacik Assignee: Timotej Kubas
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks OPNFLWPLUG-119 cbench in throughput mode causes the ... Resolved
External issue ID: 956
Priority: Highest

 Description   

Openflow Plugin uses threads of other components to do potential
blocking operations such as publish notification (blocking queue), wait for respond from OpenflowJava, etc.
This behaviour could be spotted by using Futures.immediateFuture in code,
where API contract requires future to be returned.

Affected code is:
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/ConnectionConductorImpl.java
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/ModelDrivenSwitchImpl.java
./openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/session/MessageDispatchServiceImpl.java

In order to behave correctly, it will be better to use JdkFutureAdapters to convert incomming futures to ListenableFuture (if Future is already listenable, it does simple cast) and then uses Futures.transform(ListenableFuture,Function) or Futures.transform(ListenableFuture,AsyncFunction) to transform result.



 Comments   
Comment by Michal Rehak [ 01/Aug/14 ]

https://git.opendaylight.org/gerrit/8321
https://git.opendaylight.org/gerrit/9486

merged

Generated at Wed Feb 07 20:31:41 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.