From 0e7547d77c52f0ec26e6e95dc06baa6154bc81e4 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Mon, 24 Sep 2018 15:26:08 +0300 Subject: executor: make the debug output useful for race condition debugging Sometimes race conditions are reproduced by syz-execprog and are not reproduced by the programs generated with syz-prog2c. In such cases it's very helpful to know when exactly the fuzzing syscalls are executed. Unfortunately, adding timestamps to the output of the original 'debug' mode doesn't work. This mode provides very verbose output, which slows down executor and breaks the repro. So let's make the executor debug output less verbose and add the timestamps. Signed-off-by: Alexander Popov --- pkg/csource/generated.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'pkg/csource') diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index fd6bcc862..ed2030304 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -3389,7 +3389,6 @@ retry: } int i; for (i = 0;; i++) { - debug("unlink(%s)\n", filename); if (unlink(filename) == 0) break; if (errno == EPERM) { @@ -3416,7 +3415,6 @@ retry: closedir(dp); int i; for (i = 0;; i++) { - debug("rmdir(%s)\n", dir); if (rmdir(dir) == 0) break; if (i < 100) { @@ -4029,7 +4027,6 @@ static void loop(void) close(kOutPipeFd); #endif execute_one(); - debug("worker exiting\n"); #if SYZ_HAVE_RESET_TEST reset_test(); #endif @@ -4064,7 +4061,7 @@ static void loop(void) if (current_time_ms() - start < 5 * 1000) continue; #endif - debug("killing\n"); + debug("killing hanging pid %d\n", pid); kill_and_wait(pid, &status); break; } -- cgit mrf-deployment