Closed qiangz63 closed 11 months ago
Linux (Ubuntu 22.04) from Termux proot
.
In Termux patched dlv
could into pipe, and debug fine!
So in proot only debug remote from Termux' dlv.
My source code speed.go:
package main
import "fmt"
import "time"
func main() {
var a int64 = 0
begin := time.Now()
for i := 0; i < 100000001; i++ {
a += int64(i)
}
end := time.Now()
fmt.Println("Result:", a)
fmt.Println("Time: ", end.Sub(begin).Milliseconds(), "ms")
}
go build -gcflags "all=-N -l" -o speed speed.go
It's not clear what the bug is here. You are talking about problems with pipes but the only example you show doesn't use a pipe.
It's not clear what the bug is here. You are talking about problems with pipes but the only example you show doesn't use a pipe.
The main problem is that dlv
cannot debug in ubuntu/arm64 , strace
shows it always in cycle, after log 2023-12-15T03:04:34Z info layer=debugger launching process with args: [speed]
.
pipe is sysytem call in ubuntu using strace shows pipe2([3, 7], O_CLOEXEC) = 0
,
then log 2023-12-15T06:53:13Z debug layer=debugger Adding target 29246 "./speed"
,
but ubuntu can't into debug, just always cycle futex(0x3000bc3a88, FUTEX_WAIT_PRIVATE, 0, NULL) = -1 EAGAIN (Resource temporarily unavailable)
or hangs onfutex(0x3000bc3a88, FUTEX_WAIT_PRIVATE, 0, NULL
.
Delve does work on linux/arm64, we have CI to make sure that is the case. It must be something about your environment or how you are using. Are you using termux?
Delve does work on linux/arm64, we have CI to make sure that is the case. It must be something about your environment or how you are using. Are you using termux?
Yes, I'm using termux patched delve (just add "android" case in some files), it work fine and could add breakpoints. Confused in ubuntu/arm64 build from source can't success debug, and my another device Debian/arm64 can't debug too. The environment maybe no problem, since gdb
could debug C/C++ and Rust.
We don't support termux/android.
go version go1.21.5 linux/arm64
Delve Debugger Version: 1.21.2 Build: $Id: 98f8ab2662d926245917ade2f2bb38277315c7fc $
Delve build from
go install github.com/go-delve/delve/cmd/dlv@latest
The bug in anywhere (includingdebug
command) When usingdlv exec speed --log
, it hangs forever:2023-12-15T03:04:34Z info layer=debugger launching process with args: [speed]
strace dlv exec speed --log
shows: