Code Monkey home page Code Monkey logo

flynn-bootstrap's People

Contributors

danielsiders avatar discordianfish avatar lmars avatar titanous avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

flynn-bootstrap's Issues

flynn-bootstrap crash in run-app with default manifest: invalid memory address or nil pointer dereference

Hi,

I've set up a flynn cluster with two (I know, that a stupid size) nodes like that:

  • I've build flynn-host from my change here: flynn-archive/flynn-host#15 (it's on docker index as fish/flynn-host)
  • On both systems I ran flynn-host by pointing ETCD_DISCOVERY to discovery endpoint[1]

If I run flynn/bootstrap now (as pull from registry), I get:

$ docker run flynn/bootstrap
14:21:25.819427 run-app postgres
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x57f207]

goroutine 10 [running]:
runtime.panic(0x6d81a0, 0xa99fe8)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/flynn/rpcplus.(*Client).Close(0x0, 0x4be57f, 0x4be57f)
    /tmp/godep/rev/05/df3d30b6e55f5b440c1a78e2f83cb822bc0d76/src/github.com/flynn/rpcplus/client.go:353 +0xd7
github.com/flynn/go-flynn/cluster.(*Client).Close(0xc210054990, 0x0, 0x0)
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:150 +0x92
github.com/flynn/go-flynn/cluster.(*Client).followLeader(0xc210054990, 0xc210038de0)
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:119 +0x279
created by github.com/flynn/go-flynn/cluster.(*Client).start
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:85 +0x53

goroutine 1 [runnable]:
github.com/flynn/go-flynn/cluster.(*Client).start(0xc210054990, 0xc210054990, 0x0)
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:86 +0x6c
github.com/flynn/go-flynn/cluster.NewClientWithDial(0x0, 0x0, 0x0, 0x0, 0x652e60)
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:37 +0x6b
github.com/flynn/go-flynn/cluster.NewClient(0x409771, 0x6510c0, 0x0)
    /tmp/godep/rev/77/5d010f4f7ff91b144418ad74c6f6e285d50f49/src/github.com/flynn/go-flynn/cluster/client.go:26 +0x2f
github.com/flynn/flynn-bootstrap.(*State).ClusterClient(0xc21006a480, 0xc210061b00, 0xc21006aba0, 0x8)
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrap.go:26 +0x2f
github.com/flynn/flynn-bootstrap.(*RunAppAction).Run(0xc210061a80, 0xc21006a480, 0xc210047d20, 0x6bb200)
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/run_app_action.go:96 +0x7cf
github.com/flynn/flynn-bootstrap.Run(0xc210052800, 0x11d4, 0x13d4, 0xc2100383c0, 0x0, ...)
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrap.go:108 +0x5cc
main.main()
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrapper/bootstrapper.go:45 +0x2aa

goroutine 4 [chan receive]:
main.func·001()
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrapper/bootstrapper.go:39 +0x4e
created by main.main
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrapper/bootstrapper.go:43 +0x270

goroutine 8 [IO wait]:
net.runtime_pollWait(0x7fb31d820b10, 0x72, 0x0)
    /usr/local/go/src/pkg/runtime/netpoll.goc:116 +0x6a
net.(*pollDesc).Wait(0xc210047ed0, 0x72, 0x7fb31d81f0e8, 0xb)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:81 +0x34
net.(*pollDesc).WaitRead(0xc210047ed0, 0xb, 0x7fb31d81f0e8)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:86 +0x30
net.(*netFD).Read(0xc210047e70, 0xc21007c000, 0x1000, 0x1000, 0x0, ...)
    /usr/local/go/src/pkg/net/fd_unix.go:204 +0x2a0
net.(*conn).Read(0xc210000950, 0xc21007c000, 0x1000, 0x1000, 0x10000000040b2e4, ...)
    /usr/local/go/src/pkg/net/net.go:122 +0xc5
bufio.(*Reader).fill(0xc210038780)
    /usr/local/go/src/pkg/bufio/bufio.go:91 +0x110
bufio.(*Reader).Read(0xc210038780, 0xc2100700f0, 0x1, 0x9, 0x1, ...)
    /usr/local/go/src/pkg/bufio/bufio.go:159 +0x1a4
io.ReadAtLeast(0x7fb31d81fa58, 0xc210038780, 0xc2100700f0, 0x1, 0x9, ...)
    /usr/local/go/src/pkg/io/io.go:288 +0xf6
io.ReadFull(0x7fb31d81fa58, 0xc210038780, 0xc2100700f0, 0x1, 0x9, ...)
    /usr/local/go/src/pkg/io/io.go:306 +0x71
encoding/gob.decodeUintReader(0x7fb31d81fa58, 0xc210038780, 0xc2100700f0, 0x9, 0x9, ...)
    /usr/local/go/src/pkg/encoding/gob/decode.go:66 +0x98
encoding/gob.(*Decoder).recvMessage(0xc2100690f0, 0xc21005f4e0)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:73 +0x57
encoding/gob.(*Decoder).decodeTypeSequence(0xc2100690f0, 0xc21006a700, 0x160)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:159 +0x49
encoding/gob.(*Decoder).DecodeValue(0xc2100690f0, 0x636ee0, 0xc21006a780, 0x160, 0x0, ...)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:223 +0x12e
encoding/gob.(*Decoder).Decode(0xc2100690f0, 0x636ee0, 0xc21006a780, 0x0, 0x1)
    /usr/local/go/src/pkg/encoding/gob/decoder.go:202 +0x1c5
