摘要(英) |
Applying multithreading techniques is an inevitable trend in software development nowadays. However, writing correct multi-threaded programs remains a difficult challenge to most of developers in practice, due to the lack of debugging and testing support from tools. Such nondeterminism has seriously hindered the reproduction of concurrency errors, making debugging and testing a concurrent program a difficult task in practice.
Although the primary tool for fixing a bug is a debugger, debugging support for multi-threaded program is poorly provided by existing debuggers. On the other hand, solutions provided by previous researches often suffer from different kinds of assumptions and limitations. These limitations and assumptions are, O.S., high-level programming language, virtual machine dependency, or the programming language dependency for costly static analysis
In this paper, a flexible debugging and testing tool is proposed. First of all, This tool helps programmers on testing and debugging concurrency errors by providing the capability of reproducing and generating arbitrary interleavings. Where interleaving space can be reduced by heuristics, including bounding the locations of context switches and using thread pairwise testing. In addition, assertions for two common synchronization intentions, atomicity and order, are provided to help developers detecting concurrency errors from a different perspective, which offer an additional opportunity to make debugging easier by reducing the distance between the execution of the concurrency error and its manifestation. Finally, this approach is protentially easy to port to other debuggers to support more programming languages. |
參考文獻 |
[1] S. Lu, S. Park, E. Seo, and Y. Zhou, "Learning from mistakes: a comprehensive study on real world concurrency bug characteristics," SIGARCH Comput. Archit. News, vol. 36, pp. 329-339, 2008.
[2] Java Path Finder (JPF). Available: http://babelfish.arc.nasa.gov/trac/jpf/wiki/projects/start
[3] "Checkthread - a static analysis tool for catching java concurrency bugs."
[4] S. Bindal, S. Bansal, and A. Lal, "Variable and thread bounding for systematic testing of multithreaded programs," presented at the Proceedings of the 2013 International Symposium on Software Testing and Analysis, Lugano, Switzerland, 2013.
[5] L. O. Andersen, "Program Analysis and Specialization for the C Programming Language," ed, 1994.
[6] J. Whaley and M. S. Lam, "Cloning-based context-sensitive pointer alias analysis using binary decision diagrams," SIGPLAN Not., vol. 39, pp. 131-144, 2004.
[7] 陳新志, "Korat: An O.S.-independent Capture/Replay Test Automation System," 碩士, 軟體工程研究所, 國立中央大學, 桃園縣, 2014.
[8] 劉冠吟, "建構於JMeter之自動化分散式壓力測試架構," 碩士, 資訊工程學系, 國立中央大學, 桃園縣, 2015.
[9] G. Denaro, A. Margara, M. Pezz, x00E, and M. Vivanti, "Dynamic Data Flow Testing of Object Oriented Systems," in 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, 2015, pp. 947-958.
[10] EclEmma, a free Java code coverage tool for Eclipse, brings code coverage analysis directly into the Eclipse workbench. Available: http://www.eclemma.org/
[11] 王浚懿, "Locating Interested Code by Program Execution Paths with Debugger," 碩士, 軟體工程研究所, 國立中央大學, 桃園縣, 2013.
[12] Valgrind. Available: http://valgrind.org/docs/pubs.html
[13] M. Musuvathi and S. Qadeer, "Iterative context bounding for systematic testing of multithreaded programs," SIGPLAN Not., vol. 42, pp. 446-455, 2007.
[14] J.-D. Choi and H. Srinivasan, "Deterministic replay of Java multithreaded applications," presented at the Proceedings of the SIGMETRICS symposium on Parallel and distributed tools, Welches, Oregon, USA, 1998.
[15] O. Edelstein, E. Farchi, Y. Nir, G. Ratsaby, and S. Ur, "Multithreaded Java program test generation," IBM Systems Journal, vol. 41, pp. 111-125, 2002.
[16] S. Park, S. Lu, and Y. Zhou, "CTrigger: exposing atomicity violation bugs from their hiding places," SIGPLAN Not., vol. 44, pp. 25-36, 2009.
[17] S. Savage, M. Burrows, G. Nelson, P. Sobalvarro, and T. Anderson, "Eraser: a dynamic data race detector for multithreaded programs," ACM Trans. Comput. Syst., vol. 15, pp. 391-411, 1997.
[18] A. Bron, E. Farchi, Y. Magid, Y. Nir, and S. Ur, "Applications of synchronization coverage," presented at the Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, Chicago, IL, USA, 2005.
[19] W. Pugh and N. Ayewah, "Unit testing concurrent software," presented at the Proceedings of the twenty-second IEEE/ACM international conference on Automated software engineering, Atlanta, Georgia, USA, 2007. |