Commit Graph

1399 Commits

Author SHA1 Message Date
2dd38dc524 Merge branch 'master' of ssh://i4gerrit.informatik.uni-erlangen.de:29418/fail 2014-04-23 14:55:40 +02:00
b500873bbb Merge branch 'ubuntu-trusty-fixes'
Conflicts:
	src/core/util/CMakeLists.txt

Change-Id: I94811612bcd31406c0e275f72058c331a99c8943
2014-04-11 15:05:32 +02:00
ffda979e29 cmake: prefer LLVM 3.4 over older versions
Change-Id: Id10afc70023c4b592806bb4276d3c63be20ff7f7
2014-04-11 14:43:13 +02:00
dad8a54e09 cmake: disable -Wunused-local-typedefs for gcc 4.8+
-Wunused-local-typedefs is included in -Wall since GCC 4.8, and generates a
flood of "typedef '...' locally defined but not used" warnings in
ac++-1.2-generated code.

Change-Id: I79748d5f049e269053b26935cc7a641caeb6dcba
2014-04-11 14:43:12 +02:00
9113d7c2fa cmake: find libiberty headers via cmake module
The libiberty headers moved from /usr/include (and a part of binutils-dev)
to /usr/include/libiberty (libiberty-dev) between Ubuntu 13.10 and 14.04,
which made a proper cmake search module necessary.  Searching still
continues working well on Debian 7.

Change-Id: I324e5ccb847e4664442d6fa7d7a027705a4f0587
2014-04-11 14:42:00 +02:00
799bdd4c64 Merge branch 'database_config_file' 2014-04-11 13:51:48 +02:00
c6344af189 Database: commandline option for alt. config file
This change adds an optional command line argument "--database-option-file",
which can be used to override the default database configuration file ~/.my.cnf

Change-Id: I5c71523e1c31dead26f3fedb0ca7354ca99892d4
2014-04-11 13:51:37 +02:00
c384894a4e Merge branch 'find_libdwarf_libelf_via_cmake'
Conflicts:
	src/core/util/CMakeLists.txt

Change-Id: I510578482e30a88981fba0774b66dfcf4812e07f
2014-04-11 13:24:23 +02:00
1d42007168 vezs-example: update experiment for new VEZS lecture
Change-Id: Ifea2169ceb83135e6e53663d077f8f574539f512
2014-04-08 15:45:43 +02:00
440cba706b Merge "Adds KESO garbage collector experiment" 2014-04-08 15:45:24 +02:00
ea4c350bcc VisualFAIL beta ;)
Change-Id: Ia40fe09cdf520926d00b9c39c983c925099501bc
2014-04-07 12:22:33 +02:00
11f77f0228 tools/import-trace: FullTraceImporter added
The FullTraceImporter imports every ip-event into the database.

Change-Id: I1c0ce2a0aae72dcd925930861780f2719d37b985
2014-04-05 16:57:13 +02:00
ba774a258c util/llvmdisassembler: fix section end symbols
Somehow, while iterating symbols in a section, it can happen that the last
symbol start address is equal to the section size, which means it is beyond
the section end.
In this case the LLVM getInstruction() method does not return a failure, but a
zero-size instruction, resulting in an infinite loop.

Now, if beyond section limits, the iteration is aborted.
Additionally, an assertion checks for disassembled zero-size instructions.

Change-Id: Id8a355475161150d3ee919cd6cf603d4ff26b228
2014-04-03 15:02:57 +02:00
940fa6035d ecos: record simulated runtime
As the eCos kernel tests do not sufficiently check for failures, a
(compared to the golden run) measurably *reduced* simulation time can be
used as an indication for SDC.

Change-Id: I303f6c3f7ef56cb691c1f226eff74d113dd16629
2014-04-03 14:45:46 +02:00
442069dd45 cmake: added missing link-time dependency cpn->util
(for synchronized queue implementations)

