Commit Graph

403 Commits

Author SHA1 Message Date
5929eac85c SimulatorController: Selection between multiple experiments
If the user enabled multiple experiments, it does not make sense to
execute them concurrently. Therefore, we now only register all enabled
experiments and choose one experiment on fail-client startup. For this
selection, the user can either set the FAIL_EXPERIMENT environment
variable or invoke the tool with a specific argv[0]. For the
bin/-folder, we create symlinks for this mechanism.

With this change, the generic-tracing and generic-experiment can be
compiled into the same executable and we could distribute a "standard"
version of FAIL*.
2020-12-16 15:38:29 +01:00
2ecdba92a5 [generic-experiment] allow passing state directory via environment 2020-12-16 15:38:29 +01:00
f3d5b20327 Some config for bochs and generic-experiment 2019-10-28 18:10:12 +01:00
c34917ca80 Debian 10: MySQL/MariaDB related fixes
Change-Id: I538caf6dedaa785061194a87c7e4965df3839088
2019-10-21 17:14:51 +02:00
d11579db30 GenericTracing/-Experiment: fix missing dependency
Change-Id: Iec285afbd3315b3fb124e97a9ce0fb10b60e6f52
2018-08-09 10:59:27 +02:00
453a6efe0b GenericExperiment: command-line --help overhaul
Change-Id: I8eff38043efcbeef0026c7a26dd6cc14fa6af673
2018-08-01 14:32:58 +02:00
a256e1c5af GenericExperiment: optionally continue if symbol not found
When prefixing a symbol name with '?', the GenericExperiment does not abort
in case the symbol is not found in the provided ELF binary:

fail-client -Wf,--detected-marker=?eddiErrorHandler
[...]
[GenericExperiment] ELF Symbol not found, ignoring: eddiErrorHandler

Change-Id: Iec12416ce8e38ff0ee1704e3a725c2cadc97b756
2018-08-01 14:19:05 +02:00
ad0640cedd GenericExperiment: fix output formatting
Change-Id: I42c49fbeb15cdebd3f77124554efb8c1f40f429f
2018-07-31 12:33:48 +02:00
d581fd27a2 GenericTracing: typo
Change-Id: I02b39a7ad0db49899dd602c1da472b76472da979
2018-07-30 14:20:48 +02:00
d370ded9b9 generic-experiment: generalize serial-output monitoring
The generic-experiment now learned to record and compare output on an
arbitrary serial port.  Using Bochs' port 0xe9 hack (parameter
--e9-file) is kept for compatibility reasons.

Change-Id: I5b1aa02d244e8b474919e1bdf043e523ea0e4f45
2018-07-27 21:12:41 +02:00
3d292cb217 generic-tracing: add error handling
Instead of using assert() (which only does something in a Debug
build), explicitly fail when a user-specified symbol is not found.

Change-Id: I33ac59ca4483ee65ba70c264b5153a7766a919d2
2018-07-24 09:21:09 +02:00
9272c5cbed Move JobClient to Boost::asio as well
I did this mainly so server and client use a common networking API
IMO, using Boost::asio results in nicer name-lookup code.
Since no longer needed, I removed the SocketComm stuff.
The client is still synchronous; I see no benefit in having it
asynchronous.

I'm not super happy with the random backoff by the clients, if they
can't connect to the server. It makes the code really messy, 3 retries
is totally arbitrary, as is the backup windows. I believe launching
the server and clients in the correct order should be handled by a
launch script
Change-Id: Ifea64919fc228aa530c90449686f51bf63eb70e7
2018-05-09 17:41:52 +02:00
3ad42e270c fixes for Debian 9
- search for libdwarf.h in new locations (e.g., /usr/include/libdwarf/)
- build Bochs with -std=gnu++98 (gnu++14 is default since GCC 6.1)
- specify "proto2" syntax for protobuf messages
- minor build-system and C++ namespace fixes

