SumTree::get now non-intrusively picks an element and returns a
reference to it, SumTree::remove removes and returns a copy. The
former is needed for sampling with replacement.
Change-Id: Iefef2fdf0b7df6ea7a9949f2588528ec9e86bb7a
This change fixes several file-descriptor leaks in the DwarfReader
implementation. The patch is taken from Richard Hellwig's not yet
merged change I161f626d12ca7f2b7b9d13ba9cbc254eb55692f1. I did not
apply any white-space cleanups to prevent conflicts when Richard's
change will be merged later.
Change-Id: Icd9c1bdeeab39e77900e2ce88b756a8cf7ade96a
This change makes sure an active but not-yet fired listener does not fire
anymore if it gets removed. In this case, the listener already has an
invalid index, but still needs to be copied to the delete list.
This issue has not been observed in the wild, and is unlikely to have
caused real problems in the past.
Change-Id: I8be8a5b1d4cdc783a092b93f34f33b969894e5da
This commit changes the entities in a ResultSet from listener indexes
(into ListenerManagers m_BufferList) to BaseListener pointers, as
ListenerManager::makeActive(BaseListener*) (called from
FastBreakpoints/Watchpoints.ah) may invalidate indexes temporarily
stored in a ResultSet. The issue occurs when multiple breakpoints
(watchpoints) fire at the same time, and one added more recently than
the others occupies the largest index position in m_BufferList.
Although this issue is extremely rare and was only observed in a few
corner cases up to now, it may have falsified results in the past.
Change-Id: I7b788a06d412f15700ca75f56f2be5d3b78465fa
This change alters/corrects DwarfReader's way of determining the size of
linetable entries (i.e. their "range size"); the interface (e.g. to
ElfReader) stays the same. Prior to this, it was assumed that static
instructions within "the linetable" were sorted in ascending order. This
assumption turned out to be false, as every compilation unit's header has
its own linetable and the compilation unit headers are not sorted by their
static instructions.
Furthermore this change implements normalization of file names.
Change-Id: Ia4beb7bf9cfb6f1a499aeebd01228335b70ab52d
The GenericExperiment is a standard campaign+experiment pair. It is
derived from the DatabaseCampaign+DatabaseExperiment. Its experiment
endpoints are set on the command line, therefore it can be used to give
users a first impression of FAIL*. Currently it supports different
endpoints:
--trap: Catch all traps that occur and end the experiment
--timeout <N>: kill the experiment after N microseconds
--catch-write-text: detect writes on the text segment
--catch-write-outerspace: detect writes into nirvana
--{ok,fail,detected}-marker: groups of ELF symbols that are used as
execution breakpoints
Change-Id: Idc7fcf8875953f1007e1a37bacb086eddd29cd10
The DatabaseExperiment is a class a concrete experiment can inherit
from. It handles the communication with the campaign server. Does the
fast forward to the fault location, injects the fault and gives the
result over experiment outcome to the child class.
Change-Id: I1fb676da6c704cd570a638f0dfaadd4f1a9845e4
The variable PROTOBUF_IMPORT_DIRS has to be set in the toplevel
CMakeLists.txt, since the import path has to be available for all .proto
files within all subdirectories. Without this addition, the
GenericExperiment will fail to compile.
Change-Id: I676e0abd83bd1c5d247afcd33e7522e72da3dc2f
This change implements the following:
-DwarfReader now exports the address range of linetable-entries instead of
only the first address
-ElfImporter saves this range alongside the mapping
Change-Id: I7fe6361178f761a8f605a44bb0183c56a236cc95
This change alters DwarfReader and import-trace's ElfImporter so that they use
unsigned int for static address and line numbers instead of signed int.
Change-Id: I84ebbb500afd7cd4d93b137a35dcf736dc679fab
The inline configuration mechanism did work properly for iterated
invocation of cmake. But since the configuration items were set after
the decision was made whether a tool was build or not, they had only
influence on the second run of cmake.
The experiment configuration is no saved in a config.cmake file, which
populates the CMakeCache.txt before any other CMakeLists.txt is read.
Change-Id: I6eca1c6e462af3a241bd9c5b9a27a71a1f5d2829
The configuration from weather-monitor was also stripped down to those
values which do not represent the default settings.
Change-Id: I207306e555067156a4ed80edcbcd524137bc8e27
The configuration needed to build this experiment is no noted within the
experiment's CMakeLists.txt. This allows the easy building of this
experiment.
Change-Id: Ifddc4e6a8fa4e63c4656058166f9ef42e46e1edb
The configure step for libfailbochs_external could be executed parallel
to other build steps, which required the files produced by the configure
step. Therefore a race-condition occurred. By giving the configure step
an explicit target name, more correct dependencies could be modeled
within bochs.cmake.
Change-Id: If2d7dafdace23b0eba6efcdff3ed0bfca2423048
The import-trace tool supports a memorymap file as argument. Currently the
import tool accepts only decimal values, but the hexadecimal system is more
common to specify a memory address or range. To avoid a manual translation
between hex and dec values the patch extends the import tool to handle both
types according to the prefix of a value.
Change-Id: I79d0bc03ecf296dfbced8fb33518e8f5a5790366
This change sets the option parser to GNU mode, that is, allows
further option parameters after non-option parameters, e.g.:
dump-trace foo.tc -s
instead of
dump-trace -s foo.tc
As Fail* currently works on GNU platforms only, this behavior is the
one presumably expected from users.
Change-Id: I9c55eaf4560cde81ebd0b94214201c8ad02c2b74
Independent of the protocol specification all integer fields in the
result table are signed. For instance, if I store a kernel IP (e.g.
0xf1....) the value in the database is 0x7fffffff because of the wrong
type.
Therefore, the data fields of the result table should have the same
types as specified in the protocol.
Change-Id: I9154251e4ad67ba70fe86155ebda378c4a9982c2
This change fixes the Protobuf->MySQL bridge for strings, which were
corrupted in rare cases, especially with debug builds of the
DatabaseCampaign. String columns in result tables from any campaign
up to this point may contain corrupted data.
The core reason for the corruption was that the TypeBridge_string
bound a temporary (a nameless local variable) to the prepared
statement. This temporary is destroyed before the subsequent call to
mysql_stmt_bind_param(), and the string within can only be referenced
successfully if it has not been overwritten yet. The solution is to
copy the string to a bridge-internal variable.
Although it might seem that TypeBridge_enum has the same problem, the
protobuf library seems to return references to internal string
constants when retrieving the enum values.
Change-Id: Id127e6b3333d7c304d688e45de9bea44bbc610b0
Campaign to perform fault injection experiments on the Fiasco microkernel. Required arguments:
- Variant (-v): The actual experiment variant (e.g. BASELINE)
- Benchmark (-b): The actual experiment benchmark
- Golden-Run (-g) : Specify whether the golden-run or the actual fault-injection experiment should be executed (only for fail-client)
- Stop address (-E): Address where the experiment should finish
- Timer-ticks (-T): Number of timer ticks from the golden run experiment
- Total-instructions (-t): Number of total instructions from the golden run experiment
- Ecc-panic-function-address (-p): Address of the Ecc-panic function in order to detect failures (if any fault detection is included)
- Errors_corrected variable address (-c): Address of the errors_corrected variable in order to determain if any error was corrected
Important: First run the generic-tracing experiment so there is a "state" folder where the actual experiment can start from and import/prune the resulting trace.
Change-Id: I151428ecc21f5e714cc923674ebbca9d84435704
This fixes a "funny" conflict between the SumTreeTest and
weather-monitor's experiment.hpp.
Note to self: Preprocessor macros are evil.
Change-Id: I3f8c95fe086357db77110c0c53d3120ca839f30a
Instead of issuing a query for every variant, we assemble a set of
variant ids and query `WHERE variant_id in (1,...)'. This has not only
the effect of higher optimization potential for the database, but also
the query is issued before any result can come back. This will avoid an
overfull receive queue within the job server.
Change-Id: I5b1c60f92b97741ce26d9e50760b601929cef44f
This is a copy of the generic-tracing plugin for CoRedOS with the following
additions:
- random generator plugin is added if a "random_source" symbol is found
- checkpoint plugin is added if a "fail_trace" symbol is found. If stack
limits are defined by "_sstack" and "_estack" symbols this memory region
is checksummed on each checkpoint.
Change-Id: I00403ed917ad941d87ac2aeabd00c441135d9af4
The checkpoint plugin watches for writes on the given symbol and logs
the written value and the simulation time to a given output file.
Additionally, a SHA1 hash is computed over all memory locations between
given start and stop symbols.
On x86, virtual memory is disabled while computing the checkpoint hash.
This means the checkpoint plugin in checksumming over physical, not
virtual, address ranges! This can result to unexpected behaviour if
virtual memory is not used for identity paging.
To save checkpoint information to a file, use the Checkpoint constructor
with a given checkpoint symbol and add the plugin to the experiment (flow).
To check checkpoints against an existing file, use the constructor without
memory symbol and do not add the plugin to the experiment. Instead, define
a memory listener "manually" and call the check() function. This approach
was taken as the simplest form of cooperation between experiment and
plugins.
For SHA1 calculation, C code from RFC 3174 is used to prevent depending
on another external library. However, this may not be the fastest or
best code for the task.
TEMPORARY HACK/WORKAROUND:
Since dOSEK uses the highest bit (31) of some pointers for parity and
the checksum plugin reads these (stack) pointers to determine checksum
regions, the plugin currently DISCARDS BIT 31 of pointers used as
dynamic region limits.
This will be replaced in the future by a callback mechanism, which lets
the experiment specify the regions to checksum (called at each checkpoint).
Change-Id: I176eccc34b582bbf13e52b6943191dd20258acc5
assert(...) can be optimized away, therefore side-effect code should not
be placed inside an assertion.
Change-Id: I28aee42e53cb105333094d0042a3f6e2cc5b5a30
Since we know for which variant we want to have the completed pilots, we
do not have to catch all pilot_ids but only those who of pilots that are
finished and have the correct variant_id. This speeds the startup of the
campaign server enormously when having many completed campaigns in the
database.
Change-Id: I8be584a2dd6d8d7315f30dcb5bff89647353001e
This change renames the logger object used in weather-monitor from
"log" to "LOG" in order to circumvent potential naming conflicts
with e.g. the log() function from e.g. math.h/cmath.
Change-Id: I73758374f76ea5c29cb636ae3e0685a4a4cceacb
This commit modifies the weather-monitor experiment so that it
uses util/ElfReader instead of "nm -C" in a wrapper-script to
determine the various symbol addresses. experimentInfo.hpp now
only contains (rudimentary) configuration data for the experiment.
Furthermore this commit modularizes the experiment's code so that
there no longer is a humongous run() method.
Change-Id: I42461e1dabb5050af372810bb9fb61a6fccd0d99
This change removes an unnecessary "#ifndef __puma" from the LLVM
disassembler test code and fixes compilation with the latest AspectC++
binaries.
Change-Id: Ibe835a4a6df69255555c668985f15b9cf8fb82b4
Up to now, the IOPortListener only caught invocations of INB/OUTB with
the port number in DX and 8-bit input/output (from/to AL), but none of
the various other methods to access the I/O port range (e.g., by 8-bit
immediate port numbers). This change is supposed to catch all other
cases, too.
Change-Id: I1180cd9c1d59df600067739817adab684b18a608
This change allows DatabaseCampaign users to take advantage of the
improved variant selection methods in the Database class (multiple
uses of --variant/--benchmark possible, plus
--exclude-variant/--exclude-benchmark switches).
Change-Id: Idb1ca04538ff7601b3648cd9ba766aa8690fff6b