Commit Graph

1207 Commits

Author SHA1 Message Date
065d534735 Added README and Licensing information
Change-Id: I53301dedc4759186d637fb07bb214482851ecad7
2014-11-03 13:10:12 +01:00
6ab55a8359 scripts/docker: Added docker.io scripts to bootstrap a fail demo
The docker files provide containers with the full toolchain required to
build FAIL*. They also contain a demonstration FI campaign.

Change-Id: I280210eb0487718e82505f0343fa9303c21b8048
2014-11-03 13:10:11 +01:00
c00268242a Merge changes I7fe63611,I84ebbb50
* changes:
  util/DwarfReader, ElfImporter: import address ranges
  util/DwarfReader, ElfImporter: use unsigned addresses
2014-10-23 07:53:46 +02:00
b1b1108583 bochs-experiment-runner: -j option for parallel operation
Change-Id: I29e659da0892fdcfc170dccafa5917593e22776a
2014-10-22 19:07:47 +02:00
491312bb91 GenericExperiment: A standardized fault injection experiment
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
2014-10-22 18:31:58 +02:00
d53c83d7c8 TimerListener: make timeout field changeable
An accessor for the m_Timeout field was missing.

Change-Id: Idf86a3da16a328c783613ed8502446d561f6287c
2014-10-22 18:31:57 +02:00
6ebd9b003a DatabaseExperiment: base class for distributed fail experiments
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
2014-10-22 17:30:07 +02:00
6bbb237bd9 resultbrowser: Do not hardcode result table
For the objdump retrieval, the result_VEZS.. was used. Instead of that
hardcoded string, the parameter should be used instead.

Change-Id: I757527bde2bb7ac0d4e98293b606ad8438cc76e4
2014-10-22 16:35:18 +02:00
0ba03ca97e cmake: Set PROTOBUF_IMPORT_DIRS in toplevel dir
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
2014-10-22 16:35:17 +02:00
5378573b1d util/DwarfReader, ElfImporter: import address ranges
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
2014-10-22 15:42:05 +02:00
d94b005be2 util/DwarfReader, ElfImporter: use unsigned addresses
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
2014-10-22 14:30:43 +02:00
0317be8f8f cmake: Replace the experiment configuration mechanism
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
2014-10-21 17:57:44 +02:00
f7e205f01a experiment/generic-tracing: inline the required configuration
The configuration from weather-monitor was also stripped down to those
values which do not represent the default settings.

Change-Id: I207306e555067156a4ed80edcbcd524137bc8e27
2014-10-21 17:07:57 +02:00
cafbe1df75 bochs: #undef all macros from dis_tables.h
The file dis_tables.h does define several macros with very generic
names (I1, I2). These macros interfere in certain situations with the
boost headers. Therefore, we simply undef all those xmacro arguments,
like it should be done.

Change-Id: Iddf74f04ec016a7ea5de5a66543b670a8992a5d6
2014-10-21 17:06:12 +02:00
c24e54f2d4 weather-monitor: adapt CMake configuration for experiment
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
2014-10-21 12:41:59 +02:00
7ee105016c cmake/bochs: more strict dependency handling for libfailboch_external
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
2014-10-21 12:39:42 +02:00
8fcbc7eeae import-trace: ElfImporter cleanups
-  added several insert_multiple() flushes (which completely broke
    the import before)
 -  import_source_code() refactored
 -  parameter naming improved
 -  better error handling
 -  whitespace/coding-style cleanups
 -  documentation added + cleanups

Change-Id: I70ac95391b9678e0dcce8adfa7df69a4f91ca30d
2014-10-15 11:42:29 +02:00
31166f990e import-trace: fix source line mapping to file IDs
Up to now, source code lines and mappings from static instruction
addresses to lines could be linked to the wrong file if
dbg_filename.path contained duplicates.  This is unfortunately the
normal case when importing multiple variants of the same program into
the database.

Change-Id: I57e71379584d7b01177606192b3aa644846225db
2014-10-08 13:08:05 +02:00
c8bbbb43b4 doc: more details on local LLVM installation
Change-Id: Id85a9153d98bb0ecd9b903b3a98ad6941ccbecba
2014-10-08 11:31:39 +02:00
99f5d2833e ElfImporter: removed --debug, refactored code
This change removes the "--debug" parameter, which previously imported the
mapping of source code lines to static instructions into the database. This
mapping is useless by itself (i.e. without "--sources"), which is why its
code was refactored into the code handling "--sources".

Change-Id: I4700eb0a98661f4df9eb3c190f00dcbe4df0e200
2014-10-07 13:28:03 +02:00
3e01b0c4d5 doc: details on local LLVM installation
Change-Id: I1c8751f1381f5ca9256936513bdc9d21dce6154a
2014-10-01 15:06:38 +02:00
66408e83ce Merge branch 'llvm-rtti' 2014-10-01 15:02:00 +02:00
ebbf35c509 Merge branch 'tools-report-unknown-parameters' 2014-10-01 13:58:57 +02:00
9cd29e3197 doc: edit/add gem5-specific documentation
Change-Id: I3798780022123569f10448c7460e94be3d2530f6
2014-10-01 12:29:03 +02:00
d69ac98654 util: MemoryMap test case for hex/octal support
+ abort() on test failure