Change-Id: I16dbc622c797ef8e936fe3c0fb9b03029d27529d
2017-08-01 14:12:03 +02:00
3c6502a111 ecos_kernel_test: check if addr_errors_corrected is mapped before access
Change-Id: I08e751feeffc41a51312b8a9ad4b28a57a45a487
2016-09-09 11:26:07 +02:00
85844b86cc ecos_kernel_test: compare serial output for coptermock benchmark
Change-Id: Ic4f13035d55c811bda7fa020114141b816a11ed8
2016-08-29 10:50:35 +01:00
436930de71 rampage: fix integer overflow
Change-Id: I18ee65335efd0207c27da9524d74be5d5a575329
2016-08-01 16:39:42 +02:00
2aeded20be rampage: link correctly with Bochs
Change-Id: I7a0231c6b6e8983f86b94c2bfde78d2524dbfc8d
2016-08-01 16:36:17 +02:00
d3d2faf680 globally rename Fail* to FAIL*
Change-Id: Ief2cb687cc69dd92c2e04f9314f0f1347e0a84ed
2016-07-26 17:41:32 +02:00
39b120f7ca GenericExperiment: record output during complete runtime
Before this change, the GenericExperiment only recorded port 0xe9 output
*after* the fault was injected.  When a fault was injected during the
workload's output loop, the output data before that point in time was
missing, and the experiment outcome was wrongly classified as SDC.

This change moves the logging activation to before the fast-forwarding
step (DatabaseExperiment::cb_before_fast_forward).  It also makes sure the
DatabaseExperiment only clears its own listeners instead of also touching
the SerialOutputLogger's one.

Change-Id: I66bda4ee318d271ddda6f7ade4e817bf9d14cf46
2016-03-11 20:59:01 +01:00
5bd7c4a9c5 GenericExperiment: limit output logger buffer
Limit the serial-output logger buffer to prevent overly large memory
consumption in case the target system ends up, e.g., in an endless loop.
The buffer is limited to (golden-run output size)+1 to be able to detect
the case when the target system makes a correct output but faultily adds
extra characters afterwards.

Change-Id: I50c082f8fb09a702d87ab83732ca3e3463c46597
2016-03-11 20:59:01 +01:00
e08deef9d5 GenericExperiment: prevent integer overflow
This change prevents an integer overflow in the memory-access listener
for WRITE_OUTERSPACE.  Instead of matching all addresses above
maxima_data, l_mem_outerspace never matched in the
generic-experiment's "--catch-write-outerspace" mode.

Change-Id: I8f4ee4515af3998b7c2a8e83c7a18306c26d8d66
2016-03-11 20:45:50 +01:00
cae6860e4e generic-tracing typo
Change-Id: Ie642487f3c30ec2b99d0d4ee469acb6a987e17c3
2016-03-11 19:01:30 +01:00
d46b81eb3d GenericTracing/-Experiment: add SDC detection
This change adds detection of SDCs to GenericTracing and
GenericExperiment via Bochs's I/O port E9.

Change-Id: Ie036aa97468b45cad94b6c8f73d1ef2d227547b2
2016-03-11 19:01:17 +01:00
bcf75bceee GenericExperiment: target ELF file now specifiable
Up until now only generic-tracing had the feature to directly
pass an ELF file to the experiment. generic-experiment lacked
that functionality and resorted to using the $FAIL_ELF_PATH
environment variable.
This change introduces the "--elf-file" command line argument
to generic-experiment.

Change-Id: Ie74de9e1781275ab247786856e13e412bac39224
2016-03-10 15:15:27 +01:00
bfcb1b415b experiments: experiment for tracing and testing ERIKA
ERIKA Enterprise is a OSEK conforming embedded RTOS. The supplied tracer
and experiment are similar to the cored-{tracing,tester} experiment, but
checks the integrity of the RTOS application in a different
manner. Stacks and stackpointers are located differently in ERIKA. This
experiment was used in RTAS'15 Hoffmann et al.

Change-Id: Idc8d874eb4d4ef15837f903270cfa521bc9514a2
2015-09-18 12:51:57 +02:00
1e572faa04 dosek: merge trace and test experiment
With the instantiate-indirect.ah method, we can choose between different
experiment flows at runtime. By this, we can combine tracing and actual
injection into one fail-client binary. A -Wf,--mode={tester,tracer}
switch does hand the control to different experiment flows.

Change-Id: Ia268489ff6bc74dffea745b7aedcb36e262e8079
2015-09-18 12:51:57 +02:00
f73008f60a cored-tester: adapt the cored tester experiment
For redoing the bench-coptermock-isorc experiment, we have to change the
timeout settings. We now use a soft timeout setting. A soft timeout is
resetted after each checkpoint event. If a hard timeout (2 seconds) is
reached although the soft timeout was resetted, we also abort the injection.

Change-Id: Ib7c2b1ad201641f47434a11d3273dde797e0012e
2015-09-18 12:51:56 +02:00
65e4409c90 generic-tracing: add --restore command-line option
This options performs a restore to the saved state of the machine immediately
after saving (default: off). This option is needed when the state is used by
other experiments that depend on the trace, which slighty differs without a
restore.

