diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-17 19:43:03 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-03-17 20:06:04 +0100 |
commit | 32896ab56d9ff767af9ed00cb5c9954edb0a2a81 (patch) | |
tree | ca54bc673e23bc8c74fb29cf70137c70c0d780b8 /pkg/tcpip/link | |
parent | 5b8da876daf5b06ae57e35d6af0180b752ae0c61 (diff) |
WIP debug
Diffstat (limited to 'pkg/tcpip/link')
-rw-r--r-- | pkg/tcpip/link/rawfile/rawfile_unsafe.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/tcpip/link/rawfile/rawfile_unsafe.go b/pkg/tcpip/link/rawfile/rawfile_unsafe.go index 44e25d475..cf49ce572 100644 --- a/pkg/tcpip/link/rawfile/rawfile_unsafe.go +++ b/pkg/tcpip/link/rawfile/rawfile_unsafe.go @@ -19,6 +19,9 @@ package rawfile import ( + "runtime/debug" + "fmt" + "log" "syscall" "unsafe" @@ -149,6 +152,11 @@ func BlockingReadv(fd int, iovecs []syscall.Iovec) (int, *tcpip.Error) { n, _, e := syscall.RawSyscall(syscall.SYS_READV, uintptr(fd), uintptr(unsafe.Pointer(&iovecs[0])), uintptr(len(iovecs))) if e == 0 { return int(n), nil + } else if e != syscall.EAGAIN && e != syscall.EWOULDBLOCK && e != syscall.EINTR { + fmt.Println("BlockingReadv: RawSyscall failed ", e) + debug.PrintStack() + log.Fatal("BlockingReadv: RawSyscall failed ", e) +// return 0, TranslateErrno(e) } event := PollEvent{ |