Font Size: a A A

Concurrency Bugs Fixing Method Based On Memory Access Patterns

Posted on:2020-09-28Degree:MasterType:Thesis
Country:ChinaCandidate:H R LinFull Text:PDF
GTID:2518306518463464Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of computer hardware,multi-core processors are becoming more common,and concurrency programs are used widely.Concurrency programs have many advantages over traditional sequential programs with higher operational efficiency and more adequate resource utilization.However,they also have shortcomings such as concurrency bugs due to the complexity of thread scheduling and the uncertainty in running time.Bug will cause serious results if they aren't fixed timely.Unlike traditional bugs,concurrency bugs only appear in some special schedules and need to be fixed by appropriate patches,so traditional methods are not applicable here.Fixing concurrency bugs is time consuming and labor intensive.Programmers can reduce their workload by using automated fix methods.In this paper,we propose an automated fix method for non-deadlocked concurrency bugs in Java concurrency programs,named PFix,it's key idea is to infer the locking policy to systematically fix concurrency bugs.It combines dynamic operation with static analysis.We record program's running information by Java Path Finder and find read-write operations.Then we get memory access patterns and rank them.We use memory access patterns to represent common non-deadlock concurrency bugs and fix bugs by adding locks or semaphores.Before adding locks,we decide which object to use by inferring the locking policy.When we can use old locks,we infer the locking policy by analyzing the use of locks.Besides,we infer the locking policy by building abstract syntax forest to add new locks.Then,we design fix methods based on the locking policy and memory access patterns to add fixing patches.We use the abstract syntax tree and Soot to adjust the patches,making them more reasonable.Finally,we use Java Path Finder to dynamically run the fixed program to verify fix results.We collect a set of 32 concurrency programs that can be run by Java Path Finder as a dataset.We applied the fix method to the dataset and successfully fix 29 of 32.We manual analysis programs fixed unsuccessfully.
Keywords/Search Tags:Concurrency bugs, Memory access pattern, Automatic fixing, Locking policy, Abstract synatx tree
PDF Full Text Request
Related items