From 1fdeb6b58a81a64659202d0a104cb61bdad44f0e Mon Sep 17 00:00:00 2001 From: David Crawshaw Date: Tue, 3 Mar 2015 14:18:56 -0500 Subject: [PATCH] misc/ios: extra stdout check before run On one recent job I saw an unexpected SIGSTOP, which I suspect is simply the job timeout. But the lack of other diagnostics suggests lldb just didn't see the "run" command. ----- process handle SIGHUP --stop false --pass true --notify false process handle SIGPIPE --stop false --pass true --notify false process handle SIGUSR1 --stop false --pass true --notify false process handle SIGSEGV --stop false --pass true --notify false process handle SIGBUS --stop false --pass true --notify false breakpoint set -n getwd run (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGHUP true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGPIPE true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGUSR1 true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGSEGV true false false (lldb) NAME PASS STOP NOTIFY ========== ===== ===== ====== SIGBUS true false false (lldb) Breakpoint 1: where = libsystem_c.dylib`getwd, address = 0x2f7f7294 (lldb) Process 23755 stopped * thread #1: tid = 0x104c02, 0x1febb000 dyld`_dyld_start, stop reason = signal SIGSTOP frame #0: 0x1febb000 dyld`_dyld_start dyld`_dyld_start: -> 0x1febb000: mov r8, sp 0x1febb004: sub sp, sp, #0x10 0x1febb008: bic sp, sp, #0x7 0x1febb00c: ldr r3, [pc, #112] ; _dyld_start + 132 (lldb) go_darwin_arm_exec: timeout (stage br getwd) FAIL compress/gzip 359.226s Change-Id: Ifc2123f5ceaa6d3f9b31bb5cb6e77a2c8ec23818 Reviewed-on: https://go-review.googlesource.com/6613 Reviewed-by: Hyang-Ah Hana Kim --- misc/ios/go_darwin_arm_exec.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/misc/ios/go_darwin_arm_exec.go b/misc/ios/go_darwin_arm_exec.go index bca8f16e50..b7aaf55809 100644 --- a/misc/ios/go_darwin_arm_exec.go +++ b/misc/ios/go_darwin_arm_exec.go @@ -179,8 +179,15 @@ func run(bin string, args []string) error { do(`process handle SIGUSR1 --stop false --pass true --notify false`) do(`process handle SIGSEGV --stop false --pass true --notify false`) // does not work do(`process handle SIGBUS --stop false --pass true --notify false`) // does not work + if err := waitFor("handlers set", "(lldb)"); err != nil { + return err + } do(`breakpoint set -n getwd`) // in runtime/cgo/gcc_darwin_arm.go + if err := waitFor("breakpoint set", "(lldb)"); err != nil { + return err + } + do(`run`) if err := waitFor("br getwd", "stop reason = breakpoint"); err != nil { return err -- 2.48.1