spf13 / kaiju

Open source discussion server
Apache License 2.0
113 stars 9 forks source link

panic error when running kaiju with go1.3 darwin/386 #3

Open thomasmodeneis opened 9 years ago

thomasmodeneis commented 9 years ago

I've done:

$ pwd /opt/gocode/src/github.com/googollee git clone -b 0.9.x https://github.com/googollee/go-socket.io.git $ cd go-socket.io $ go install

$ pwd /opt/gocode/src/github.com/pf13 git clone https://github.com/spf13/kaiju $ cd kaiju $ go run main.go ERROR: 2014/12/21 Config not found... using only defaults, stuff may not work panic: shorthand redefinition

goroutine 16 [running]: runtime.panic(0x312f80, 0x1110e568) /usr/local/go/src/pkg/runtime/panic.c:279 +0xc5 github.com/spf13/pflag.(_FlagSet).AddFlag(0x11130a00, 0x1111a900) /opt/gocode/src/github.com/spf13/pflag/flag.go:391 +0x76d github.com/spf13/cobra.func·008(0x1111a900) /opt/gocode/src/github.com/spf13/cobra/command.go:755 +0x98 github.com/spf13/pflag.(_FlagSet).VisitAll(0x11130980, 0x311f3dbc) /opt/gocode/src/github.com/spf13/pflag/flag.go:193 +0x74 github.com/spf13/cobra.func·009(0x61f560) /opt/gocode/src/github.com/spf13/cobra/command.go:757 +0x6d github.com/spf13/cobra.(_Command).mergePersistentFlags(0x61f560) /opt/gocode/src/github.com/spf13/cobra/command.go:764 +0x5a github.com/spf13/cobra.(_Command).ParseFlags(0x61f560, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/gocode/src/github.com/spf13/cobra/command.go:734 +0x48 github.com/spf13/cobra.(_Command).execute(0x61f560, 0x0, 0x0, 0x0, 0x0, 0x0) /opt/gocode/src/github.com/spf13/cobra/command.go:355 +0x84 github.com/spf13/cobra.(_Command).Execute(0x61f560, 0x0, 0x0) /opt/gocode/src/github.com/spf13/cobra/command.go:416 +0x109 github.com/spf13/kaiju/commands.Execute() /opt/gocode/src/github.com/spf13/kaiju/commands/kaiju.go:40 +0x2c main.main() /opt/gocode/src/github.com/spf13/kaiju/main.go:22 +0x1b

goroutine 19 [finalizer wait]: runtime.park(0x11f20, 0x625604, 0x6241c9) /usr/local/go/src/pkg/runtime/proc.c:1369 +0x76 runtime.parkunlock(0x625604, 0x6241c9) /usr/local/go/src/pkg/runtime/proc.c:1385 +0x39 runfinq() /usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xb9 runtime.goexit() /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 20 [sleep]: time.Sleep(0x1dcd6500, 0x0) /usr/local/go/src/pkg/runtime/time.goc:39 +0x39 labix.org/v2/mgo.(*mongoCluster).syncServersLoop(0x11161600) /opt/gocode/src/labix.org/v2/mgo/cluster.go:342 +0x1b6 created by labix.org/v2/mgo.newCluster /opt/gocode/src/labix.org/v2/mgo/cluster.go:72 +0x113

goroutine 17 [syscall]: runtime.goexit() /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 23 [IO wait]: net.runtime_pollWait(0x31113778, 0x72, 0x0) /usr/local/go/src/pkg/runtime/netpoll.goc:146 +0x5c net.(_pollDesc).Wait(0x11164938, 0x72, 0x0, 0x0) /usr/local/go/src/pkg/net/fd_poll_runtime.go:84 +0x42 net.(_pollDesc).WaitRead(0x11164938, 0x0, 0x0) /usr/local/go/src/pkg/net/fd_poll_runtime.go:89 +0x40 net.(_netFD).Read(0x11164900, 0x1111b470, 0x24, 0x24, 0x0, 0x31112170, 0x23) /usr/local/go/src/pkg/net/fd_unix.go:232 +0x287 net.(_conn).Read(0x1110e8c8, 0x1111b470, 0x24, 0x24, 0x0, 0x0, 0x0) /usr/local/go/src/pkg/net/net.go:122 +0xc0 labix.org/v2/mgo.fill(0x311127c0, 0x1110e8c8, 0x1111b470, 0x24, 0x24, 0x0, 0x0) /opt/gocode/src/labix.org/v2/mgo/socket.go:489 +0x58 labix.org/v2/mgo.(*mongoSocket).readLoop(0x11161700) /opt/gocode/src/labix.org/v2/mgo/socket.go:506 +0x11f created by labix.org/v2/mgo.newSocket /opt/gocode/src/labix.org/v2/mgo/socket.go:163 +0x24a

goroutine 24 [sleep]: time.Sleep(0x2a05f200, 0x1) /usr/local/go/src/pkg/runtime/time.goc:39 +0x39 labix.org/v2/mgo.(*mongoServer).pinger(0x11102f00, 0x11102f01) /opt/gocode/src/labix.org/v2/mgo/server.go:284 +0xfa created by labix.org/v2/mgo.newServer /opt/gocode/src/labix.org/v2/mgo/server.go:87 +0xc5 exit status 2

thomasmodeneis commented 9 years ago

It works when I use the compiled one: $ ./main ERROR: 2014/12/21 Config not found... using only defaults, stuff may not work Running on port 2714 Socket.IO server listening on :2714 [9:03PM] Server listening on :2714.

Can you please run godep to save the dependencies and send it over? $ godep save That will help to identify what is wrong!!

spf13 commented 9 years ago

The problem here is that somewhere in Kaiju it's adding a flag two times (or the same shorthand letter a second time).

spf13 commented 9 years ago

This is not a problem with the deps, but a problem in the code. The deps may have changed to point out the error already present instead of silently failing.