Commit Graph

901 Commits

Author SHA1 Message Date
c6e298ac6f Helper script for FailBochs pruning build env
Call this script from a build directory to setup
a build environment for FailBochs pruning.

Usage:
 <path to fail>/configurations/x86_pruning.sh <Experiment name>

Change-Id: I778a20c258dcd5349c3da9e1c5a8542af43f61d5
2013-09-19 13:16:27 +02:00
ee6ffef828 Merge "experiments: new cored-voter experiment" 2013-09-18 16:07:14 +02:00
aec5798f32 remove accidental checkin
Change-Id: I3cc42e153070b78bcea7df08ef2eddd1c838776c
2013-09-12 20:31:26 +02:00
014684ae1c L4Sys: check Bochs AS ID for mem accesses, too
Change-Id: Ifa2b38dc0e762ff4f956dc0b98c78b43f0d139cb
2013-09-12 20:29:08 +02:00
6274ddb15f Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-12 18:20:29 +02:00
ff19bec52d L4Sys: some bug fixes
* Fowler's Law of Refactoring: Have test cases available.
* BjoernD's Corollary to Fowler's Law: Use these tests!

Change-Id: I3d3e48ffe08209891c6204655323cd26a0eaaebd
2013-09-12 18:19:04 +02:00
b84d4d4c0e Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-12 10:14:59 +02:00
00f920f487 merge conflict resolved
... I somehow missed that one, sorry.

Change-Id: I2daf6f9215f34e39090145ff70e70eaf84d0f286
2013-09-12 09:52:34 +02:00
37eda90971 L4Sys campaign: GPRFLIP and MEM injections
Change-Id: I0c4a6bf6b80d6620c035595c11663121f504f4d5
2013-09-11 18:02:03 +02:00
b7d03f64d4 docs
Change-Id: Ic46dfc6c59c7bee796c2e3e8e97376859391b342
2013-09-11 18:02:03 +02:00
560860cb99 L4Sys: consult instruction list for breakpoints
Change-Id: Ic8163cc84bad9b0074a9d6489127d0ef09eb3c21
2013-09-11 18:02:03 +02:00
1a09d30127 L4Sys: prepare script supports mem/reg experiments
Change-Id: Ibcbc9e99b063d4b019b4d68401c77fc964253da8
2013-09-11 18:02:03 +02:00
8caa63397a L4Sys: refactoring
* more more stuff into functions
* try to have generic experiment code only once

Change-Id: I4f037bd972243665a10941fcc3607f015b0bb1f9
2013-09-11 18:02:02 +02:00
0b2ab41c2f first working mem experiment
Change-Id: I928ee0c38f12f6dfe3f661ee60cccad11f35ad6a
2013-09-11 18:02:02 +02:00
20a9904032 start memory experiment
Change-Id: Ice7921a02f899c7381d15ead10b27e21df7019fb
2013-09-11 18:02:02 +02:00
32efc604e7 use MEM FI type
Change-Id: If149c4fdeaaf6fef96a99d6fe2a424d8ad0f2916
2013-09-11 18:02:02 +02:00
ec969603d5 Merge commit 'dcd2c021a5ac91d38187d397914e5f51e2fc8819'
Conflicts:
	tools/import-trace/RegisterImporter.cc

Change-Id: I4f49c976bd60badba73c15746aa03c420cb9f77b
2013-09-11 14:38:55 +02:00
844e15293d experiments: new cored-voter experiment
The experiment does support
- 1 bit faults in registers/memory/IP
- 2 bit faults in registers (all)
- n bit faults monte-carlo in registers

Change-Id: Ifdd7df6ec4bc88cfc75391b5e19e0d648fd0d087
2013-09-11 13:47:47 +02:00
04e96b977c tools/import-trace: add --do-not-split option to RegisterImporter
The RegisterImporter splits each register into 1 byte chunks. The
--do-not-split flag prohibits this splitting. Be aware, that def/use
pruning won't work correctly in mixed-width cases (EAX/AX/AH/AL).

Change-Id: Ifa1930bdd9f317a6fd3ae50c4ff3cffc97504640
2013-09-11 10:30:01 +02:00
d26fc28fa4 cpn/database: include data_width in the fsppilot during prune step
During the prune step the data_width of the injected location was not
propagated before. It is now stored in fsppilot (database layout change!) and
sent in the fsppilot protobuf message.

Change-Id: I0562f6fc8957adea0f8a9fb63469ca5e3f4b7b2d
2013-09-11 10:27:04 +02:00
dcd2c021a5 util: global lock for certain MySQL operations
Even the reentrant libmysqlclient_r has some non-threadsafe operations,
which need to be protected by a global mutex.
<http://dev.mysql.com/doc/refman/5.5/en/c-api-threaded-clients.html>

Change-Id: I444e42f82cf982a6c8f8f2596e8991d0a5009b28
2013-09-10 18:35:44 +02:00
9bbaeb9251 doc: misc updates
Among other updates, adding details on MySQL/MariaDB setup and usage.