Change-Id: I7b32273b8e76a7b7921af117fdf3ca5af2f42553
2014-04-02 10:43:48 +02:00
7694195f1b cmake: added missing link-time dependency efw->util
Change-Id: Iea812ed881f67e452827a718a52517c7328b0729
2014-04-01 16:15:58 +02:00
da839c9765 util: find libdwarf/libelf via cmake itself
Instead of hardcoded -lelf/-ldwarf use cmake modules FindLibElf/-Dwarf
and link the found libraries accordingly. This enables the user to have those
libs in arbitrary locations and link them from there.

Change-Id: I2cea3ef648a46f11b0d49d2fe0b006f76a9d4140
2014-03-30 18:20:49 +02:00
ed46b0730a Merge branch 'master' of ssh://i4gerrit.informatik.uni-erlangen.de:29418/fail 2014-03-27 14:22:29 +01:00
5378620b63 core/sal: fix warning for 32-bit Bochs
warning: unused variable ‘regdata’

Change-Id: I2b5b0ab7d920dc060ec814494e9817f1f49496a9
2014-03-26 17:47:42 +01:00
ba60ecc4e6 core/sal: comment typos
Change-Id: I9ac66d7d1afa22dc6645433736e1c1d38a4e23fa
2014-03-26 17:47:37 +01:00
136d397a52 core/sal: identical register IDs for 32 and 64 bit
With this change, x86 special-purpose registers (e.g., EFLAGS) get the
same register ID in both 32 bit and 64 bit configurations.

Change-Id: I69db9397481414f99ca05ecb0ea9dc8ab7d989c9
2014-03-26 17:47:25 +01:00
1ad2eb5110 core/sal: fix x86 register IDs for x86_64
This bug mapped EFLAGS to the same Fail* register ID as R9 on x86_64.  This
probably has not had consequences yet, as most FailBochs users use 32-bit
code.

Change-Id: I00a680675bb9e73c2781276f3ef651162c8e4445
2014-03-26 17:27:18 +01:00
84a03b55ff import-trace: limit to general-purpose registers
This change limits fault injection to general-purpose registers, instead of
relying on the LLVM/Fail* bridge to only recognize the status register
(EFLAGS on x86) and general-purpose registers.  Since this bridge just
learned to translate x86's control and segment registers, and these
registers need special handling for fault injection (def/use pruning does
not work here), only import register accesses from the RT_GP subset.

Status register and instruction pointer injection remain functional, and
import-trace now should work architecture independently.

Change-Id: Id8ad2f0a9dab1861bf16ea9443c3bdfe7213d3fa
2014-03-26 17:18:18 +01:00
fb788ce33e Merge "util/llvmdisassembler: map registers by names" 2014-03-26 16:45:19 +01:00
48002c81f8 Merge "core/sal: add x86 control and segment registers" 2014-03-26 16:45:11 +01:00
0acfe5b2e2 TracingPlugin: cap size of memory access to 8
There are instruction in the real world, that seem to read more than 8 bytes.
Therefore we cap the accesses memory to 8 and don't abort with an assertion.

Change-Id: Ib2bfd0ac6dc0c030cd6a22940e31f8463a3337cf
2014-03-26 14:54:17 +01:00
0799e52fde util/llvmdisassembler: map registers by names
Internal LLVM register IDs can and did change between LLVM versions.
These magic integers are replaced by iterating over all LLVM registers
and mapping them to FAIL* registers by name.
As this iteration requires a LLVM object created from a binary, a static
convenience function is added to LLVMtoFailTranslator which creates a
translator given the binary filename. Building this functionality inside
libfail-llvmdisassembler prevents experiments from needing to add LLVM
includes and library definitions.

Change-Id: I27927f40d5cb6d9a22bb2caf21ca2450f6bcb0b8
2014-03-24 15:01:09 +01:00
21f5f681e0 core/sal: add x86 control and segment registers
new register type RT_CONTROL:
CR0, CR2, CR3, CR4

new register type RT_SEGMENT:
CS, DS, ES, FS, GS, SS

Reading/writing is mostly untested except for CR3...

