ldionne / d2 Goto Github PK
View Code? Open in Web Editor NEWA library-based approach to deadlock detection using dynamic analysis.
License: MIT License
A library-based approach to deadlock detection using dynamic analysis.
License: MIT License
A DSEL should be used to define event characteristics. From a specification created using template metaprogramming, serialization code, accessors and such could probably be generated.
The mixed_events unit test should be parametrized so it can be run with different combinations and numbers of mixed events.
Locking ABBA and then BAAB in the same thread does not yield a deadlock potential because both groups are in the same thread. However, the happens-before would return that both happen at the same time. Clearly, they can't happen at the same time because they are in the same thread, i.e. they are executed in serie. Is this a design flaw?
Since we're now using tiernan_all_cycles
to detect cycles, the ABBA_noise
scenario can't even finish in a reasonable amount of time. Some possibilities for improvement are:
The command line utility should be aware of mutually exclusive options and an error should be reported when mutually exclusive options are specified.
See libs/program_options/example/real.cpp for help.
The cyclic_permutation.hpp header contains dubious use of rvalue references for perfect forwarding. This was initially required because template parameters would not deduce to the same type if two iterators were passed with different value categories, i.e. lvalue and rvalue.
I gotta see whether:
While we use an artificial dyno::thread_id
for logging purposes, we could store the system thread id for diagnostic purposes. Since system thread ids may be reused, we could also specify the number of times that thread id has been reused (that could help the programmer to locate the deadlock?).
For an example of where the current analysis falls short, see the ABBA_gatelock_in_parent_thread
scenario. Adding support for this might require non-trivial changes, but it is quite important since this pattern will probably appear frequently in real applications.
The Repository class should be usable under different modes (read/write at least).
Desirable behavior: Opening an inexistant repository in read only mode should be an error (a little bit like the standard streams).
std::thread::id
s may be reused after a thread has joined. This is probably the same for boost::thread::id
s. We really need a way of handling this. For example, when loading events, if a thread with the same id has already been started and terminated, we could create a new artificial id and store the original one for diagnostic purposes. The analysis would use the artificial thread id (because they all need to be different) but the diagnostic could refer to the other one (and specify that the thread id was reused).
The readme should be meaningful, with explanations about how to build, etc..
Integration with Boost is currently only partial, and the provided patch is not really helpful.
It would be nice to have a way to detect synchronization objects that are never unlocked.
This can be done by looking at the locks still held by a thread at the end of this thread's construction in the lock graph.
It should be possible to identify unique events using some kind of coordinate system. Every event would have different coordinates.
Possible coordinates:
The ABBA_redundant_diff_functions integration test fails intermittently.
There are several BOOST_ASSERTs in the api implementation in src/api/api.cpp. They should not be assertions and we should decide of a way to handle these cases.
Possible solution: Generate special events such that the graph construction algorithms do not explode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.