aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorAlexander Popov <alex.popov@linux.com>2018-09-24 15:26:08 +0300
committerDmitry Vyukov <dvyukov@google.com>2018-09-24 14:55:35 +0200
commit0e7547d77c52f0ec26e6e95dc06baa6154bc81e4 (patch)
treec84c86326dbd6533456b78e61bab5c6eb24d1f26 /pkg
parent2f485cdfa912e521007b14e6198d1bda25cdb074 (diff)
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 <alex.popov@linux.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/csource/generated.go5
1 files changed, 1 insertions, 4 deletions
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;
}