Change-Id: I0d0fba4a1669153ab2577e82ab64a04cf2bbfb94
2014-03-24 14:32:54 +01:00
396e00ce59 cmake: static library dependencies
CMake does not support linker groups, which were used to "automatically"
fix circular dependencies between different static FAIL* libraries and
the ordering of dynamic external libraries broke linking.
CMake can however correctly invoke the linker if dependencies are decribed
correctly (even if circular). This required changing all add_dependencies
calls between libraries to target_link_libraries (which creates a link-time
dependency) and linking all experiments to fail-sal.

Change-Id: I3a0d5dddb9b3d963ef538814e20d6b3de85d4ec5
2014-03-24 11:47:46 +01:00
3cf2fa082f Merge "DatabaseCampaign: experiment completion checks" 2014-03-24 11:45:20 +01:00
858afe6e6f Merge "DatabaseCampaign: fix finished experiments SQL" 2014-03-24 11:45:10 +01:00
5567c595fb DatabaseCampaign: experiment completion checks
If the queue for outbound jobs is not unlimited, experiment rows are fetched
from the DB server continuously as experiments finish. When this takes too
long the connection to the DB server can be lost. The code did not check for
a mysql_error and assumed the result set was fetched completely, thus skipping
a potentially large amount of experiments (in our case only ~20000 of 400000+
experiments were run).

This change adds checks to determine if the result fetch loop was finished due
to an error and checks the sent pilot count to the unfinished experiment count.
Additionally, the mysql result object is correctly freed.

The underlying problem of MySQL connection loss can hopefully be prevented by
increasing timeouts in the MySQL config as described in doc/how-to-build.txt.
To prevent the problem from occurring when this is forgotten, this change
reverts the default job queue length to be unlimited (SERVER_OUT_QUEUE_SIZE=0),
at the cost of increased memory usage.

Change-Id: I09d9faddd8190c6dd5fbe733a0679a733d5837ec
2014-03-21 11:36:38 +01:00
b7ff284d54 generic-tracing: add configuration dependencies
Added hint: Use /dev/null if no state is required

Change-Id: I76a935f88e6a7a8f707970797d508dad3a961ab5
2014-03-20 10:59:45 +01:00
7b12442117 util: find libdwarf/libelf via cmake itself
Instead of hardcoded -lelf/-ldwarf use cmake modules FindLibElf/-Dwarf
and link the found libraries accordingly. This enables the user to have those
libs in arbitrary locations and link them from there.

Change-Id: I2cea3ef648a46f11b0d49d2fe0b006f76a9d4140
2014-03-19 13:56:59 +01:00
010d4a892d DatabaseCampaign: fix finished experiments SQL
The database queries to fetch all unfinished experiments were broken.
The server tried to insert all finished pilot_ids into the temporary
result_ids table and then discard all experiments which have the correct
(finished) count of IDs in this table. This cannot work as the pilot_id
is the only column of result_ids and must be a unique primary key.

As a fix, the count of results is stored as a second field in result_ids
and the result table is now joined against result_ids to check this field.

Change-Id: I6a9fb774825f0cc4ce104c6e51d7b2fe16957aec
2014-03-18 11:18:27 +01:00
dbff3ab236 jobserver: exit completely when socket ops fail
When socket(2), setsockopt(2), bind(2), listen(2), or accept(2) return an
unexpected error status, it is usually not a good idea to let the campaign
continue.  This is especially a problem as the perror(3) message gets lost
in normal campaign output and may be missed by the user.

Change-Id: I92747174e0706a613bedd8c6664cc8d888e07533
2014-03-05 16:48:37 +01:00
f775c92d72 dump-trace: keep track of read/written bytes
This change adds access-size tracking to dump-trace and output thereof in mode "-s".

Change-Id: I5647d7b16c89499b7813faaf8c3844f275bc552a
2014-03-05 11:55:11 +01:00
9df6d983bf util/llvmdisassembler: compile with -fno-rtti
For some reason, this is required even when LLVM is not built using
-fno-rtti.

Change-Id: I992799c8b54135a0a87b2de7c4a3d57f2d3670d9
2014-02-26 14:46:23 +01:00
6e03753b6e ecos: modifications for mibench benchmarks
Change-Id: Ifecbf24912dbffa814b189aed9336a5420ec6392
2014-02-25 13:32:56 +01:00
cbf9daea97 ecos: rewrite for DatabaseCampaign
+ modified resulttypes