Change-Id: Ic9f3b2779531ee031270dabd4706153c102b3265
2013-09-10 17:43:32 +02:00
f106702d44 prune-trace: remove pilot_id from fspgroup PK
There's one fspgroup entry for every trace entry, the pilot_id is
therefore *not* part of the (unique) primary key.  If this had been
right in the first place, it would have revealed an equivalence-based
fault-space pruning bug early ... :-/

Change-Id: I449d4985645c6631c0a8db0c64510364677b1354
2013-09-10 17:43:32 +02:00
d961ac0a72 import-trace: add --no-write-ecs switch
If you only need raw failure counts, no-effect write equivalence classes
are redundant and only slow down access to the trace and fspgroup tables.
This switch prevents any accesstype='W' entries from finding their way into
the trace table.

Change-Id: Ifb415994063a2107769bc80ebd2fd780de5a4dda
2013-09-10 17:43:12 +02:00
d39a9278ff import-trace: split into public and protected iface
Change-Id: I4b7d15f9181b1485d0546a77bd8d4f400b2fa880
2013-09-10 17:37:26 +02:00
64b3af299e import-trace: sliding-window AdvancedMemoryImporter
Initially this was implemented by directly passing through trace
events to the MemoryImporter, keeping a record of conditional jumps
and opcodes, and UPDATEing all inserted rows in a second pass when the
MemoryImporter is finished.

Unfortunately, UPDATE is very slow, and keeping all information in
memory till the end doesn't scale indefinitely.  Therefore the
implementation now delays passing memory access events upwards to the
MemoryImporter only until enough branch history is aggregated, and
taps into Importer's database operations with a set of new virtual
functions that are called downwards.

Change-Id: I159b2533932087087fb3049f4ff07a5f17a25a00
2013-09-10 17:37:26 +02:00
ba7c663551 import-trace: introduce AdvancedMemoryImporter
A MemoryImporter that additionally imports Relyzer-style conditional
branch history, instruction opcodes, and a virtual
duration=time2-time1+1 column (MariaDB 5.2+ only) for fault-space
pruning purposes.

Change-Id: I6764a26fa8aae21655be44134b88fdee85e67ff6
2013-09-10 17:37:26 +02:00
12b539ff75 misc cleanups
This change touches several subsystems, tools and experiments
(sal, util, cmake, import-trace, generic-tracing, nanojpeg), and
changes details not worth separate commits.

Change-Id: Icd1d664d1be5cfc2212dbf77801c271183214d08
2013-09-10 17:37:25 +02:00
25d88bf93a import-trace: import extended traces
This tool can now import extended trace information with the
--extended-trace command-line parameter.  The existing importers cease
using artificial access_info_t objects in favor of passing through the
original Trace_Event wherever possible.  This allows us to import
extended trace information for all importers.

Change-Id: I3613e9d05d5e69ad49e96f4dc5ba0b1c4ef95a11
2013-09-10 17:37:25 +02:00
60bf0bae69 L4Sys: uhoh -> build fix
Change-Id: I9b3f9bdc961d03e49965230f9a5222d4103c94c5
2013-09-10 11:58:23 +02:00
bbe97f2d1b Merge branch 'master' of ssh://vamos.informatik.uni-erlangen.de:29418/fail 2013-09-10 11:54:29 +02:00
0c0f19fbcb L4Sys: also trace memory accesses
Change-Id: I20d8fea1f0f6cfee42804296515e50fdabf12f81
2013-09-10 11:54:05 +02:00
96f2f56d5e Merge branch 'register-mapping-fixes' 2013-09-10 11:46:58 +02:00
11513ef78d util: handle missing register mapping gracefully
It's OK if we cannot map every register LLVM knows to a Fail register
ID, but we need to explicitly skip these cases in the
RegisterImporter.

Change-Id: I2152f819fb94aa4de5720c5798b229b66988d382
2013-09-09 16:14:35 +02:00
9cd40842d2 introduce convert-trace tool
The input (taken on stdin) is a gem5.opt --debug-flags=MemoryAccess
trace (--format gem5), or a dump-trace output (--format dump) for easy
trace synthesis (for testing purposes).

gem5 format: Currently imports physical, not virtual memory addresses.
dump format: Currently ignores extended trace information.

Change-Id: Ic26a996d6fb9ce4175c855fadcbcff9ac9263888
2013-09-08 22:16:08 +02:00
e4a5a7a592 util: gzstream needs zlib
This change is needed to build on Ubuntu 13.04.

Change-Id: I683ed4427044264f58bc8f7c94cb5fbbff89cd95
2013-09-08 22:15:14 +02:00
f33789b1ac Merge branch 'find-mysql' 2013-09-04 13:09:48 +02:00
6d4dfeb913 shutdown cleanups revisited
This change became necessary as we observed weird fail-client SIGSEGV
crashes with both Bochs and Gem5 backends and different experiments.