Change-Id: I4fdf4c5e03779bb9c6e0a0fa335ceae3e20608a5
2015-09-03 13:44:04 +02:00
c4437e1bd3 Merge "generic-tracing: add --serial-port and --serial-file command-line options" 2015-08-07 13:04:01 +02:00
c2b8566e35 generic-tracing: add --serial-port and --serial-file command-line options
The generic-tracing experiment now supports logging of I/O port access to file.
Therefore, the serialoutput plugin needs to be included in the experiment
configuration. Without the --serial-file option specified, logging is disabled.

Change-Id: I9e60d8ffd598ee04a50b4d92fc283f75382d478a
2015-08-07 11:43:01 +02:00
d2f99b909f Merge changes I7de68835,I27d83526
* changes:
  GenericExperiment: Fix definition of "detected-marker"
  Gitignore: ignore vim swap files
2015-08-05 09:42:24 +02:00
246938d4a6 l4-sys: Enable FI in all config cases
Fix the problem that injection was never enabled if func_entry == filter_entry.

Change-Id: Ifec64b6d1351e0857e568ca132cfed891f85aa62
2015-07-29 19:09:32 +02:00
257a3fb542 ecos_kernel_test: fix using wrong filename for serial output
Change-Id: I59ed61e2e4ee7ffe1a29390dd6ff0264406c3e7b
2015-06-19 17:27:21 +02:00
610e5d798d fiascoFail: grand overhaul of this experiment
* Removed all command-line options.
* Read all required information from *-traceinfo.txt file or kernel elf file.
* Record error_corrected (but only in the 'OK' case).
* Add support for multiple variants (similar to the ecos experiment).

Change-Id: I933e52881fc6bee0750d8aaef813fe2539166b06
2015-06-19 17:11:31 +02:00
ce41b30fb1 GenericExperiment: Fix definition of "detected-marker"
Due to a bug (most likely a copy and paste issue), the detected-marker
group was defined to point to the "FAIL_marker"-set, which would be
redundant. This commit will correctly map it to the "DETECTED_marker"
group.

Change-Id: I7de688357006ced1adf2423e213ae6633629cb81
2015-04-20 23:33:17 +02:00
f24f9f2107 cored-tester: add color_assert listener only if existsing
The color_assert_port symbol does not exist in all dOSEK variant,
therefore we add the listener only if the symbol exists. Otherwise the
invalid handler will trigger on INV_ADDR

Change-Id: I7b81940a8413850527efb9e4bae86248794c622c
2015-04-17 09:22:37 +02:00
193e5b757e adapt experiments to new restore() behavior
This change adapts several experiments, including the
DatabaseExperiment framework, to the restore() behavior update from
the previous change.  Existing traces should continue to be usable.

This is not tested yet, mainly because I don't have access to most of
the experiment targets / guest systems necessary for testing.  Please
test your own experiments if possible, or at least leave me a note
that you couldn't test it!

Especially the cored-voter/experiment.cc update may be broken, but
maybe the "FISHY" +2 in there was not OK in the first place.

Change-Id: I0c5daeabc8fe6ce0c3ce3e7e13d02195f41340ad
2015-03-18 18:22:21 +01:00
975d4de90d ecos: detect potential ftell failure
ftell() potentially fails and returns -1.  Found by Coverity Scan,
CID 25546.

Change-Id: Ifcf6fa8593cb1f3f54dbbff27ac021d46468a40c
2015-02-07 17:29:46 +01:00
a3a77141f3 ezs-logger: Added missing dependency
There was a missing depenency to fail-util.

Change-Id: I32ea7f184affa6f95ea28d7254699872fd501a22
2014-12-16 16:36:37 +01: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
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
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
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
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
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
daedb5a4d6 weather-monitor: now uses elfreader
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
2014-07-25 13:41:51 +02:00
a71a99e980 regression-test: added missing link-time dependencies
This change adds missing compile- and link-time dependencies/libraries.
Namely: fail-comm, -util, -tracing, -serialoutput & Google Protobuf.

Change-Id: I7947cafe1354ed5b4e40610683050a3f015769b2
2014-07-04 14:44:31 +02:00
a198eda8c8 Merge branch 'tobias' Apply Code cleanup and restructuring with new config file to main branch. 2014-06-30 15:01:45 +02:00