github.com/flynn/rpcplus.(*gobClientCodec).ReadResponseHeader(0xc21006a240, 0xc21006a780, 0x120, 0x635e60)
    /tmp/godep/rev/05/df3d30b6e55f5b440c1a78e2f83cb822bc0d76/src/github.com/flynn/rpcplus/client.go:278 +0x3f
github.com/flynn/rpcplus.(*Client).input(0xc2100387e0)
    /tmp/godep/rev/05/df3d30b6e55f5b440c1a78e2f83cb822bc0d76/src/github.com/flynn/rpcplus/client.go:138 +0xb8
created by github.com/flynn/rpcplus.NewClientWithCodec
    /tmp/godep/rev/05/df3d30b6e55f5b440c1a78e2f83cb822bc0d76/src/github.com/flynn/rpcplus/client.go:256 +0x91

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

goroutine 9 [chan receive]:
github.com/flynn/go-discoverd.func·001()
    /tmp/godep/rev/ef/8e9c70ed6335e8db5a66addfa96226f35e2bd3/src/github.com/flynn/go-discoverd/client.go:123 +0x5b
created by github.com/flynn/go-discoverd.(*serviceSet).bind
    /tmp/godep/rev/ef/8e9c70ed6335e8db5a66addfa96226f35e2bd3/src/github.com/flynn/go-discoverd/client.go:165 +0xcf

goroutine 11 [chan receive]:
github.com/flynn/go-discoverd.func·002()
    /tmp/godep/rev/ef/8e9c70ed6335e8db5a66addfa96226f35e2bd3/src/github.com/flynn/go-discoverd/client.go:224 +0x8d
created by github.com/flynn/go-discoverd.(*serviceSet).Leaders
    /tmp/godep/rev/ef/8e9c70ed6335e8db5a66addfa96226f35e2bd3/src/github.com/flynn/go-discoverd/client.go:230 +0xea

[1] I used ansible to deploy it, not that it matters but for completeness here is the task:


---
- name: run flynn-host
  docker:
    name: flynn-host
    image: fish/flynn-host
    env: "ETCD_DISCOVERY={{ flynn.etcd.discovery_url }}"
    volumes: "/var/run/docker.sock:/var/run/docker.sock"
    ports: "{{ ansible_int.ipv4.address }}:1113:1113"
    command: "-external {{ ansible_int.ipv4.address }} -bind {{ ansible_int.ipv4.address }}"

bootstrap without up cluster panics

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x5bb400]

goroutine 16 [running]:
runtime.panic(0x762900, 0x99a0f3)
    /usr/local/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/flynn/rpcplus.(*Client).send(0x0, 0xc2080281c0)
    /tmp/godep/rev/cd/680b2cd620be36cd39a58270c6a2894dd2e810/src/github.com/flynn/rpcplus/client.go:97 +0x310
github.com/flynn/rpcplus.(*Client).StreamGo(0x0, 0x7b8a30, 0xf, 0x68cba0, 0xc208062630, 0x69e600, 0xc2080045a0, 0x8)
    /tmp/godep/rev/cd/680b2cd620be36cd39a58270c6a2894dd2e810/src/github.com/flynn/rpcplus/client.go:406 +0x15f
github.com/flynn/go-discoverd.(*Client).newServiceSet(0xc2080621b0, 0x7c3890, 0xa, 0x9a4280, 0x0, 0x0)
    /tmp/godep/rev/03/25ff35b2495314ea7ebfc55e4e5b4408c3b78f/src/github.com/flynn/go-discoverd/client.go:370 +0xe1
github.com/flynn/go-discoverd.(*Client).NewServiceSet(0xc2080621b0, 0x7c3890, 0xa, 0x0, 0x0, 0x0, 0x0)
    /tmp/godep/rev/03/25ff35b2495314ea7ebfc55e4e5b4408c3b78f/src/github.com/flynn/go-discoverd/client.go:378 +0x67
github.com/flynn/go-discoverd.NewServiceSet(0x7c3890, 0xa, 0x0, 0x0, 0x0, 0x0)
    /tmp/godep/rev/03/25ff35b2495314ea7ebfc55e4e5b4408c3b78f/src/github.com/flynn/go-discoverd/client.go:596 +0xa1
github.com/flynn/flynn-bootstrap.checkOnlineHosts(0x1, 0xc2080625a0, 0x0, 0x0)
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrap.go:150 +0x54
github.com/flynn/flynn-bootstrap.Run(0xc208082000, 0x158a, 0x178a, 0xc208004360, 0x1, 0x0, 0x0)
    /home/vagrant/go/src/github.com/flynn/flynn-bootstrap/bootstrap.go:109 +0x3d7
main.main()
    /vagrant/src/flynn-bootstrap/bootstrapper/bootstrapper.go:51 +0x31e

goroutine 19 [finalizer wait]:
runtime.park(0x414a40, 0x99ec18, 0x99ce69)
    /usr/local/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0x99ec18, 0x99ce69)
    /usr/local/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
    /usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
    /usr/local/go/src/pkg/runtime/proc.c:1445

goroutine 21 [runnable]:
main.func·001()
    /vagrant/src/flynn-bootstrap/bootstrapper/bootstrapper.go:45 +0x61
created by main.main
    /vagrant/src/flynn-bootstrap/bootstrapper/bootstrapper.go:49 +0x2d7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.