Change-Id: I463759e66e7497c80eeee9a065fc95e058ec3dc1
2014-02-25 13:32:56 +01:00
0009a95e62 fail-env updated
Change-Id: Idf605dddc4026c9b796d0ef7174e430d9aed1236
2014-02-25 13:32:56 +01:00
5ccc6e3525 comm: ExperimentData needs a virtual destructor
Classes deriving from ExperimentData usually contain the
experiment-specific Protobuf message, which needs to be properly
destroyed.  This is particularly a problem in the generic
DatabaseCampaign, as it never downcasts ExperimentData objects
retrieved from JobServer::getDone().  As the embedded
DatabaseCampaignMessage (usually named "fsppilot") is allocated on the
heap (this happens in the campaign's cb_send_pilot() function, asking
for a mutable_fsppilot()), the lack of a virtual destructor in
ExperimentData led to a memory leak, rendering the campaign server
inoperable after handling ~1E7 messages (with a 4GiB / 32-bit process
memory limit).

Change-Id: I4cb8a26d5a702e03189c4aae340051ce62a9c9ce
2014-02-25 13:32:56 +01:00
5ee96032c9 jobserver: gracefully handle thread creation failures
Due to the previous DatabaseCampaign fix, this may not be necessary
anymore, but it's nevertheless a good idea to handle thread creation
failures properly.

Change-Id: I8317a77dd5338509727e737040944320e7755ae3
2014-02-25 13:32:56 +01:00
25a390970a DatabaseCampaign: avoid table locking
It is necessary to copy pilot IDs of existing results to a temporary table
before fetching undone jobs from the DB: Otherwise, due to MyISAMs
table-level locking, collect_result_thread() will block in INSERT (SHOW
PROCESSLIST state "Waiting for table level lock") until the (streamed)
pilot query finishes.  As one pilot query follows after the other,
collect_result_thread() may even starve until the memory for the
JobServer's "done" queue runs out, resulting in a crash and the loss of all
queued results.

Change-Id: Ib0ec5fa84db466844b1e9aa0e94142b4d336b022
2014-02-25 13:32:55 +01:00
b094753fde doc: missing libraries
Change-Id: Ife89a0b3cc74433e4fb711580c5eb3cd82467081
2014-02-25 13:32:55 +01:00
bc2103c527 sal/bochs: don't show errors in non-verbose mode
The patched eCos variant we analyze intentionally overflows the 16550
UART FIFOs, flooding the terminal with Bochs error messages.  Enabling
CONFIG_BOCHS_NON_VERBOSE now also enforces ignoring error messages,
regardless of log verbosity settings in the bochsrc.

Change-Id: If14e2532234e61bf60720a45150ef4973e8d508b
2014-02-25 13:32:55 +01:00
953fbe2156 serialoutput: cleanup
Change-Id: I255a3dd44fcf075a441461a883f564ee2d626ee1
2014-02-25 13:32:55 +01:00
455c088cd9 serialoutput: optional character limit
This prevents unlimited memory consumption in case the guest system
enters an endless loop.

Change-Id: Ia1bb178f7d8cb8ad8bf958210d90f6d7c2e11359
2014-02-25 13:32:55 +01:00
c319f3458c serialoutput: consistent plugin class naming
Change-Id: I8abe0cfdebecb0adc7229e29bd241da65b27105a
2014-02-25 13:32:55 +01:00
36ae6fd6c3 prune-trace: use none/none only without any parameters
Before this change, running prune-trace with, e.g.
"prune-trace -d fsp_mibench -v bitmap% --benchmark-exclude clockcnv"
resulted in an implied "--benchmark none", rendering --benchmark-exclude
ineffective and resulting in nothing being pruned.  Now, the "none" default
only applies when neither --benchmark nor --benchmark-exclude (analogously
for --variant / --variant-exclude) is provided.

Change-Id: Ic7c88919d7cfde1261749a745dc6a679472ff348
2014-02-25 13:32:55 +01:00