You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/paper.tex
+15-17Lines changed: 15 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -64,14 +64,14 @@
64
64
\begin{abstract}
65
65
Concurrency bugs are often hard to find and therefore hard to fix.
66
66
In this paper we evaluate different techniques and tools that are currently available to effectively find, fix and avoid concurrency bugs.
67
-
These tools should be easy to use, they should bring only a minimal computational and storage overhead and they should have a high coverage with minimal false-positive reports.
67
+
These tools should be easy to use, they should operate with a minimal computational and storage overhead and they should have a high coverage with minimal false-positive reports.
68
68
In short: These tools should be production-ready and applicable to real-world software projects.
69
69
The techniques evaluated are:
70
70
\begin{itemize}
71
71
\item Dynamic code analysis with record and replay and dynamic data race detection.
72
-
\item Concurrency-aware testing with a combined approach of evaluating thread schedules with delta-debugging to automatically pinpoint concurrency bugs.
72
+
\item Concurrency-aware testing with the approach of evaluating thread schedules with delta-debugging to automatically pinpoint concurrency bugs.
73
73
\item Static code analysis with the methods of sequentialization and model-checking.
74
-
\itemLanguage and software design to avoid concurrency bugs when writing software.
74
+
\itemProgramming language and software design to avoid concurrency bugs when writing software.
75
75
\end{itemize}
76
76
\end{abstract}
77
77
@@ -116,18 +116,18 @@ \subsection{Heisenbugs}
116
116
The complexity and uncertainty of concurrency bugs is also the reason for many studies that examine how these bugs occur and explore different ways on how to detect, fix and avoid them~\cite{tu2019go}.
117
117
Thus, numerous tools and techniques have been developed that propose different solutions to solve the problem of concurrency bugs and accelerate the debugging process.
118
118
119
-
This paper will evaluate some of these techniques and tools and how they can be used to ease the process of debugging concurrent bugs.
119
+
In this paper we evaluate some of these techniques and tools and how they can be used to ease the process of debugging concurrent bugs.
120
120
The main focus is to detect bugs efficiently in production, which means that developers should be able to fix bugs with a minimum amount of work and time.
121
121
Also, the manifestation of concurrency bugs should be reported immediately with minimal overhead of computational resources.
122
122
For all of this it is also desirable to have a maximum amount of coverage with only minimal false-positive reports.
123
123
124
124
\subsection{The Go Programming Language}
125
-
The increasing demand for parallel programs has also lead to the development of new programming languages which specialize on this task.
126
-
The goal of these languages is to ease the usage of parallel programming patterns so developers can use it more often without writing extensively more code.
127
-
Additionally they try to avoid the creation of concurrency bugs by their design of language which will be evaluated in \cref{sct:outlook}.
128
-
One example for such a language is Go which is a statically typed programming language developed by Google, which compiles down to single native binaries.
125
+
The increasing demand for parallel programs has also lead to the development of new programming languages which specialize in this task.
126
+
The goal of these languages is to ease the usage of parallel programming patterns, so developers can use them more often without writing extensively more code.
127
+
Additionally, they try to avoid the creation of concurrency bugs by their design of language which will be evaluated in \cref{sct:outlook}.
128
+
One example for such a language is Go which is a statically typed programming language developed by Google, that compiles down to single native binaries.
129
129
Go recently gained a lot of popularity for the purpose of writing highly concurrent programs.
130
-
Popular open-source projects like \emph{Kubernetes}\footnote{\url{https://kubernetes.io/}}, \emph{Docker}\footnote{\url{https://www.docker.com/}} or\emph{Prometheus}\footnote{\url{https://prometheus.io/}} are all written in Go.
130
+
Popular open-source projects like \emph{Kubernetes}\footnote{\url{https://kubernetes.io/}}, \emph{Docker}\footnote{\url{https://www.docker.com/}} and\emph{Prometheus}\footnote{\url{https://prometheus.io/}} are all written in Go.
131
131
The official documentation of Go states: ``[... Go's] concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines [...]''~\cite{goDocs}.
132
132
Go abstracts the creation of threads by using lightweight \emph{goroutines}, which can be created by using the \lstinline{go} keyword followed by a named or anonymous function.
133
133
The Go runtime maps these goroutines to normal Kernel threads during execution.
@@ -143,7 +143,7 @@ \subsection{Structure}
143
143
144
144
The further structure of this paper continues as follows:
145
145
\Cref{sct:taxonomy} gives a brief introduction on the different types of concurrency bugs and their main causes.
146
-
\Cref{sct:dynamic} covers some techniques to dynamically detect concurrency bugs, reliably reproduce them.
146
+
\Cref{sct:dynamic} covers some techniques to dynamically detect concurrency bugs and reliably reproduce them.
147
147
\Cref{sct:testing} shows different methods of concurrency-aware testing to detect concurrency bugs automatically in a testing environment.
148
148
\Cref{sct:static} covers how to detect concurrency bugs with static code analysis.
149
149
And finally, \Cref{sct:outlook} will provide a quick outlook on how the examined tools can be used together as well as other promising technologies that might help avoiding concurrency bugs in the future.
@@ -249,8 +249,7 @@ \subsection{Atomicity and Order Violations}
249
249
\end{lstlisting}
250
250
251
251
Atomicity and order violations are concurrency bugs where the interleaving of threads violates the programmer's intention of atomicity and order.
252
-
% TODO: cite test and use
253
-
\Cref{lst:order} shows a common order violation bug pattern called ``Test-and-Use''.
252
+
\Cref{lst:order} shows a common order violation bug pattern called ``Test-and-Use''~\cite{farchi2003patterns}.
254
253
The programmer's intention is to check if a variable is not \lstinline{nil} and then use this variable.
255
254
However, due to the thread that was launched before, it could happen that after the \lstinline{if} check in line 7, the thread of the goroutine gets scheduled and the data variable is set to \lstinline{nil}.
256
255
To fix this bug, the check and the usage of the variable need to become an atomic operation to enforce the order of execution.
@@ -270,8 +269,7 @@ \subsection{Atomicity and Order Violations}
270
269
}
271
270
\end{lstlisting}
272
271
273
-
% TODO: cite load-store
274
-
\Cref{lst:atomicity} shows one example of the infamous ``Load-Store'' bug pattern.
272
+
\Cref{lst:atomicity} shows one example of the infamous ``Load-Store'' bug pattern~\cite{farchi2003patterns}.
275
273
The programmer might have assumed that \lstinline{++} is an atomic operation because it is one literal in Go.
276
274
However, after compilation, this is expanded to 3 instructions: LOAD, INCREMENT and finally STORE.
277
275
The thread scheduler could switch the context after any of these instructions.
These tools just observe and do not actively try to enforce a manifestation of bugs, so not every thread interleaving might be explored.
352
350
Additionally, they depend on the the recognition of these bugs to report them correctly.
353
351
Programs that heavily rely on multi-threaded execution like web-servers can also become very inefficient or could even fail due to timeout limitations.
354
-
To avoid the overhead in the production environment and to find concurrency bugs in programs that could not be observed easily, it is desirable to prevent concurrency bugs before they can even get into production.
352
+
To avoid the overhead in the production environment and to find concurrency bugs in programs that could not be observed easily, it is desirable to find concurrency bugs before they can even get into production.
This way the test cases can be minimized to semantical correctness checks, which decreases the operational overhead for such a setup.
397
395
398
396
Concurrency-aware testing is very promising in the regard of extending an existing testing pipeline.
399
-
This way concurrency bugs could be detected even before the software is deployed into production.
397
+
This way concurrency bugs could be detected even before the software gets deployed into production.
400
398
The overhead can be minimized by optimizing the thread schedule generator and by ignoring most uncritical regions of the code.
401
399
However, the coverage depends on the quality of the tests that also need to be aware of multi-variable semantic data races.
402
400
@@ -479,7 +477,7 @@ \section{Conclusion}
479
477
480
478
Although there is a variety of tools that try to ease the process of multi-threaded debugging, as shown, none of them really fulfills all requirements for a production-ready drop-in solution.
481
479
But there are multiple techniques that can be combined to at least get some support in debugging multi-threaded applications.
482
-
In all of this the developers always have to decide if safety or speed is more important for their application and adjust the tools to these needs.
480
+
In all of this the developers always have to decide if safety and overall correctness or speed is more important for their application and adjust the tools to these needs.
0 commit comments