Change-Id: I3bd4f19615b1234dae8854950e9d3e1b5810c101
2014-09-30 15:12:31 +02:00
2d1b19ea0f Merge "util: hex and octal number support for MemoryMap" 2014-09-29 16:07:31 +02:00
744ae1b7d7 util: hex and octal number support for MemoryMap
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
2014-09-25 19:40:46 +02:00
b0e13b17c9 tools: abort at unknown cmdline parameters
This change makes all C++-based tools in tools/ abort when they
encounter an unknown commandline parameter (both option or
non-option).  This has already caused some confusion, as in some cases
unexpected behaviour can be the result.  For example, "prune-trace -t
mytrace.tc -d database" up to now ignored the "-t" parameter, took
"mytrace.tc" as the first non-option parameter (and ignored it); as no
option parameter may follow the non-option parameters, all other
options were ignored as well.

Change-Id: Ia0812a518c4760fa28ed54979c81f43fa7aa096e
2014-09-25 17:14:08 +02:00
3fd94abcd3 cmdline: parse parameters in GNU mode
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
2014-09-25 17:14:08 +02:00
6d3ab14365 DatabaseProtobufAdapter: fix translation of unsigned fields
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
2014-09-24 16:16:21 +02:00
d962a322ea DatabaseProtobufAdapter: fix string insertion
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
2014-09-18 19:40:59 +02:00
db2a0dc056 prune-trace: fix pruner listing change
Commit 89817cf13f did not completely
remove the manual pruner instantiation code.

Change-Id: I00dab9e3f4f3e2acf1d0f285237cc03a968aabfb
2014-09-18 13:45:44 +02:00
020af0ef6f prune-trace: fixed errors in help output
This change fixes glitches in the help's text.

Change-Id: I3a492c95ffa516f891dc807c875fab1146768a6e
2014-09-18 13:09:28 +02:00
0208e80dbb Merge branch 'sampling'
Conflicts:
	src/core/cpn/DatabaseCampaign.cc

Change-Id: Ic11d9ce26546bccba11768383a8fda6a3458530f
2014-09-08 15:36:21 +02:00
342af09e34 Fiasco-Fail: Fault-Injection experiment campaign for the Fiasco microkernel
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
2014-09-08 11:10:19 +02:00
140944fda1 doc/how-to-use: added para. for weather-monitor
This change adds a weather-monitor-specific paragraph to how-to-use.txt.

Change-Id: If7dd3e3a65ce805de5e161187baa832df64c90dc
2014-09-02 13:11:06 +02:00
e87ace65ef util: SumTree test build fix
This fixes a "funny" conflict between the SumTreeTest and
weather-monitor's experiment.hpp.

Note to self: Preprocessor macros are evil.

Change-Id: I3f8c95fe086357db77110c0c53d3120ca839f30a
2014-08-29 11:35:45 +02:00
89817cf13f prune-trace: list available pruners
By using the AliasedRegistry, "prune-trace --help" (and
"prune-trace -p '?'") now lists all available Pruners to the user.

Change-Id: Ib5e3d00aabc37e6d48d804d2d709812af3f7efb2
2014-08-28 13:58:46 +02:00
42182591e5 fix compiler warnings
(DatabaseCampaign; llvmdisassembler)

Change-Id: Ic31758018a0a1ff0ceac81f781eecfc5f8060f89
2014-08-28 12:12:38 +02:00
84cfa2ae42 Merge commit '0da8ba0dec111d78292455bb5f17c6045820db25' 2014-08-28 12:04:34 +02:00
f98871dd5a prune-trace: preserve existing data
With this change, prune-trace checks for existing fsppilot/fspgroup
entries for each variant to be pruned, and skips the variant in this
case.  This safety measure can be switched off with --overwrite.

Change-Id: I7e758a9853a25685ca176cf1a1810523753cdd4a
2014-08-28 11:57:40 +02:00
e9db4ee4e7 Merge "db-campaign: load completed pilots in one query" 2014-08-25 16:52:28 +02:00
61050b3760 db-campaign: load completed pilots in one query
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
2014-08-25 13:50:20 +02:00
ebb307f3ee Resultbrowser: Integrate pruning intervals
Change-Id: I27b1eb087571e9470aa35e35e23db2e130b9f7c0
2014-08-25 13:45:47 +02:00
0fb6653fa8 experiments/cored-tester: new CoRedOS test plugin
Change-Id: I5c9785ce8d36049a585a4f6084af6938438498be
2014-08-25 13:10:56 +02:00
ac55b6c814 experiments/cored-tracing: new CoRedOS tracing plugin
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
2014-08-25 12:57:19 +02:00
bdfacbe605 plugins/checkpoint: add checkpoint plugin
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
2014-08-25 12:57:19 +02:00
0426970dff llvmdisas.: Do not put side-effect code into assert(...)
assert(...) can be optimized away, therefore side-effect code should not
be placed inside an assertion.

Change-Id: I28aee42e53cb105333094d0042a3f6e2cc5b5a30
2014-08-25 12:48:10 +02:00
268d9d4658 db-campaign: Do only load completed pilots from variant
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
2014-08-25 12:48:10 +02:00
a292e192ec weather-monitor: renamed logger object
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
2014-07-25 13:41:51 +02:00