summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--pkg/tcpip/link/rawfile/rawfile_unsafe.go8
-rw-r--r--pkg/tcpip/stack/stack.go2
-rw-r--r--runsc/boot/loader.go2
3 files changed, 12 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{}
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go
index e7ca98134..0da361c0b 100644
--- a/runsc/boot/loader.go
+++ b/runsc/boot/loader.go
@@ -918,6 +918,8 @@ func newRootNetworkNamespace(conf *Config, clock tcpip.Clock, uniqueID stack.Uni
return inet.NewRootNamespace(hostinet.NewStack(), nil), nil
case NetworkNone, NetworkSandbox:
+// panic("error boot")
+// os.Exit(128)
s, err := newEmptySandboxNetworkStack(clock, uniqueID)
if err != nil {
return nil, err