Publicação
Thread-Aware Data Race Detection in Java Classes
| Resumo: | The rise of concurrent programming revolutionized the world of computing by improving program efficiency and performance. However, it introduced the state explosion problem and troublesome data races. Since then, computer scientists have focused on continuously abstracting programs, devising techniques and tools to help developers manage the increasingly complex task of synchronizing shared data accesses. State-of-the-art data race detectors like RacerD and SWORD are capable of capturing concurrency bugs in multithreaded programs, but lack context reasoning, leading to false positives, and rely on the programmer to explicitly adjust their programs based on the output. Even if an object is never shared beyond the execution of a thread, static analysis tools are conservative and may assume all accesses can run in parallel in the absence of synchronization, reporting data races that cannot really occur. This dissertation proposes a solution involving the static analysis of program classes, without concurrency control, for the detection of memory accesses that lead to data races. This is based on conflicting accesses involving class instances and their shared mutable states to indicate the need to provide atomic accesses by annotating class fields. It is meant to be utilized as input for the compilation of the AtomiS framework, which automatically generates concurrency control based on annotated code, thereby removing the need for programmers to manually address concurrency issues. The solution can distinguish the instances that each thread accesses and associate them with their execution contexts to output more precise reports than RacerD and SWORD. Our approach identifies the instance fields that should be accessed atomically as a consequence of being the target of data races between distinct threads, but still requires inter-method access analysis to yield more precise and complete results and reduce false negatives, and adequate annotation inference. In the future, once these improvements are appropriately implemented and the current work is refined by modeling method calls, to reflect changes to caller objects and parameters, programmers might not need to approach their multithreaded programs to define synchronization for shared accesses. |
|---|---|
| Autores principais: | Correia, André Alexandre Silva |
| Assunto: | static analysis data race thread-awareness concurrency control |
| Ano: | 2025 |
| País: | Portugal |
| Tipo de documento: | dissertação de mestrado |
| Tipo de acesso: | acesso aberto |
| Instituição associada: | Universidade Nova de Lisboa |
| Idioma: | inglês |
| Origem: | Repositório Institucional da UNL |
| Resumo: | The rise of concurrent programming revolutionized the world of computing by improving program efficiency and performance. However, it introduced the state explosion problem and troublesome data races. Since then, computer scientists have focused on continuously abstracting programs, devising techniques and tools to help developers manage the increasingly complex task of synchronizing shared data accesses. State-of-the-art data race detectors like RacerD and SWORD are capable of capturing concurrency bugs in multithreaded programs, but lack context reasoning, leading to false positives, and rely on the programmer to explicitly adjust their programs based on the output. Even if an object is never shared beyond the execution of a thread, static analysis tools are conservative and may assume all accesses can run in parallel in the absence of synchronization, reporting data races that cannot really occur. This dissertation proposes a solution involving the static analysis of program classes, without concurrency control, for the detection of memory accesses that lead to data races. This is based on conflicting accesses involving class instances and their shared mutable states to indicate the need to provide atomic accesses by annotating class fields. It is meant to be utilized as input for the compilation of the AtomiS framework, which automatically generates concurrency control based on annotated code, thereby removing the need for programmers to manually address concurrency issues. The solution can distinguish the instances that each thread accesses and associate them with their execution contexts to output more precise reports than RacerD and SWORD. Our approach identifies the instance fields that should be accessed atomically as a consequence of being the target of data races between distinct threads, but still requires inter-method access analysis to yield more precise and complete results and reduce false negatives, and adequate annotation inference. In the future, once these improvements are appropriately implemented and the current work is refined by modeling method calls, to reflect changes to caller objects and parameters, programmers might not need to approach their multithreaded programs to define synchronization for shared accesses. |
|---|