diff options
Diffstat (limited to 'pkg/tcpip')
-rw-r--r-- | pkg/tcpip/link/rawfile/rawfile_unsafe.go | 8 | ||||
-rw-r--r-- | pkg/tcpip/stack/stack.go | 2 |
2 files changed, 10 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{ diff --git a/pkg/tcpip/stack/stack.go b/pkg/tcpip/stack/stack.go index 5ffb7166f..68abdb43b 100644 --- a/pkg/tcpip/stack/stack.go +++ b/pkg/tcpip/stack/stack.go @@ -21,6 +21,7 @@ package stack import ( "encoding/binary" + "fmt" "sync/atomic" "time" @@ -615,6 +616,7 @@ func (*TransportEndpointInfo) IsEndpointInfo() {} // stack. Please refer to individual protocol implementations as to what options // are supported. func New(opts Options) *Stack { + fmt.Println("stack.New()") clock := opts.Clock if clock == nil { clock = &tcpip.StdClock{} |