aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-01-26 16:14:12 +0100
committerGitHub <noreply@github.com>2017-01-26 16:14:12 +0100
commitedb0141529e09ca152803885cd94e1e3915d4ca9 (patch)
tree9c16760a7f1fc59dad655533bf90c02b55ca2bb5
parent51ed7072cd468e7e3bec76c3412df77656bbddea (diff)
parenta0a4a8ed95f53d206394c9b432ab37eef55c013d (diff)
Merge pull request #119 from billy-lau/fix_adb_reboot2
adb: executor: Revert to adb reboot
-rw-r--r--executor/executor.cc5
-rw-r--r--vm/adb/adb.go11
2 files changed, 6 insertions, 10 deletions
diff --git a/executor/executor.cc b/executor/executor.cc
index 03999559a..165d2c7e2 100644
--- a/executor/executor.cc
+++ b/executor/executor.cc
@@ -133,11 +133,6 @@ uint64_t cover_dedup(thread_t* th, uint64_t n);
int main(int argc, char** argv)
{
- if (argc == 2 && strcmp(argv[1], "reboot") == 0) {
- reboot(LINUX_REBOOT_CMD_RESTART);
- return 0;
- }
-
prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0);
if (mmap(&input_data[0], kMaxInput, PROT_READ, MAP_PRIVATE | MAP_FIXED, kInFd, 0) != &input_data[0])
fail("mmap of input file failed");
diff --git a/vm/adb/adb.go b/vm/adb/adb.go
index d689d038c..e634e671a 100644
--- a/vm/adb/adb.go
+++ b/vm/adb/adb.go
@@ -217,11 +217,12 @@ func (inst *instance) repair() error {
// Assume that the device is in a bad state initially and reboot it.
// Ignore errors, maybe we will manage to reboot it anyway.
inst.waitForSsh()
- // adb reboot episodically hangs, so we use a more reliable way.
- // Ignore errors because all other adb commands hang as well
- // and the binary can already be on the device.
- inst.adb("push", inst.cfg.Executor, "/data/syz-executor")
- if _, err := inst.adb("shell", "/data/syz-executor", "reboot"); err != nil {
+ // History: adb reboot episodically hangs, so we used a more reliable way:
+ // using syz-executor to issue reboot syscall. However, this has stopped
+ // working, probably due to the introduction of seccomp. Therefore,
+ // we revert this to `adb shell reboot` in the meantime, until a more
+ // reliable solution can be sought out.
+ if _, err := inst.adb("shell", "reboot"); err != nil {
return err
}
// Now give it another 5 minutes to boot.