Compare commits

..

159 Commits

Author SHA1 Message Date
e0624a10f7 show experiment info when dropping databases in menu 2026-05-07 21:39:34 +02:00
3ebc07bfc8 don't save client logs 2026-05-06 20:36:10 +02:00
278eb8c980 log experiment stages to separate files 2026-05-06 20:30:41 +02:00
0223a49099 don't move runner log 2026-05-06 20:08:39 +02:00
f4b8c16adb update fail binaries again again 2026-05-06 19:52:25 +02:00
a46adf528d remove fail binaries 2026-05-06 19:39:47 +02:00
38bec04ad8 separate client/server logs + move logs to experiment dir 2026-05-04 13:32:34 +02:00
8a97bb738b update fail binaries again - set static port (--server-port doesn't work) 2026-05-04 13:31:18 +02:00
61c31e51bd add updated fail binaries 2026-05-04 11:38:05 +02:00
2b46a7d544 remove fail binaries 2026-05-04 11:35:42 +02:00
8a6ea086d6 add --server-port option to generic-experiment-client 2026-04-29 21:02:10 +02:00
e115cf05ce update FAIL database queries for new version 2026-04-29 20:16:24 +02:00
28da996299 move old FAIL binaries so nix doesn't autopatchelf them 2026-04-29 20:10:02 +02:00
2e5128db6a update FAIL version to current 2026-04-29 19:58:18 +02:00
d805b787ac choose experiments instead of builds for radare/objdump/wasm-objdump actions 2026-04-28 00:53:46 +02:00
32cb0460c3 add binaryninja action to menu 2026-04-28 00:40:31 +02:00
9839d3152c add radare/objdump/wasm-objdump actions to menu 2026-04-28 00:17:51 +02:00
2d20dfe665 reenable --catch-outerspace and --catch-write-textsegment 2026-04-27 19:09:19 +02:00
59d3c7f824 disable --catch-outerspace and --catch-write-textsegment 2026-04-27 18:49:51 +02:00
aabbd1311d disable --catch-write-textsegment 2026-04-27 15:57:17 +02:00
d1eee623fa disable --catch-outerspace 2026-04-27 15:49:18 +02:00
402ba643dc add sankey chart 2026-04-24 15:27:41 +02:00
9dd04e905c add matrix multiplication test program 2026-04-24 15:27:20 +02:00
5487d44394 enable --full-trace and --check-bounds 2026-04-24 15:27:11 +02:00
f2f8d7f89f import native symbols in lib.h
lib.h gets included into the host module and the wasm module. For the
host module the attributes will be ignored.
2026-04-24 10:45:55 +02:00
285dbc77d3 add lazysql menu action 2026-04-24 00:25:06 +02:00
38183cae74 add tableplus to shell environment 2026-04-24 00:03:25 +02:00
b5d9d1ec78 read entire marker notes file instead of first line 2026-04-23 22:44:50 +02:00
1a4d4b64bf allow annotating markers in explorer 2026-04-23 21:53:07 +02:00
b00c63ae42 display corresponding section for markers in explorer 2026-04-23 18:42:31 +02:00
0007193a4f store additional files with builds (flake/startup/linkerscript/...) 2026-04-23 17:56:46 +02:00
4dcb71ff00 scatterplot: addresses in hex 2026-04-23 17:55:57 +02:00
fd65e8b791 update fail-db.png 2026-04-22 23:59:53 +02:00
c05164bf0d fix fail trace sources import 2026-04-22 21:53:52 +02:00
7992744ae4 run FullTraceImporter when importing trace + import --sources 2026-04-22 21:45:44 +02:00
54574e0a88 add visualfail 2026-04-22 21:45:18 +02:00
171fe1703e remove obsolete startup.s modifications 2026-04-22 15:41:15 +02:00
1681f27afc add result comparison menu action 2026-04-22 15:40:57 +02:00
ca6338b351 abort assembly/source loading if no marker is selected in explorer 2026-04-22 10:22:57 +02:00
e444ab34df exclude existing experiments when archiving 2026-04-21 23:21:14 +02:00
6b5bf117e4 cleanup old injections/projects 2026-04-21 22:37:18 +02:00
64d6971d4d decrease loop iterations in sum sample 2026-04-21 22:35:33 +02:00
263bb454f1 link mmap_space + aot array into .text 2026-04-21 22:34:36 +02:00
f4bc1b669a add obsidian experiment note creation menu action 2026-04-21 22:32:17 +02:00
0a093c807f add resultbrowser menu action 2026-04-21 18:39:47 +02:00
921b18cc7a add ssh keepalive to perl ssh connection 2026-04-21 18:39:27 +02:00
e09e3a0f9d undo last change 2026-04-21 16:34:10 +02:00
63604d39c8 don't redirect fail client output to /dev/null 2026-04-21 16:21:29 +02:00
19ed8dd5a2 add ACCESS_OUTERSPACE markertype to explorer filters 2026-04-21 16:18:27 +02:00
624f4fb4b3 fix database creation in deploy.pl 2026-04-21 14:48:47 +02:00
19c9559cc0 don't link mmap region into .text but aot array itself 2026-04-21 14:46:31 +02:00
ec13adc778 replace : with - on experiment archival 2026-04-21 14:11:57 +02:00
5c826a80f2 add abandoned ghidra path remapping script 2026-04-21 14:11:24 +02:00
3cb7349e81 color points based on resulttype in scatterplot 2026-04-21 14:10:37 +02:00
f9354690dd remove faulty injections 2026-04-21 14:07:58 +02:00
840847a7a2 remove faulty ghidra projects 2026-04-21 14:07:18 +02:00
b836517168 filter markers by default in explorer 2026-04-21 12:21:15 +02:00
8f8a3909d1 only deploy "fail" targets, only gdb "linux" targets, only import new results into ghidra 2026-04-21 01:06:57 +02:00
e7d9635af7 update wasm aot recipe for linux (only use --xip for fail/baremetal) 2026-04-21 00:39:00 +02:00
d4090125ef add run in gdb menu action 2026-04-20 23:52:06 +02:00
10b10f1e68 ignore db.conf 2026-04-20 21:06:14 +02:00
e298f2edd0 add barebones results bar chart 2026-04-20 21:01:07 +02:00
3d1fe06f1a add result explorer 2026-04-20 20:59:36 +02:00
5306fdca4b update flake to use direnv 2026-04-20 11:41:08 +02:00
5643b8bf84 update ghidra projects 2026-04-20 00:21:29 +02:00
950e0ea810 update injections 2026-04-20 00:21:18 +02:00
66fd5b6e8a update ghidra marker import script (headless, import all types from all benchs) 2026-04-20 00:17:46 +02:00
5425f6e620 add curses entry point for scripts (archival, ghidra import, plots, queries, cleanup) 2026-04-20 00:16:27 +02:00
ac5189d81f add query for detected markers 2026-04-19 13:21:56 +02:00
c332ea6b1a add queries for other fault types 2026-04-19 13:19:55 +02:00
36bda84d78 move update_db_config to util 2026-04-19 13:05:32 +02:00
0bb554bb9d run all available queries automatically 2026-04-19 12:55:33 +02:00
fb992064ed fix query typos 2026-04-19 12:46:36 +02:00
ed5e4fac19 use qualified names for module functions 2026-04-19 12:45:46 +02:00
ba84d063e7 add current script path to @INC 2026-04-19 12:42:52 +02:00
ea3a3002be add objdump just recipe 2026-04-19 12:39:14 +02:00
8cb266381d move queries to modules 2026-04-19 12:39:00 +02:00
bbc0521963 move some functions to Util module 2026-04-19 12:38:47 +02:00
d74222ccec update targets 2026-04-18 19:46:45 +02:00
d71e0d40ce pass substitution as function 2026-04-18 18:03:05 +02:00
048b05942d substitute tabs with , for csv output 2026-04-18 17:49:04 +02:00
0c19405966 fix injection error handling 2026-04-18 17:42:14 +02:00
8d1b2c459c wait for fail server port 2026-04-18 12:10:01 +02:00
cece3bc3c7 add fork logs to inject 2026-04-18 11:52:52 +02:00
aa3c641426 send injection results as ntfy attachements 2026-04-18 11:50:06 +02:00
661ea869c5 invoke runner without screen + add log file 2026-04-18 11:36:47 +02:00
ae9b064146 run with all available cpus 2026-04-18 11:36:36 +02:00
d5648b1d85 loop dropdb + support multiple selection 2026-04-18 11:36:12 +02:00
a3c9726540 fix runner external commands 2026-04-18 10:27:08 +02:00
e29944d76c update sub import/inject 2026-04-17 22:45:10 +02:00
f0b18a5285 update sub trace 2026-04-17 22:39:38 +02:00
8465439b24 fix print to filehandle bug 2026-04-17 22:33:56 +02:00
6d3a482469 add success check to file writing 2026-04-17 22:27:36 +02:00
72bf924583 add newline to db.conf updater 2026-04-17 22:21:48 +02:00
086393ef81 fix duplicated filehandle bug 2026-04-17 22:18:02 +02:00
14ce025824 fix screen old session termination bug + db.conf rewriting bug 2026-04-17 22:13:31 +02:00
76c3e552af add wip buildscripts for automated experiment execution 2026-04-17 21:58:29 +02:00
ea4b431713 update injections + projects (aot readonly test) 2026-04-17 15:17:53 +02:00
33e5a4c57c move justfiles to scripts/ 2026-04-17 15:17:30 +02:00
b3fac78b8c disable --catch-write-textsegment after moving mmap memory region into .text 2026-04-17 00:59:04 +02:00
42abfa0488 move wamr mmap memory region into .text segment for wamr aot mode 2026-04-17 00:25:22 +02:00
cae1aead0e enable --catch-write-textsegment and --catch-outerspace 2026-04-16 22:36:48 +02:00
3ca6690822 unify host programs across targets 2026-04-16 22:36:36 +02:00
fe3adb5859 update build recipe: copy wasm-module source to build directory for archival 2026-04-16 12:47:06 +02:00
b0ffcc1e31 update injections + projects (cored aot/interp) 2026-04-16 12:46:42 +02:00
94ce91ae0a update injections + projects (cored c) 2026-04-13 23:04:05 +02:00
db54f88fd7 do fail interactions inside wasm module + unify host modules + fix cored module 2026-04-13 23:03:54 +02:00
c78fefbed9 update injections + projects (cored interp) 2026-04-08 18:32:44 +02:00
a11fab4853 update injections + projects (cored c/aot) 2026-04-07 22:13:13 +02:00
eebcb56297 update hosts for cored target
WIP: currently the hosts are not generic and don't support different
targets
2026-04-07 22:12:57 +02:00
820cc2a390 switch fail markers to function symbols 2026-04-01 21:17:01 +02:00
20e2c009fb add interp ghidra project with -O0 2026-03-19 18:59:25 +01:00
efc188ac10 add interp injection with -O0 2026-03-19 18:59:09 +01:00
266e6b51f5 update mars faildir 2026-03-19 09:02:53 +01:00
d701b88f63 update mars faildir 2026-03-19 01:17:43 +01:00
ac9ff33b24 re-add file (lfs issue) 2026-03-19 01:14:08 +01:00
fbfb504123 remove file 2026-03-19 01:10:39 +01:00
258ca7ccce rename file 2026-03-19 01:08:44 +01:00
399ced2a00 update injections + projects 2026-03-19 01:01:01 +01:00
ab5ef378ab compile with -O0 and -ggdb3 2026-03-19 01:00:54 +01:00
edb903d000 add aot ghidra project 2026-03-18 23:13:34 +01:00
9cc94387eb add c-only ghidra project 2026-03-18 23:13:27 +01:00
7e8b199fde update .gitignore 2026-03-18 23:13:21 +01:00
b9bf7dd478 move ghidra script location 2026-03-18 23:12:47 +01:00
dc86ad17ec update .gitattributes 2026-03-18 23:12:18 +01:00
32e925c794 add aot injection 2026-03-18 23:11:00 +01:00
b2f1ec44f5 add c-only injection 2026-03-18 23:10:56 +01:00
03b2851f4d update recipes 2026-03-18 23:10:41 +01:00
a5cbc3e61b add rough fail db table overview 2026-03-18 23:10:38 +01:00
5428225d1d update .gitattributes 2026-03-18 23:10:33 +01:00
8da11311a0 add gitattributes 2026-03-18 20:06:36 +01:00
39c7d921ab move fail binaries 2026-03-18 19:54:44 +01:00
350dff63cd add ghidra script to import markers as bookmarks 2026-03-17 23:52:33 +01:00
ddde71c69a add recipe to download markers from mars 2026-03-17 23:52:22 +01:00
05bc73c711 add recipe to export markers to csv 2026-03-17 23:09:12 +01:00
4888b35c31 update radare2 config 2026-03-17 20:43:39 +01:00
a8f59a2b61 update radare2 config 2026-03-17 20:42:26 +01:00
647c4c6406 update radare2 config 2026-03-17 20:41:54 +01:00
a04e71f183 update radare2 config 2026-03-17 20:40:57 +01:00
38461f1708 disable importing --sources because of libdwarf error on mars
FAIL_IMPORT requires dwarf_init from libdwarf, but provided version only
defines dwarf_init_b?
2026-03-13 00:37:28 +01:00
a37ac671ea make radare recipe accept an address 2026-03-13 00:31:23 +01:00
10c4002bd9 remove obsolete recipe 2026-03-13 00:24:57 +01:00
bcab6e02ae add a c-only target (no WASM) 2026-03-13 00:22:03 +01:00
daeb1f1211 split compilation into wasm.just + add targets for interpreted wasm 2026-03-12 21:13:06 +01:00
4f5553737b launch fail on non-default port on mars 2026-03-12 15:36:09 +01:00
7cb7ffef35 fix just path in mars.just 2026-03-12 15:16:57 +01:00
8fec847cca split justfile into nixos.just + mars.just 2026-03-12 15:15:15 +01:00
f64d7eda8a add just static binaries 2026-03-12 14:57:48 +01:00
9e46f14dcd don't stop server in all-in-one 2026-03-12 14:52:22 +01:00
6ff924328e add all in one recipe 2026-03-12 14:26:36 +01:00
2aea27172e use shebang recipes for conditional dependencies instead of inline templating 2026-03-12 14:06:45 +01:00
1267f885cd add linux-posix + linux-baremetal recipes 2026-03-12 13:45:33 +01:00
836d2e0da1 replace compose-file with direct docker command + add dbeaver recipe 2026-03-12 10:16:09 +01:00
d7607c362d fix incompatible libdwarf version 2026-03-12 10:15:30 +01:00
0b61c6f928 slightly restructure flake 2026-03-12 09:27:07 +01:00
8ebb3d78df add injection targets 2026-03-12 01:42:34 +01:00
11cf5b1701 add build + fail recipes 2026-03-12 01:42:25 +01:00
8b608a17c8 add wasi/wamr dependencies 2026-03-12 01:41:43 +01:00
f32f631bc3 add binaries 2026-03-11 20:22:30 +01:00
16 changed files with 202 additions and 172 deletions

BIN
fail/bin/fail-x86-tracing (Stored with Git LFS)

Binary file not shown.

BIN
fail/bin/generic-experiment-client (Stored with Git LFS)

Binary file not shown.

BIN
fail/bin/generic-experiment-server (Stored with Git LFS)

Binary file not shown.

BIN
fail/bin/import-trace (Stored with Git LFS)

Binary file not shown.

BIN
fail/bin/prune-trace (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -417,7 +417,7 @@ rec {
mariadb.client mariadb.client
# dbeaver-bin # dbeaver-bin
# beekeeper-studio # beekeeper-studio
tableplus # tableplus
lazysql lazysql
iwasm iwasm
wamrc wamrc

View File

@ -260,7 +260,8 @@ sub select_experiment {
TUI::select_from_list( "Select Experiment", $multi, @exp_with_notes ); TUI::select_from_list( "Select Experiment", $multi, @exp_with_notes );
die "No experiment selected" unless @selected_experiments; die "No experiment selected" unless @selected_experiments;
map { s/(.*?)\s+\(.+\)$/$1/ } @selected_experiments; @selected_experiments =
map { s/(.*?)\s+\(.+\)$/$1/r } @selected_experiments;
return $multi == 1 ? @selected_experiments : $selected_experiments[0]; return $multi == 1 ? @selected_experiments : $selected_experiments[0];
} }

View File

@ -109,6 +109,7 @@ my %handlers = (
my @existing = Util::find_files($local_ghidra_projects); my @existing = Util::find_files($local_ghidra_projects);
# Determine if an experiment was already imported
my $is_old = sub { my $is_old = sub {
my ($name) = @_; my ($name) = @_;
$name =~ s/:/-/g; $name =~ s/:/-/g;
@ -381,7 +382,11 @@ my %handlers = (
); );
}, },
'20. Run Build in GDB' => sub { '20. Open TablePlus (Mars)' => sub {
system('tableplus');
},
'21. Run Build in GDB' => sub {
my @builds = grep { /linux/ } Util::find_subdirs($local_builds_dir); my @builds = grep { /linux/ } Util::find_subdirs($local_builds_dir);
my @selected_builds = my @selected_builds =
TUI::select_from_list( "Select Build to Run in GDB", 0, @builds ); TUI::select_from_list( "Select Build to Run in GDB", 0, @builds );
@ -500,11 +505,26 @@ my %handlers = (
'99. Drop Databases (Mars)' => sub { '99. Drop Databases (Mars)' => sub {
# Drop databases on mars # Drop databases on mars
my @db_names = Mars::db_list(); my @dbs = Mars::db_list();
my @dbs_with_notes;
foreach my $db (@dbs) {
my $info =
Util::read_experiment_info( $db =~ s/smchurla_//r =~ s/:/-/gr );
push @dbs_with_notes,
( defined $info && length($info) > 0 )
? sprintf( "%-60s (%s)", $db, $info )
: $db;
}
my @selected_dbs = my @selected_dbs =
TUI::select_from_list( "Select Databases to Drop from Mars", TUI::select_from_list( "Select Databases to Drop from Mars",
1, @db_names ); 1, @dbs_with_notes );
die "No database selected" unless @selected_dbs; die "No database selected" unless @selected_dbs;
@selected_dbs =
map { s/(.*?)\s+\(.+\)$/$1/r } @selected_dbs;
Mars::db_drop($_) for @selected_dbs; Mars::db_drop($_) for @selected_dbs;
}, },
); );

View File

@ -35,148 +35,156 @@ my $result_browser = "$fail_bin/resultbrowser.py";
sub trace { sub trace {
my ($experiment) = @_; my ($experiment) = @_;
Util::notify("Tracing $experiment..."); # Util::notify("Tracing $experiment...");
system( my $trace_command = join " ", (
join " ", "$bochs_runner",
( "-V $fail_share/vgabios.bin",
"$bochs_runner", "-b $fail_share/BIOS-bochs-latest",
"-V $fail_share/vgabios.bin", "-1",
"-b $fail_share/BIOS-bochs-latest", "-f $fail_trace",
"-1", "-e $remote_builds_dir/$experiment/system.elf",
"-f $fail_trace", "-i $remote_builds_dir/$experiment/system.iso",
"-e $remote_builds_dir/$experiment/system.elf", "--",
"-i $remote_builds_dir/$experiment/system.iso", "-Wf,--start-symbol=fail_start_trace",
"--", "-Wf,--save-symbol=fail_start_trace",
"-Wf,--start-symbol=fail_start_trace", "-Wf,--end-symbol=fail_stop_trace",
"-Wf,--save-symbol=fail_start_trace", "-Wf,--state-file=$remote_builds_dir/$experiment/state",
"-Wf,--end-symbol=fail_stop_trace", "-Wf,--trace-file=$remote_builds_dir/$experiment/trace.pb",
"-Wf,--state-file=$remote_builds_dir/$experiment/state", "-Wf,--elf-file=$remote_builds_dir/$experiment/system.elf",
"-Wf,--trace-file=$remote_builds_dir/$experiment/trace.pb",
"-Wf,--elf-file=$remote_builds_dir/$experiment/system.elf"
# "-Wf,--full-trace", # "-Wf,--full-trace",
# "-Wf,--check-bounds", # "-Wf,--check-bounds",
) ">$remote_builds_dir/$experiment/1_trace.log"
); );
say "Trace command: $trace_command";
system($trace_command);
} }
sub import_trace { sub import_trace {
my ($experiment) = @_; my ($experiment) = @_;
Util::notify("Importing $experiment trace..."); # Util::notify("Importing $experiment trace...");
# Benchmark: ip # Benchmark: ip
system( my $import_ip_command = join " ", (
join " ", "$fail_import",
( "--database-option-file $remote_db_conf",
"$fail_import", "-t $remote_builds_dir/$experiment/trace.pb",
"--database-option-file $remote_db_conf", "-i RegisterImporter",
"-t $remote_builds_dir/$experiment/trace.pb", "-e $remote_builds_dir/$experiment/system.elf",
"-i RegisterImporter", "-v $experiment",
"-e $remote_builds_dir/$experiment/system.elf", "-b ip",
"-v $experiment", "--no-gp", # Don't inject general purpose registers
"-b ip", "--ip", # Inject instruction pointer
"--no-gp", # Don't inject general purpose registers ">$remote_builds_dir/$experiment/2_import_ip.log"
"--ip" # Inject instruction pointer
)
); );
say "Import IP command: $import_ip_command";
system($import_ip_command);
# Benchmark: mem # Benchmark: mem
system( my $import_mem_command = join " ",
join " ", (
( "$fail_import",
"$fail_import", "--database-option-file $remote_db_conf",
"--database-option-file $remote_db_conf", "-t $remote_builds_dir/$experiment/trace.pb",
"-t $remote_builds_dir/$experiment/trace.pb", "-i MemoryImporter",
"-i MemoryImporter", "-e $remote_builds_dir/$experiment/system.elf",
"-e $remote_builds_dir/$experiment/system.elf", "-v $experiment",
"-v $experiment", "-b mem",
"-b mem" ">$remote_builds_dir/$experiment/2_import_mem.log"
) );
); say "Import MEM command: $import_mem_command";
system($import_mem_command);
# Benchmark: regs # Benchmark: regs
system( my $import_regs_command = join " ", (
join " ", "$fail_import",
( "--database-option-file $remote_db_conf",
"$fail_import", "-t $remote_builds_dir/$experiment/trace.pb",
"--database-option-file $remote_db_conf", "-i RegisterImporter",
"-t $remote_builds_dir/$experiment/trace.pb", "-e $remote_builds_dir/$experiment/system.elf",
"-i RegisterImporter", "-v $experiment",
"-e $remote_builds_dir/$experiment/system.elf", "-b regs",
"-v $experiment", "--flags", # Inject flags register
"-b regs", ">$remote_builds_dir/$experiment/2_import_regs.log"
"--flags" # Inject flags register
)
); );
say "Import REGS command: $import_regs_command";
system($import_regs_command);
# Import fulltrace for VisualFAIL # Import fulltrace for VisualFAIL
system( # system(
join " ", # join " ",
( # (
"$fail_import", # "$fail_import",
"--database-option-file $remote_db_conf", # "--database-option-file $remote_db_conf",
"-t $remote_builds_dir/$experiment/trace.pb", # "-t $remote_builds_dir/$experiment/trace.pb",
"-i FullTraceImporter", # "-i FullTraceImporter",
"-e $remote_builds_dir/$experiment/system.elf", # "-e $remote_builds_dir/$experiment/system.elf",
"-v $experiment", # "-v $experiment",
) # )
); # );
# Import objdump disassembly + source files # Import objdump disassembly + source files
system( # system(
join " ", # join " ",
( # (
"$fail_import", # "$fail_import",
"--database-option-file $remote_db_conf", # "--database-option-file $remote_db_conf",
"-t $remote_builds_dir/$experiment/trace.pb", # "-t $remote_builds_dir/$experiment/trace.pb",
"-i ElfImporter", # "-i ElfImporter",
"-e $remote_builds_dir/$experiment/system.elf", # "-e $remote_builds_dir/$experiment/system.elf",
"-v $experiment", # "-v $experiment",
"-b ip", # "-b ip",
"--objdump objdump", # "--objdump objdump",
"--sources", #
) # # "--sources",
); # )
system( # );
join " ", # system(
( # join " ",
"$fail_import", # (
"--database-option-file $remote_db_conf", # "$fail_import",
"-t $remote_builds_dir/$experiment/trace.pb", # "--database-option-file $remote_db_conf",
"-i ElfImporter", # "-t $remote_builds_dir/$experiment/trace.pb",
"-e $remote_builds_dir/$experiment/system.elf", # "-i ElfImporter",
"-v $experiment", # "-e $remote_builds_dir/$experiment/system.elf",
"-b mem", # "-v $experiment",
"--objdump objdump", # "-b mem",
"--sources", # "--objdump objdump",
) #
); # # "--sources",
system( # )
join " ", # );
( # system(
"$fail_import", # join " ",
"--database-option-file $remote_db_conf", # (
"-t $remote_builds_dir/$experiment/trace.pb", # "$fail_import",
"-i ElfImporter", # "--database-option-file $remote_db_conf",
"-e $remote_builds_dir/$experiment/system.elf", # "-t $remote_builds_dir/$experiment/trace.pb",
"-v $experiment", # "-i ElfImporter",
"-b regs", # "-e $remote_builds_dir/$experiment/system.elf",
"--objdump objdump", # "-v $experiment",
"--sources", # "-b regs",
) # "--objdump objdump",
); #
# # "--sources",
# )
# );
system( my $prune_command = join " ",
join " ", (
( "$fail_prune", "--database-option-file $remote_db_conf",
"$fail_prune", "-v $experiment", "-b %%",
"--database-option-file $remote_db_conf", "--overwrite", ">$remote_builds_dir/$experiment/2_prune.log"
"-v $experiment", );
"-b %%", "--overwrite" say "Prune command: $prune_command";
)
); system($prune_command);
} }
sub inject { sub inject {
@ -186,6 +194,43 @@ sub inject {
Util::notify("Injecting $experiment using $count cores..."); Util::notify("Injecting $experiment using $count cores...");
my $server_command = join " ", (
"$fail_server",
# "--port $fail_server_port",
"--database-option-file $remote_db_conf", "-v $experiment",
"-b %", "--inject-single-bit",
"--inject-registers",
">$remote_builds_dir/$experiment/3_server.log"
);
say "Server command: $server_command";
my $client_command = join " ", (
"nice $bochs_runner",
"-V $fail_share/vgabios.bin",
"-b $fail_share/BIOS-bochs-latest",
"-f $fail_inject",
"-e $remote_builds_dir/$experiment/system.elf",
"-i $remote_builds_dir/$experiment/system.iso",
"-j $count",
"--",
# "-Wf,--server-port=$fail_server_port",
"-Wf,--state-dir=$remote_builds_dir/$experiment/state",
"-Wf,--trap",
"-Wf,--catch-outerspace",
"-Wf,--catch-write-textsegment",
"-Wf,--timeout=500000",
"-Wf,--ok-marker=fail_marker_positive",
"-Wf,--fail-marker=fail_marker_negative",
"-Wf,--detected-marker=fail_marker_detected",
">/dev/null"
# ">$remote_builds_dir/$experiment/4_client.log"
);
say "Client command: $client_command";
say "Forking..."; say "Forking...";
my $pid = fork(); my $pid = fork();
die "fork failed: $!" unless defined $pid; die "fork failed: $!" unless defined $pid;
@ -193,52 +238,16 @@ sub inject {
if ( $pid == 0 ) { if ( $pid == 0 ) {
# child -> server # child -> server
say "Running server in child process..."; say "Running server in child process...";
exec( exec($server_command) == 0 or die "exec server failed: $!";
join " ",
(
"$fail_server",
"--port $fail_server_port",
"--database-option-file $remote_db_conf",
"-v $experiment",
"-b %",
"--inject-single-bit",
"--inject-registers"
)
) == 0 or die "exec server failed: $!";
} }
# parent -> client # parent -> client
say "Waiting for server..."; say "Waiting for server...";
sleep(10); sleep(10);
say "Running client with $count cores in parent process"; say "Running client with $count cores in parent process";
system($client_command) == 0 or die "client failed: $?";
system(
join " ",
(
"nice $bochs_runner",
"-V $fail_share/vgabios.bin",
"-b $fail_share/BIOS-bochs-latest",
"-f $fail_inject",
"-e $remote_builds_dir/$experiment/system.elf",
"-i $remote_builds_dir/$experiment/system.iso",
"-j $count",
"--",
"-Wf,--server-port=$fail_server_port",
"-Wf,--state-dir=$remote_builds_dir/$experiment/state",
"-Wf,--trap",
"-Wf,--catch-outerspace",
"-Wf,--catch-write-textsegment",
"-Wf,--timeout=500000",
"-Wf,--ok-marker=fail_marker_positive",
"-Wf,--fail-marker=fail_marker_negative",
"-Wf,--detected-marker=fail_marker_detected",
">/dev/null"
)
) == 0 or die "client failed: $?";
say "Killing server with pid $pid..."; say "Killing server with pid $pid...";
kill 'TERM', $pid; kill 'TERM', $pid;