Skip to main content
Top
Published in: International Journal of Parallel Programming 3/2016

01-06-2016

Automatic Generation of Unit Tests for Correlated Variables in Parallel Programs

Authors: Ali Jannesari, Felix Wolf

Published in: International Journal of Parallel Programming | Issue 3/2016

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

A notorious class of concurrency bugs are race condition related to correlated variables, which make up about 30 % of all non-deadlock concurrency bugs. A solution to prevent this problem is the automatic generation of parallel unit tests. This paper presents an approach to generate parallel unit tests for variable correlations in multithreaded code. We introduce a hybrid approach for identifying correlated variables. Furthermore, we estimate the number of potentially violated correlations for methods executed in parallel. In this way, we are capable of creating unit tests that are suited for race detectors considering correlated variables. We were able to identify more than 85 % of all race conditions on correlated variables in eight applications after applying our parallel unit tests. At the same time, we reduced the number of unnecessary generated unit tests. In comparison to a test generator unaware of variable correlations, redundant unit tests are reduced by up to 50 %, while maintaining the same precision and accuracy in terms of the number of detected races.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Literature
1.
go back to reference Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: ASPLOS XIII: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 329–339. ACM, New York, NY (2008) Lu, S., Park, S., Seo, E., Zhou, Y.: Learning from mistakes: a comprehensive study on real world concurrency bug characteristics. In: ASPLOS XIII: Proceedings of the 13th International Conference on Architectural Support for Programming Languages and Operating Systems, pp. 329–339. ACM, New York, NY (2008)
2.
go back to reference Schimmel, J., Molitorisz, K., Jannesari, A., Tichy, W.F.: Automatic generation of parallel unit tests. In: 8th IEEE/ACM International Workshop on Automation of Software Test (AST) (2013) Schimmel, J., Molitorisz, K., Jannesari, A., Tichy, W.F.: Automatic generation of parallel unit tests. In: 8th IEEE/ACM International Workshop on Automation of Software Test (AST) (2013)
3.
go back to reference Jannesari, A., Westphal-Furuya, M., Tichy, W.F.: Dynamic data race detection for correlated variables. In: Proceedings of the 11th International Conference on Algorithms and Architectures for Parallel Processing, vol. Part I. ICA3PP’11, pp. 14–26. Springer, Berlin (2011) Jannesari, A., Westphal-Furuya, M., Tichy, W.F.: Dynamic data race detection for correlated variables. In: Proceedings of the 11th International Conference on Algorithms and Architectures for Parallel Processing, vol. Part I. ICA3PP’11, pp. 14–26. Springer, Berlin (2011)
4.
go back to reference Lu, S., Park, S., Hu, C., Ma, X., Jiang, W., Li, Z., Popa, R.A., Zhou, Y.: MUVI: automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs. In: SOSP ’07: Proceedings of Twenty-First ACM SIGOPS Symposium on Operating Systems Principles, pp. 103–116. ACM, New York, NY (2007) Lu, S., Park, S., Hu, C., Ma, X., Jiang, W., Li, Z., Popa, R.A., Zhou, Y.: MUVI: automatically inferring multi-variable access correlations and detecting related semantic and concurrency bugs. In: SOSP ’07: Proceedings of Twenty-First ACM SIGOPS Symposium on Operating Systems Principles, pp. 103–116. ACM, New York, NY (2007)
5.
go back to reference Jannesari, A., Tichy, W.F.: Library-independent data race detection. IEEE Transactions on Parallel and Distributed Systems (TPDS), pp. 1–11 (2013) Jannesari, A., Tichy, W.F.: Library-independent data race detection. IEEE Transactions on Parallel and Distributed Systems (TPDS), pp. 1–11 (2013)
6.
go back to reference Jannesari, A., Tichy, W.F.: Identifying ad-hoc synchronization for enhanced race detection. In: IEEE International Symposium on Parallel Distributed Processing (IPDPS), pp. 1–10 (2010) Jannesari, A., Tichy, W.F.: Identifying ad-hoc synchronization for enhanced race detection. In: IEEE International Symposium on Parallel Distributed Processing (IPDPS), pp. 1–10 (2010)
7.
go back to reference Jannesari, A., Bao, K., Pankratius, V., Tichy, W.F.: Helgrind+: an efficient dynamic race detector. In: IEEE International Symposium on Parallel Distributed Processing (IPDPS), pp. 1–13 (2009) Jannesari, A., Bao, K., Pankratius, V., Tichy, W.F.: Helgrind+: an efficient dynamic race detector. In: IEEE International Symposium on Parallel Distributed Processing (IPDPS), pp. 1–13 (2009)
8.
go back to reference Jannesari, A., Tichy, W.F.: On-the-fly race detection in multi-threaded programs. In: Proceedings of the 6th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging. PADTAD ’08, pp. 6:1–6:10. ACM, New York, NY (2008) Jannesari, A., Tichy, W.F.: On-the-fly race detection in multi-threaded programs. In: Proceedings of the 6th Workshop on Parallel and Distributed Systems: Testing, Analysis, and Debugging. PADTAD ’08, pp. 6:1–6:10. ACM, New York, NY (2008)
9.
go back to reference Nethercote, N., Seward, J.: Valgrind: a framework for heavyweight dynamic binary instrumentation. Sigplan Not. 42, 89–100 (2007)CrossRef Nethercote, N., Seward, J.: Valgrind: a framework for heavyweight dynamic binary instrumentation. Sigplan Not. 42, 89–100 (2007)CrossRef
10.
go back to reference Luo, Q., Zhang, S., Zhao, J., Hu, M.: A lightweight and portable approach to making concurrent failures reproducible. In: Proceedings of the 13th International Conference on Fundamental Approaches to Software Engineering. FASE’10, pp. 323–337. Springer, Berlin (2010) Luo, Q., Zhang, S., Zhao, J., Hu, M.: A lightweight and portable approach to making concurrent failures reproducible. In: Proceedings of the 13th International Conference on Fundamental Approaches to Software Engineering. FASE’10, pp. 323–337. Springer, Berlin (2010)
11.
go back to reference Katayama, T., Itoh, E., Ushijima, K., Furukawa, Z.: Test-case generation for concurrent programs with the testing criteria using interaction sequences. In: Proceedings of the Sixth Asia Pacific Software Engineering Conference (APSEC ’99). IEEE Computer Society, Washington, DC (1999) Katayama, T., Itoh, E., Ushijima, K., Furukawa, Z.: Test-case generation for concurrent programs with the testing criteria using interaction sequences. In: Proceedings of the Sixth Asia Pacific Software Engineering Conference (APSEC ’99). IEEE Computer Society, Washington, DC (1999)
12.
go back to reference Wong, W.E., Lei, Y., Ma, Y.: Effective generation of test sequences for structural testing of concurrent programs. In: 10th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS 2005), pp. 539–548. IEEE Computer Society, Richardson, TX (2005) Wong, W.E., Lei, Y., Ma, Y.: Effective generation of test sequences for structural testing of concurrent programs. In: 10th IEEE International Conference on Engineering of Complex Computer Systems (ICECCS 2005), pp. 539–548. IEEE Computer Society, Richardson, TX (2005)
13.
go back to reference Nistor, A., Luo, Q., Pradel, M., Gross, T.R., Marinov, D.: Ballerina: automatic generation and clustering of efficient random unit tests for multithreaded code. In: Proceedings of the 2012 International Conference on Software Engineering (ICSE 2012), pp. 727–737. IEEE Press, Piscataway, NJ (2012) Nistor, A., Luo, Q., Pradel, M., Gross, T.R., Marinov, D.: Ballerina: automatic generation and clustering of efficient random unit tests for multithreaded code. In: Proceedings of the 2012 International Conference on Software Engineering (ICSE 2012), pp. 727–737. IEEE Press, Piscataway, NJ (2012)
14.
go back to reference Cooper, K.D., Harvey, T.J., Kennedy, K.: A Simple, Fast Dominance Algorithm. Technical Report TR06-38870, Computer Science Department, Rice University, Houston, TX (2006) Cooper, K.D., Harvey, T.J., Kennedy, K.: A Simple, Fast Dominance Algorithm. Technical Report TR06-38870, Computer Science Department, Rice University, Houston, TX (2006)
15.
go back to reference Musuvathi, M., Qadeer, S.: Chess: systematic stress testing of concurrent software. In: Puebla, G. (ed.) Logic-Based Program Synthesis and Transformation. Lecture Notes in Computer Science, vol. 4407, pp. 15–16. Springer, Berlin (2007)CrossRef Musuvathi, M., Qadeer, S.: Chess: systematic stress testing of concurrent software. In: Puebla, G. (ed.) Logic-Based Program Synthesis and Transformation. Lecture Notes in Computer Science, vol. 4407, pp. 15–16. Springer, Berlin (2007)CrossRef
16.
go back to reference Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P.A., Neamtiu, I.: Finding and reproducing heisenbugs in concurrent programs. In: Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation. OSDI’08, pp. 267–280. USENIX Association, Berkeley, CA (2008) Musuvathi, M., Qadeer, S., Ball, T., Basler, G., Nainar, P.A., Neamtiu, I.: Finding and reproducing heisenbugs in concurrent programs. In: Proceedings of the 8th USENIX Conference on Operating Systems Design and Implementation. OSDI’08, pp. 267–280. USENIX Association, Berkeley, CA (2008)
21.
go back to reference Xu, M., Bodík, R., Hill, M.D.: A serializability violation detector for shared-memory server programs. Sigplan Not. 40, 1–14 (2005) Xu, M., Bodík, R., Hill, M.D.: A serializability violation detector for shared-memory server programs. Sigplan Not. 40, 1–14 (2005)
22.
go back to reference Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL ’06: Conference Record of the 33rd ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages, pp. 334–345. ACM, New York, NY (2006) Vaziri, M., Tip, F., Dolby, J.: Associating synchronization constraints with data in an object-oriented language. In: POPL ’06: Conference Record of the 33rd ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages, pp. 334–345. ACM, New York, NY (2006)
Metadata
Title
Automatic Generation of Unit Tests for Correlated Variables in Parallel Programs
Authors
Ali Jannesari
Felix Wolf
Publication date
01-06-2016
Publisher
Springer US
Published in
International Journal of Parallel Programming / Issue 3/2016
Print ISSN: 0885-7458
Electronic ISSN: 1573-7640
DOI
https://doi.org/10.1007/s10766-015-0363-8

Other articles of this Issue 3/2016

International Journal of Parallel Programming 3/2016 Go to the issue

Premium Partner