Abstract
Race condition remains one kind of the most common concurrency bugs in software-defined networks (SDNs). The race conditions can be exploited to lead to security and reliability risks. However, the race conditions are notoriously difficult to detect. The existing race detectors for SDNs have limited detection capability. They can only detect the races in the original traces (observed traces) and cause false negatives. In this study, we present a predictive analysis framework called SDN-predict for race detection in SDNs. By encoding the order between the specified network events in SDNs as constraint, we formulate race detection as a constraint solving problem. In addition to detecting the races in the original trace, our framework can also detect the races in the feasible traces got from reordering the events in the original trace while satisfying the consistency requirements of trace. Moreover, we formally prove that our predictive analysis framework is sound and can achieve the maximal possible detection capability for any sound dynamic race detector with respect to the same trace. We evaluate our framework on a set of traces collected from three SDN controllers (POX, Floodlight, ONOS), running 5 representative applications including reactive and proactive applications in large networks, on three different network topologies. These experiments show that our framework has higher race detection capability than exisiting SDN race detector-SDNRacer, and detects more 1173 races. These 1173 races were previously undetected and confirmed by checking the race graphs.
Similar content being viewed by others
References
Open Networking Foundation. OpenFlow Switch Specification. version 1.3.3. 2013. https://www.opennetworking.org/wp-content/uploads/2014/10/openflow-spec-v1.3.3.pdf
Deng D D, Jin G L, de Kruijf M, et al. Fixing, preventing, and recovering from concurrency bugs. Sci China Inf Sci, 2015, 58: 052105
Wu Z D, Lu K, Wang X P. Surveying concurrency bug detectors based on types of detected bugs. Sci China Inf Sci, 2017, 60: 031101
Xu L, Huang J, Hong S M, et al. Attacking the brain: races in the SDN control plane. In: Proceedings of the 26th USENIX Security Symposium, Vancouver, 2017. 451–468
Cai Y, Cao L W. Effective and precise dynamic detection of hidden races for Java programs. In: Proceedings of the 10th Joint Meeting of the European Software Engineering Conference and the ACM SIGSOFT Symposium on the Foundations of Software Engineering, Bergamo, 2015. 450–461
Huang J, Meredith P O, Rosu G. Maximal sound predictive race detection with control flow abstraction. In: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, Edinburgh, 2014. 337–348
Huang J, Zhou J G, Zhang C. Scaling predictive analysis of concurrent programs by removing trace redundancy. ACM Trans Softw Eng Method, 2013, 22: 1–21
Liu P, Tripp O, Zhang X Y. IPA: improving predictive analysis with pointer analysis. In: Proceedings of the 25th International Symposium on Software Testing and Analysis, Saarbrücken, 2016. 59–69
Wang C, Kundu S, Limaye R, et al. Symbolic predictive analysis for concurrent programs. Form Asp Comput, 2011, 23: 781–805
El-Hassany A, Miserez J, Bielik P, et al. SDNRacer: concurrency analysis for software-defined networks. In: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation, Santa Barbara, 2016. 402–415
Zhang Z Y, Chen Z Y, Gao R Z, et al. An empirical study on constraint optimization techniques for test generation. Sci China Inf Sci, 2017, 60: 012105
Big Switch Networks, Inc. Floodlight learning switch. 2013. https://github.com/floodlight/floodlight/tree/v0.91/src/main/java/net/floodlightcontroller/learningswitch
McCauley J. POX EEL L2 learning switch. 2015. https://github.com/noxrepo/pox/blob/eel/pox/forwarding/12_learning.py
Big Switch Networks, Inc. Floodlight forwarding application. 2013. https://github.com/floodlight/floodlight/blob/v0.91/src/main/java/net/floodlightcontroller/forwarding/Forwarding.java
McCauley J. POX angler forwarding application. 2012. https://github.com/noxrepo/pox/blob/angler/pox/forwarding/12_multi.py
McCauley J. POX EEL forwarding application. 2015. https://github.com/noxrepo/pox/blob/eel/pox/forwarding/12_multi.py
Open Networking Laboratory. ONOS: forwarding application. 2015. https://github.com/opennetworkinglab/onos/tree/onos-1.2/apps/fwd
Big Switch Networks, Inc. Floodlight circuit pusher application. 2013. https://github.com/floodlight/floodlight/tree/v0.91/apps/circuitpusher
Big Switch Networks, Inc. Floodlight firewall. 2013. https://github.com/floodlight/floodlight/tree/v0.91/src/main/java/net/floodlightcontroller/firewall
Big Switch Networks, Inc. Floodlight load-balancer application. 2013. https://github.com/floodlight/floodlight/tree/v0.91/src/main/java/net/floodlightcontroller/loadbalancer
Sun X S, Agarwal A, Ng T S E. Controlling race conditions in OpenFlow to accelerate application verification and packet forwarding. IEEE Trans Netw Serv Manage, 2015, 12: 263–277
Majumdar R, Tetali S D, Wang Z. Kuai: a model checker for software-defined networks. In: Proceedings of the 14th International Conference on Formal Methods in Computer-Aided Design, Portland, 2014. 163–170
Khurshid A, Zhou W, Caesar M, et al. Veriflow: verifying network-wide invariants in real time. SIGCOMM Comput Commun Rev, 2012, 42: 467–472
May R, EI-Hassany A, Vanbever L, et al. BigBug: practical concurrency analysis for SDN. In: Proceedings of the Symposium on SDN Research, Santa Clara, 2017. 88–94
Naik M, Aiken A, Whaley J. Effective static race detection for Java. In: Proceedings of ACM SIGPLAN Conference on Programming Language Design and Implementation, Ottawa, 2006. 308–319
Luo Z D, Hillis L, Das R, et al. Effective static analysis to find concurrency bugs in Java. In: Proceedings of the 12th IEEE International Working Conference on Source Code Analysis and Manipulation, Timisoara, 2010. 135–144
Pozniansky E, Schuster A. Efficient on-the-fly data race detection in multithreaded C++ programs. In: Proceedings of ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, San Diego, 2003. 179–190
Serebryany K, Iskhodzhanov T. ThreadSanitizer: data race detection in practice. In: Proceedings of the Workshop on Binary Instrumentation and Applications, New York, 2009. 62–71
Xie X W, Xue J L. Acculock: accurate and efficient detection of data races. In: Proceedings of the 9th International Symposiumon Code Generation and Optimization, Nanjing, 2011. 201–212
Yu Y, Rodeheffer T, Chen W. RaceTrack: efficient detection of data race conditions via adaptive tracking. In: Proceedings of ACM Symposium on Operating Systems Principles, Brighton, 2005. 221–234
Yannis S, Jacob M E, Caitlin S, et al. Sound predictive race detection in polynomial time. In: Proceedings of the 39th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Philadelphia, 2012. 387–399
Dileep K, Umang M, Mahesh V. Dynamic race prediction in linear time. In: Proceedings of the 38th ACM SIGPLAN Conference on Programming Language Design and Implementation, Barcelona, 2017. 157–170
Savage S, Burrows M, Nelson G, et al. Eraser: a dynamic data race detector for multithreaded programs. ACM Trans Comput Syst, 1997, 15: 391–411
Flanagan C, Freund S N. FastTrack: efficient and precise dynamic race detection. In: Proceedings of the 30th Annual ACM SIGPLAN Conference on Programming Language Design and Implementation, Dublin, 2009. 121–133
Sen K. Race directed random testing of concurrent programs. In: Proceedings of the 29th Annual ACM SIGPLAN Conference on Programming Language Design and Implementation, Tucson, 2008. 11–21
Callahan R, Choi J D. Hybrid dynamic data race detection. In: Proceedings of the 9th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, California, 2003. 167–178
Acknowledgements
This work was partially supported by National Basic Research Program of China (973 Program) (Grant No. 2014CB340702), National Natural Science Foundation of China (Grant Nos. 91418202, 61472178, 91318301), and National Science Foundation for Young Scientists of China (Grant No. 61702256).
Author information
Authors and Affiliations
Corresponding authors
Rights and permissions
About this article
Cite this article
Lu, G., Xu, L., Yang, Y. et al. Predictive analysis for race detection in software-defined networks. Sci. China Inf. Sci. 62, 62101 (2019). https://doi.org/10.1007/s11432-018-9826-x
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s11432-018-9826-x