Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build unik image with unik daemon in debug mode #126

Open
talberto-zz opened this issue Apr 20, 2017 · 1 comment
Open

Failed to build unik image with unik daemon in debug mode #126

talberto-zz opened this issue Apr 20, 2017 · 1 comment

Comments

@talberto-zz
Copy link
Contributor

Hi, when I start the unik daemon in debug mode I cannot build a simple unik image. The problem doesn't show up when I don't start the unik daemon in debug mode. My developement environment:

  • I'm using a Mac Os Sierra 10.12.3
  • Docker for Mac 1.13.0
  • VirtualBox 5.1.8 r111374

Below are the last log lines from the unik daemon:

time="2017-04-20T11:41:53+02:00" level=debug msg="util.LogCommand.func1[util/log.go:86]\nDownloading: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/24/maven-parent-24.pom" 
time="2017-04-20T11:41:53+02:00" level=debug msg="util.LogCommand.func1[util/log.go:86]\n3/37 KB    \r5/37 KB   \r8/37 KB   \r11/37 KB   \r13/37 KB   \r16/37 KB   \r19/37 KB   \r21/37 KB   \r24/37 KB   \r27/37 KB   \r29/37 KB   \r32/37 KB   \r35/37 KB   \r37/37 KB   \r           \rDownloaded: https://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/24/maven-parent-24.pom (37 KB at 118.9 KB/sec)" 
time="2017-04-20T11:41:53+02:00" level=debug msg="util.LogCommand.func1[util/log.go:86]\nDownloading: https://repo.maven.apache.org/maven2/org/apache/apache/14/apache-14.pom" 
unexpected fault address 0x18e6dd22a90f
fatal error: fault
[signal 0xb code=0x1 addr=0x18e6dd22a90f pc=0x5dc3b]

goroutine 15 [running]:
runtime.throw(0x15681b8, 0x5)
   /usr/local/go/src/runtime/panic.go:547 +0x90 fp=0xc8203d5b38 sp=0xc8203d5b20
runtime.sigpanic()
   /usr/local/go/src/runtime/sigpanic_unix.go:27 +0x2ba fp=0xc8203d5b88 sp=0xc8203d5b38
github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus.Entry.log(0xc8200800f0, 0xc8204fc000, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xd705, ...)
   /go/src/github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus/entry.go:96 +0xfb fp=0xc8203d5cc0 sp=0xc8203d5b88
github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus.(*Entry).Debug(0xc820474050, 0xc8203d5d80, 0x1, 0x1)
   /go/src/github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus/entry.go:130 +0x91 fp=0xc8203d5d38 sp=0xc8203d5cc0