Some Fail* components are instantiated statically: the
SimulatorController instance "simulator", containing the
ListenerManager and the CoroutineManager, and the active
ExperimentFlow subclass(es)
(experiments/instantiate-experiment*.ah.in).  The experiment(s) is
registered as an active flow in the CoroutineManager at startup.

As plugins (which are ExperimentFlows themselves) are often created on
an experiment's stack, ExperimentFlows deregister themselves on
destruction (e.g., when leaving the plugin variable's scope).  The
core problem is, that the creation and destruction order of statically
instantiated objects depends on the link order; if the experiment is
destroyed after the CoroutineManager, its automatic self-deregistering
feature talks to the smoking ruins of the latter.

This change removes all static instantiations of ExperimentFlow and
replaces them with constructions on the heap.  Additionally it makes
sure that the CoroutineManager recognizes that a shutdown is in
progress, and refrains from touching potentially already destroyed
data structures when a (mistakenly globally instantiated)
ExperimentFlow deregisters in this case.

Change-Id: I8a7d42fb141222cd2cce6040ab1a01f9de61be24
2013-09-04 10:13:48 +02:00
203ec6c5cc remove #ifndef __puma from code using LLVM
Contemporary AspectC++ versions can deal with the LLVM headers very
well, and #ifdef __puma stuff in Fail* headers results in
unmaintainable #ifdef __puma blocks in other parts of Fail* (e.g., the
trace importer).

Make sure you're using a 64-bit ac++ when living in a 64-bit userland
(the 32-bit version doesn't know about __int128), and be aware that
AspectC++ r325 introduced a regression that has not been fixed yet.

Change-Id: I5bb759b08995a74b020d44a2b40e9d7a6e18111c
2013-09-04 10:13:48 +02:00
97c0b6b4ae Merge branch 'gem5-register-fix' 2013-09-02 15:10:52 +02:00
89aff7df65 util: Bochs/Fail register mapping fix
CL and DL are 8 bits wide, not 255.

Change-Id: Ic454215344d08ba2f8374db251792f82d106305b
2013-09-02 12:07:27 +02:00
3cf89631a7 Merge "cmake: allow build outside project root" 2013-09-02 11:55:34 +02:00
2108c8932f util: disassembler register/address mapping fix
For def/use pruning, the linear address mapping of the x86
sub-registers (e.g., AX represents the lower 16 bits of EAX) must
overlap.  If it doesn't, e.g., AX and EAX are considered separate
registers by def/use pruning, resulting in a failure to correlate an
EAX def with a subsequent AX use.

The only user of this mapping up to now, RegisterImporter, forced all
register widths to 8 bits, thereby fortunately canceling out this
problem.  Nevertheless it makes no sense to continue encoding a
constant width in these virtual addresses.

Existing trace, fspgroup, fsppilot and result tables may be converted
to the new encoding by using this query:

UPDATE <tablename> SET data_address = ((data_address >> 4) & ~0xf) | data_address & 0xf;

Change-Id: I7a942b78c34f6140803a86af639eeedef3550f34
2013-09-02 09:50:55 +02:00
1ca9cb4a52 L4Sys: adapt to DatabaseCampaign
Change-Id: Ia4912e7a74afccb51f6d704830a2d9c5b5c0159a
2013-08-30 16:06:15 +02:00
045c08faf6 l4sys script: remove dbg option
Change-Id: Ica13735ba04b7ae79fde6fb1462ca8200694b278
2013-08-30 16:05:21 +02:00
0e595b38a3 gem5: adapt to Register iface change
This change adapts the gem5 backend to the Register class interface change
in commit 52723a8.  The necessary modifications suggested adding the "misc"
registers from gem5, too.

Change-Id: I32561c3fc905b9cd396e32ce80c791c01d5682fb
2013-08-29 19:35:33 +02:00
1ad99c9630 cmake: find MySQL client lib
This change introduces a CMake-style FindMySQL.cmake properly looking for
libmysqlclient_r with mysql_config.  This also fixes linking on some
machines.

Change-Id: Ifdbfdc3c7440dead37a8b63aaa86732d636aa0e2
2013-08-29 19:21:31 +02:00
2a06b97480 Adjust instruction tracing
write a trace file that can be input to the *-trace FAIL tools

Change-Id: Iaa13fab5bcba86f3d940831d9ea583a458998191
2013-08-28 10:16:13 +02:00
6ddc7d911b the do-them-all campaign
Change-Id: I9c1617c4a057db63e2f2c6470b55d9629bd01ca2
2013-08-28 10:15:39 +02:00
674af5fd00 Separate boundaries for output tracing and injection
* L4SYS_FUNC_{ENTRY,EXIT} now determines the range upon
  which an experiment is run. These instructions produce the
  output that is relevant for the experiment.

* L4SYS_FILTER_{ENTRY,EXIT} determine a subset of the
  above instructions. FI experiments are performed on this
  subset (between first occurrence of FILTER_ENTRY and first
  occurrence of FILTER_EXIT inclusively).

Change-Id: I37d2189d8256b6b707a0a33984f2b2656071d983
2013-08-27 20:34:57 +02:00