Cargando…

A Study of Memory Anomalies in OpenMP Applications

Incorrect usage of OpenMP constructs may cause different kinds of defects in OpenMP applications. Most of the existing work focuses on concurrency bugs such as data races and deadlocks, since concurrency bugs are difficult to detect and debug. In this paper, we discuss an under-examined defect in Op...

Descripción completa

Detalles Bibliográficos
Autores principales: Yu, Lechen, Protze, Joachim, Hernandez, Oscar, Sarkar, Vivek
Formato: Online Artículo Texto
Lenguaje:English
Publicado: 2020
Materias:
Acceso en línea:https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7460291/
http://dx.doi.org/10.1007/978-3-030-58144-2_21
_version_ 1783576567576788992
author Yu, Lechen
Protze, Joachim
Hernandez, Oscar
Sarkar, Vivek
author_facet Yu, Lechen
Protze, Joachim
Hernandez, Oscar
Sarkar, Vivek
author_sort Yu, Lechen
collection PubMed
description Incorrect usage of OpenMP constructs may cause different kinds of defects in OpenMP applications. Most of the existing work focuses on concurrency bugs such as data races and deadlocks, since concurrency bugs are difficult to detect and debug. In this paper, we discuss an under-examined defect in OpenMP applications: memory anomalies. These occur when the application issues illegal memory accesses that may result in a non-deterministic result or even a program crash. Based on the latest OpenMP 5.0 specification, we analyze some OpenMP usage errors that may lead to memory anomalies. Then we illustrate three kinds of memory anomalies: use of uninitialized memory (UUM), use of stale data (USD), and use after free (UAF). While all three anomalies can occur in sequential programs, their manifestations in parallel OpenMP programs can be different, and debugging such anomalies in the context of parallel programs also imposes an additional complexity relative to sequential programs. To measure the effectiveness of memory anomaly detectors on OpenMP applications, we have evaluated three state-of-the-art tools with a group of micro-benchmarks. These micro-benchmarks are either selected from the DRACC benchmark suite or constructed from our own experience. The evaluation result shows that none of these tools can currently handle all three kinds of memory anomalies.
format Online
Article
Text
id pubmed-7460291
institution National Center for Biotechnology Information
language English
publishDate 2020
record_format MEDLINE/PubMed
spelling pubmed-74602912020-09-01 A Study of Memory Anomalies in OpenMP Applications Yu, Lechen Protze, Joachim Hernandez, Oscar Sarkar, Vivek OpenMP: Portable Multi-Level Parallelism on Modern Systems Article Incorrect usage of OpenMP constructs may cause different kinds of defects in OpenMP applications. Most of the existing work focuses on concurrency bugs such as data races and deadlocks, since concurrency bugs are difficult to detect and debug. In this paper, we discuss an under-examined defect in OpenMP applications: memory anomalies. These occur when the application issues illegal memory accesses that may result in a non-deterministic result or even a program crash. Based on the latest OpenMP 5.0 specification, we analyze some OpenMP usage errors that may lead to memory anomalies. Then we illustrate three kinds of memory anomalies: use of uninitialized memory (UUM), use of stale data (USD), and use after free (UAF). While all three anomalies can occur in sequential programs, their manifestations in parallel OpenMP programs can be different, and debugging such anomalies in the context of parallel programs also imposes an additional complexity relative to sequential programs. To measure the effectiveness of memory anomaly detectors on OpenMP applications, we have evaluated three state-of-the-art tools with a group of micro-benchmarks. These micro-benchmarks are either selected from the DRACC benchmark suite or constructed from our own experience. The evaluation result shows that none of these tools can currently handle all three kinds of memory anomalies. 2020-08-03 /pmc/articles/PMC7460291/ http://dx.doi.org/10.1007/978-3-030-58144-2_21 Text en © The author(s) 2020 Open Access This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence and indicate if changes were made. The images or other third party material in this chapter are included in the chapter's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.
spellingShingle Article
Yu, Lechen
Protze, Joachim
Hernandez, Oscar
Sarkar, Vivek
A Study of Memory Anomalies in OpenMP Applications
title A Study of Memory Anomalies in OpenMP Applications
title_full A Study of Memory Anomalies in OpenMP Applications
title_fullStr A Study of Memory Anomalies in OpenMP Applications
title_full_unstemmed A Study of Memory Anomalies in OpenMP Applications
title_short A Study of Memory Anomalies in OpenMP Applications
title_sort study of memory anomalies in openmp applications
topic Article
url https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7460291/
http://dx.doi.org/10.1007/978-3-030-58144-2_21
work_keys_str_mv AT yulechen astudyofmemoryanomaliesinopenmpapplications
AT protzejoachim astudyofmemoryanomaliesinopenmpapplications
AT hernandezoscar astudyofmemoryanomaliesinopenmpapplications
AT sarkarvivek astudyofmemoryanomaliesinopenmpapplications
AT yulechen studyofmemoryanomaliesinopenmpapplications
AT protzejoachim studyofmemoryanomaliesinopenmpapplications
AT hernandezoscar studyofmemoryanomaliesinopenmpapplications
AT sarkarvivek studyofmemoryanomaliesinopenmpapplications