github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus.(*Entry).Debugf(0xc820474050, 0xc82012a600, 0xbc, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus/entry.go:178 +0x139 fp=0xc8203d5dc0 sp=0xc8203d5d38
github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus.(*Logger).Debugf(0xc8200800f0, 0xc82012a600, 0xbc, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus/logger.go:117 +0x6f fp=0xc8203d5e00 sp=0xc8203d5dc0
github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus.Debugf(0xc82012a600, 0xbc, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/Sirupsen/logrus/exported.go:117 +0x55 fp=0xc8203d5e38 sp=0xc8203d5e00
github.com/cf-unik/unik/pkg/util.LogCommand.func1(0x275a900, 0xc820486068, 0x1)
   /go/src/github.com/cf-unik/unik/pkg/util/log.go:86 +0x17f fp=0xc8203d5f88 sp=0xc8203d5e38
runtime.goexit()
   /usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8203d5f90 sp=0xc8203d5f88
created by github.com/cf-unik/unik/pkg/util.LogCommand
   /go/src/github.com/cf-unik/unik/pkg/util/log.go:91 +0x168

goroutine 1 [IO wait]:
net.runtime_pollWait(0x27a04d0, 0x72, 0x2792028)
   /usr/local/go/src/runtime/netpoll.go:160 +0x60
net.(*pollDesc).Wait(0xc820338220, 0x72, 0x0, 0x0)
   /usr/local/go/src/net/fd_poll_runtime.go:73 +0x3a
net.(*pollDesc).WaitRead(0xc820338220, 0x0, 0x0)
   /usr/local/go/src/net/fd_poll_runtime.go:78 +0x36
net.(*netFD).accept(0xc8203381c0, 0x0, 0x27a0fc0, 0xc82007c060)
   /usr/local/go/src/net/fd_unix.go:426 +0x27c
net.(*TCPListener).AcceptTCP(0xc82007a258, 0xc8202af590, 0x0, 0x0)
   /usr/local/go/src/net/tcpsock_posix.go:254 +0x4d
net.(*TCPListener).Accept(0xc82007a258, 0x0, 0x0, 0x0, 0x0)
   /usr/local/go/src/net/tcpsock_posix.go:264 +0x3d
net/http.(*Server).Serve(0xc82033a080, 0x27a0e00, 0xc82007a258, 0x0, 0x0)
   /usr/local/go/src/net/http/server.go:2117 +0x129
net/http.Serve(0x27a0e00, 0xc82007a258, 0x27a0e80, 0xc8202de870, 0x0, 0x0)
   /usr/local/go/src/net/http/server.go:1976 +0x8e
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*Martini).RunOnAddr(0xc8202de870, 0xc82032a9d8, 0x5)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:93 +0x4a4
github.com/cf-unik/unik/pkg/daemon.(*UnikDaemon).Run(0xc820314140, 0xbb8)
   /go/src/github.com/cf-unik/unik/pkg/daemon/daemon.go:406 +0x11c
github.com/cf-unik/unik/cmd.glob.func6.1(0x0, 0x0)
   /go/src/github.com/cf-unik/unik/cmd/daemon.go:88 +0x9b4
github.com/cf-unik/unik/cmd.glob.func6(0x2282b20, 0xc8202561c0, 0x0, 0x2)
   /go/src/github.com/cf-unik/unik/cmd/daemon.go:46 +0x1c
github.com/cf-unik/unik/vendor/github.com/spf13/cobra.(*Command).execute(0x2282b20, 0xc820256040, 0x2, 0x2, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/spf13/cobra/command.go:572 +0x85a
github.com/cf-unik/unik/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2284b20, 0x2282b20, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/spf13/cobra/command.go:662 +0x53f
github.com/cf-unik/unik/vendor/github.com/spf13/cobra.(*Command).Execute(0x2284b20, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/spf13/cobra/command.go:618 +0x2d
main.main()
   /go/src/github.com/cf-unik/unik/unik.go:9 +0x23

goroutine 18 [syscall]:
os/signal.signal_recv(0x0)
   /usr/local/go/src/runtime/sigqueue.go:116 +0x132
os/signal.loop()
   /usr/local/go/src/os/signal/signal_unix.go:22 +0x18
created by os/signal.init.1
   /usr/local/go/src/os/signal/signal_unix.go:28 +0x37

goroutine 19 [chan send]:
github.com/cf-unik/unik/pkg/providers/common.GetInstanceListenerIp.func1(0x2540be400, 0xc8200679e0)
   /go/src/github.com/cf-unik/unik/pkg/providers/common/get_instance_listener_ip.go:20 +0x107
created by github.com/cf-unik/unik/pkg/providers/common.GetInstanceListenerIp
   /go/src/github.com/cf-unik/unik/pkg/providers/common/get_instance_listener_ip.go:21 +0xb6

goroutine 21 [chan send]:
github.com/cf-unik/unik/pkg/providers/common.GetInstanceListenerIp.func1(0x2540be400, 0xc8202d0060)
   /go/src/github.com/cf-unik/unik/pkg/providers/common/get_instance_listener_ip.go:20 +0x107
created by github.com/cf-unik/unik/pkg/providers/common.GetInstanceListenerIp
   /go/src/github.com/cf-unik/unik/pkg/providers/common/get_instance_listener_ip.go:21 +0xb6

goroutine 23 [sleep]:
time.Sleep(0x3b9aca00)
   /usr/local/go/src/runtime/time.go:59 +0xf9
github.com/cf-unik/unik/pkg/providers/virtualbox.NewVirtualboxProvider.func1(0xc820081770)
   /go/src/github.com/cf-unik/unik/pkg/providers/virtualbox/virtualbox_provider.go:65 +0x179
created by github.com/cf-unik/unik/pkg/providers/virtualbox.NewVirtualboxProvider
   /go/src/github.com/cf-unik/unik/pkg/providers/virtualbox/virtualbox_provider.go:67 +0x5f9

goroutine 37 [syscall]:
syscall.Syscall6(0x7, 0x22c4, 0xc82018b6bc, 0x0, 0xc820181dd0, 0x0, 0x0, 0xc820066300, 0x27a1010, 0x10a11a0)
   /usr/local/go/src/syscall/asm_darwin_amd64.s:41 +0x5
syscall.wait4(0x22c4, 0xc82018b6bc, 0x0, 0xc820181dd0, 0x90, 0x0, 0x0)
   /usr/local/go/src/syscall/zsyscall_darwin_amd64.go:34 +0x7f
syscall.Wait4(0x22c4, 0xc82018b704, 0x0, 0xc820181dd0, 0xc820486080, 0x0, 0x0)
   /usr/local/go/src/syscall/syscall_bsd.go:129 +0x55
os.(*Process).wait(0xc820528d40, 0x20, 0x0, 0x0)
   /usr/local/go/src/os/exec_unix.go:22 +0x105
os.(*Process).Wait(0xc820528d40, 0x0, 0x0, 0x0)
   /usr/local/go/src/os/doc.go:49 +0x2d
os/exec.(*Cmd).Wait(0xc8201a8000, 0x0, 0x0)
   /usr/local/go/src/os/exec/exec.go:396 +0x211
os/exec.(*Cmd).Run(0xc8201a8000, 0x0, 0x0)
   /usr/local/go/src/os/exec/exec.go:262 +0x64
github.com/cf-unik/unik/pkg/util.(*Container).Run(0xc82018bb70, 0xc82033a400, 0x6, 0x8, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/pkg/util/container.go:106 +0x71
github.com/cf-unik/unik/pkg/compilers/osv.(*OSvJavaCompiler).CompileRawImage(0xc82027bb00, 0xc8204fb040, 0x3a, 0xc820524443, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
   /go/src/github.com/cf-unik/unik/pkg/compilers/osv/osv_java.go:56 +0xa5e
github.com/cf-unik/unik/pkg/daemon.(*UnikDaemon).initialize.func4.1(0x0, 0x0, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/pkg/daemon/daemon.go:556 +0x1729
github.com/cf-unik/unik/pkg/daemon.(*UnikDaemon).initialize.func1(0x275a1e0, 0xc8204fa700, 0xc8203159a0)
   /go/src/github.com/cf-unik/unik/pkg/daemon/daemon.go:415 +0x24
github.com/cf-unik/unik/pkg/daemon.(*UnikDaemon).initialize.func4(0x275a1e0, 0xc8204fa700, 0xc820132000, 0xc82030d770)
   /go/src/github.com/cf-unik/unik/pkg/daemon/daemon.go:578 +0xb9
reflect.Value.call(0x1092c40, 0xc820314360, 0x13, 0x1562870, 0x4, 0xc820014c30, 0x3, 0x3, 0x0, 0x0, ...)
   /usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x1092c40, 0xc820314360, 0x13, 0xc820014c30, 0x3, 0x3, 0x0, 0x0, 0x0)
   /usr/local/go/src/reflect/value.go:303 +0xb1
github.com/cf-unik/unik/vendor/github.com/codegangsta/inject.(*injector).Invoke(0xc820315380, 0x1092c40, 0xc820314360, 0x0, 0x0, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/codegangsta/inject/inject.go:102 +0x442
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).Invoke(0xc8200149b0, 0x1092c40, 0xc820314360, 0x0, 0x0, 0x0, 0x0, 0x0)
   <autogenerated>:30 +0x8d
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*routeContext).run(0xc82030d7d0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/router.go:423 +0xc0
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*route).Handle(0xc8202deaa0, 0x275a218, 0xc8200149b0, 0x275a1e0, 0xc8204fa700)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/router.go:300 +0x129
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*router).Handle(0xc8202d0420, 0x275a1e0, 0xc8204fa700, 0xc820132000, 0x275a218, 0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/router.go:147 +0x214
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(Router).Handle-fm(0x275a1e0, 0xc8204fa700, 0xc820132000, 0x275a218, 0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:139 +0x64
reflect.Value.call(0x1092ba0, 0xc820314100, 0x13, 0x1562870, 0x4, 0xc820014be0, 0x3, 0x3, 0x0, 0x0, ...)
   /usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x1092ba0, 0xc820314100, 0x13, 0xc820014be0, 0x3, 0x3, 0x0, 0x0, 0x0)
   /usr/local/go/src/reflect/value.go:303 +0xb1
github.com/cf-unik/unik/vendor/github.com/codegangsta/inject.(*injector).Invoke(0xc820315380, 0x1092ba0, 0xc820314100, 0x0, 0x0, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/codegangsta/inject/inject.go:102 +0x442
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).run(0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:193 +0x7e
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).Next(0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:184 +0x2c
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.Recovery.func1(0x275a218, 0xc8200149b0, 0xc8202de820)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/recovery.go:142 +0x62
reflect.Value.call(0xfd5c80, 0x19dd430, 0x13, 0x1562870, 0x4, 0xc82030d680, 0x2, 0x2, 0x0, 0x0, ...)
   /usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0xfd5c80, 0x19dd430, 0x13, 0xc82030d680, 0x2, 0x2, 0x0, 0x0, 0x0)
   /usr/local/go/src/reflect/value.go:303 +0xb1
github.com/cf-unik/unik/vendor/github.com/codegangsta/inject.(*injector).Invoke(0xc820315380, 0xfd5c80, 0x19dd430, 0x0, 0x0, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/codegangsta/inject/inject.go:102 +0x442
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).run(0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:193 +0x7e
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).Next(0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:184 +0x2c
github.com/cf-unik/unik/vendor/github.com/layer-x/layerx-commons/lxmartini.customLogger.func1(0x275a1e0, 0xc8204fa700, 0xc820132000, 0x275a218, 0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/layer-x/layerx-commons/lxmartini/lxmartini.go:37 +0x33f
reflect.Value.call(0x1092ba0, 0x19dd8d8, 0x13, 0x1562870, 0x4, 0xc820014a00, 0x3, 0x3, 0x0, 0x0, ...)
   /usr/local/go/src/reflect/value.go:435 +0x120d
reflect.Value.Call(0x1092ba0, 0x19dd8d8, 0x13, 0xc820014a00, 0x3, 0x3, 0x0, 0x0, 0x0)
   /usr/local/go/src/reflect/value.go:303 +0xb1
github.com/cf-unik/unik/vendor/github.com/codegangsta/inject.(*injector).Invoke(0xc820315380, 0x1092ba0, 0x19dd8d8, 0x0, 0x0, 0x0, 0x0, 0x0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/codegangsta/inject/inject.go:102 +0x442
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*context).run(0xc8200149b0)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:193 +0x7e
github.com/cf-unik/unik/vendor/github.com/go-martini/martini.(*Martini).ServeHTTP(0xc8202de870, 0x275a0e8, 0xc82025e8f0, 0xc820132000)
   /go/src/github.com/cf-unik/unik/vendor/github.com/go-martini/martini/martini.go:78 +0x4d
net/http.serverHandler.ServeHTTP(0xc82033a080, 0x275a0e8, 0xc82025e8f0, 0xc820132000)
   /usr/local/go/src/net/http/server.go:2081 +0x19e
net/http.(*conn).serve(0xc8200ae000)
   /usr/local/go/src/net/http/server.go:1472 +0xf2e
created by net/http.(*Server).Serve
   /usr/local/go/src/net/http/server.go:2137 +0x44e

goroutine 16 [syscall]:
syscall.Syscall(0x3, 0xc, 0xc8201de077, 0xf89, 0x5e07f, 0xc82007c080, 0x0)
   /usr/local/go/src/syscall/asm_darwin_amd64.s:16 +0x5
syscall.read(0xc, 0xc8201de077, 0xf89, 0xf89, 0x227b9d8, 0x0, 0x0)
   /usr/local/go/src/syscall/zsyscall_darwin_amd64.go:972 +0x5f
syscall.Read(0xc, 0xc8201de077, 0xf89, 0xf89, 0x0, 0x0, 0x0)
   /usr/local/go/src/syscall/syscall_unix.go:161 +0x4d
os.(*File).read(0xc820486078, 0xc8201de077, 0xf89, 0xf89, 0x0, 0x0, 0x0)
   /usr/local/go/src/os/file_unix.go:228 +0x75
os.(*File).Read(0xc820486078, 0xc8201de077, 0xf89, 0xf89, 0x76, 0x0, 0x0)
   /usr/local/go/src/os/file.go:95 +0x8a
bufio.(*Scanner).Scan(0xc8204b3f08, 0x76)
   /usr/local/go/src/bufio/scan.go:208 +0x97b
github.com/cf-unik/unik/pkg/util.LogCommand.func2(0x275a900, 0xc820486078)
   /go/src/github.com/cf-unik/unik/pkg/util/log.go:94 +0xca
created by github.com/cf-unik/unik/pkg/util.LogCommand
   /go/src/github.com/cf-unik/unik/pkg/util/log.go:97 +0x194

You can find the complete daemon log here: unik-daemon.txt

I'm not an expert in Go but I suspect the problem is coming from the logging function

@talberto-zz
Copy link
Contributor Author

talberto-zz commented Apr 20, 2017

Well, I don't know if it's the best solution or even if it's a solution at all but in any case I found out a work around. I suspected that probably somebody else was experiencing the same problem with either this logging framework or under the same OS and I found what looks like the source of the problem the Go runtime version.

Again, maybe it's completely unrelated, but as somebody suggested in the linked issue I tried to upgrade the Go runtime to a newer version by changing the Dockerfile used for building the unik binary and I no longer have the same problem! Hope it can help somebody in the same situation as me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant