Abstract
Replay is an important technique in program analysis, allowing to reproduce bugs, to track changes, and to repeat executions for better understanding of the results. Unfortunately, since re-executing a concurrent program does not necessarily produce the same ordering of events, replay of such programs becomes a difficult task. The most common approach to replay of concurrent programs is based on analyzing the logical dependencies among concurrent events and requires a complete recording of the execution we are trying to replay as well as a complete control over the program’s scheduler. In realistic settings, we usually have only a partial recording of the execution and only partial control over the scheduling decisions, thus such an analysis is often impossible. In this paper, we present an approach for replay in the presence of partial information and partial control. Our approach is based on a novel application of the cross-entropy method, and it does not require any logical analysis of dependencies among concurrent events. Roughly speaking, given a partial recording R of an execution, we define a performance function on executions, which reaches its maximum on R (or any other execution that coincides with R on the recorded events). Then, the program is executed many times in iterations, on each iteration adjusting the probabilistic scheduling decisions so that the performance function is maximized. Our method is also applicable to debugging of concurrent programs, in which the program is changed before it replayed in order to increase the information from its execution. We implemented our replay method on concurrent Java programs and we show that it consistently achieves a close replay in presence of incomplete information and incomplete control, as well as when the program is changed before it is replayed.
This work is partially supported by the European Community under the Information Society Technologies (IST) program of the 6th FP for RTD - project SHADOWS contract IST-035157. The authors are solely responsible for the content of this paper. It does not represent the opinion of the European Community, and the European Community is not responsible for any use that might be made of data appearing therein.
Chapter PDF
References
Agarwal, A., Garg, V.K.: Efficient dependency tracking for relevant events in concurrent systems. Distributed Computing 19(3), 163–182 (2006)
Alon, G., Kroese, D.P., Raviv, T., Rubinstein, R.Y.: Application of the cross-entropy method to buffer allocation problem in simulation-based environment. Annals of Operations Research (2004)
Carver, R.H., Tai, K.C.: Replay and testing for concurrent programs. IEEE Software 8(2), 66–74 (1991)
Chockler, H., Farchi, E., Godlin, B., Novikov, S.: Cross-entropy based testing. In: Proceedings of Formal Methods in Computer Aided Design (FMCAD), pp. 101–108. IEEE Computer Society, Los Alamitos (2007)
Choi, J.-D., Srinivasan, H.: Deterministic replay of multithreaded java applications. In: ACM SIGMETRICS Symposium on Parallel and Distributed Tools (SPDT), pp. 48–59 (1998)
Costa, A., Jones, O.D., Kroese, D.: Convergence properties of the cross-entropy method for discrete optimization. Operations Research Letters 35(5), 573–580 (2007)
Dubin, U.: The cross-entropy method for combinatorial optimization with applications. Master Thesis, The Technion (2002)
Edelstein, O., Farchi, E., Nir, Y., Ratzaby, G., Ur, S.: Multithreaded java program test generation. IBM Systems Journal 41(3), 111–125 (2002)
Hamming, R.W.: Error detecting and error correcting codes. Bell System Technical Journal 26(2), 147–160 (1950)
Keith, J.M., Kroese, D.P.: Rare event simulation and combinatorial optimization using cross entropy: sequence alignment by rare event simulation. In: Proceedings of the 34th Winter Simulation Conference: Exploring New Frontiers, pp. 320–327. ACM, New York (2002)
Kirkpatrick, S., Gelatt, C.D., Vecchi, M.P.: Optimization by simulated annealing. Science 220(4598), 671–680 (1983)
Krause, E.F.: Taxicab Geometry: An Adventure in Non-Euclidean Geometry, Dover (1987)
Kullback, S., Leibler, R.A.: On information and sufficiency. Annals of Mathematical Statistics 22, 79–86 (1951)
Kumar, R., Garg, V.K.: Modeling and control of logical discrete event systems. Kluwer Academic Publishers, Dordrecht (1995)
Lamport, L.: Time, clocks, and the ordering of events in a distributed system. Communications of the ACM 21(7), 558–565 (1978)
Leblanc, T.J., Mellor-Grummy, J.M.: Debugging parallel programs with instant replay. IEEE Transactions on Computers 36(4), 471–481 (1987)
Margolin, L.: Cross-entropy method for combinatorial optimization. Master Thesis, The Technion (2002)
Mittal, N., Garg, V.K.: Debugging distributed programs using controlled re-execution. In: ACM Symposium on Principles of Distributed Computing (PODC), pp. 239–248 (2000)
Mittal, N., Garg, V.K.: Finding missing synchronization in a distributed computation using controlled re-execution. Distributed Computing 17(2), 107–130 (2004)
Netzer, R.H.B.: Optimal tracing and replay for debugging shared-memory parallel programs. In: Proceedings of ACM/ONR Workshop on Parallel and Distributed Debugging; also available as ACM SIGPLAN Notices 28(12), 1–11 (1993)
Paik, E.H., Chung, Y.S., Lee, B.S.: Chae-Woo Yoo. A concurrent program debugging environment using real-time replay. In: Proc. of ICPADS, pp. 460–465 (1997)
Rubinstein, R.Y.: Optimization of computer simulation models with rare events. European Journal on Operations Research 99, 89–112 (1997)
Rubinstein, R.Y.: The cross-entropy method and rare-events for maximal cut and bipartition problems. ACM Transactions on Modelling and Computer Simulation 12(1), 27–53 (2002)
Rubinstein, R.Y., Kroese, D.P.: The Cross-Entropy Method: A Unified Approach to Combinatorial Optimization, Monte-Carlo Simulation and Machine Learning. In: Information Science and Statistics. Springer, Heidelberg (2004)
Sen, K., Agha, G.A.: Cute and jcute: Concolic unit testing and explicit path model-checking tools. In: Ball, T., Jones, R.B. (eds.) CAV 2006. LNCS, vol. 4144, pp. 419–423. Springer, Heidelberg (2006)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2009 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Chockler, H., Farchi, E., Godlin, B., Novikov, S. (2009). Cross-Entropy-Based Replay of Concurrent Programs. In: Chechik, M., Wirsing, M. (eds) Fundamental Approaches to Software Engineering. FASE 2009. Lecture Notes in Computer Science, vol 5503. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-00593-0_14
Download citation
DOI: https://doi.org/10.1007/978-3-642-00593-0_14
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-00592-3
Online ISBN: 978-3-642-00593-0
eBook Packages: Computer ScienceComputer Science (R0)