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

cmd/cgo: bad pointer detected in private zlib wrapper #13928

Closed
jtsylve opened this issue Jan 12, 2016 · 19 comments

Comments

@jtsylve
Copy link
Contributor

commented Jan 12, 2016

I'm running tip on darwin/386 and I'm seeing an occasional panic.

I've got a wrapper for zlib that's quite a bit faster than the zlib reader in the standard library. Under specific conditions in my application I get a panic: runtime error: cgo argument has invalid Go pointer.

My code is similar to the following:

// #cgo LDFLAGS: -lz
// #include <zlib.h>
// #include <stdlib.h>
//
// // inflateInit is a macro so we need to do this
// int InflateInit(z_streamp s) {
//     return inflateInit(s);
// }
//
// // We do the zstream allocation in C, so that the Go
// // GC doesn't inspect the pointers inside that are
// // allocated by zlib and panic.
// z_streamp new_zstream() {
//     return (z_streamp) calloc(sizeof(z_stream), 1);
// }
import "C"

import (
    "errors"
    "io"
)

type reader struct {
    r  io.Reader
    in []byte
    s  C.z_streamp
}

// NewReader creates a new ReadCloser. Reads from the returned ReadCloser
// read and decompress data from r. The implementation buffers input and
// may read more data than necessary from r. It is the caller's
// responsibility to call Close on the ReadCloser when done.
func NewReader(r io.Reader) (io.ReadCloser, error) {
    rd := &reader{
        r:  r,
        s:  C.new_zstream(),
        in: bufPool.Get().([]byte),
    }

    err := C.InflateInit(rd.s) // <-- panic here (sometimes)
    if err != C.Z_OK {
        return nil, errors.New("Could not init inflate.")
    }

    return rd, nil
}

Sometimes (not every time) when NewReader is called a panic is triggered on the call to C.InflateInit. From what I understand this panic is only ever triggered by cgoCheckUnknownPointer if the pointer exists on the Go heap. The pointer is returned by a C call to calloc, so should not exist on the Go heap, it should be C controlled memory.

Is this a bug or am I doing something wrong?

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 12, 2016

Oh it may also be worth mentioning that I have my code compiled to a c-shared library a linked to a larger OS X application.

@ianlancetaylor ianlancetaylor added this to the Go1.6 milestone Jan 12, 2016

@ianlancetaylor ianlancetaylor self-assigned this Jan 12, 2016

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 12, 2016

Please run your program with the environment variable GOTRACEBACK=2 and show us the complete stack trace.

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

panic: runtime error: cgo argument has invalid Go pointer

goroutine 169 [running]:
runtime.gopanic(0x2e3a4a0, 0x16bd0048)
    /Users/joe/Downloads/go/src/runtime/panic.go:464 +0x31a fp=0x1493dc60 sp=0x1493dc1c
runtime.cgoCheckUnknownPointer(0x3c7d4e70, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1493dcbc sp=0x1493dc60
runtime.cgoCheckArg(0x2e10da0, 0x3c7d4e70, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1493dd38 sp=0x1493dcbc
runtime.cgoCheckPointer(0x2e10da0, 0x3c7d4e70, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1493dd60 sp=0x1493dd38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2c52e1b0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1493ddb4 sp=0x1493dd60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2c52e1b0, 0x1905, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1493df34 sp=0x1493ddb4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1493dfc8 sp=0x1493df34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1493dfcc sp=0x1493dfc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 17 [runnable, locked to thread]:
runtime.selectnbrecv(0x2e16160, 0x1493adc4, 0x1b81e080, 0x2e15f00)
    /Users/joe/Downloads/go/src/runtime/chan.go:583 fp=0x1493ad7c sp=0x1493ad78
go4n6/ioutil.(*LookaheadReader).Get(0x1491c070, 0x1900, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:225 +0x364 fp=0x1493adf8 sp=0x1493ad7c
go4n6/disk/ewf.(*segment).Read(0x149a85a0, 0x3587dc00, 0x800, 0x800, 0x800, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:140 +0x1dc fp=0x1493ae54 sp=0x1493adf8
go4n6/ioutil.(*MultiReadSeeker).Read(0x1496e2a0, 0x3587dc00, 0x800, 0x800, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/multi.go:92 +0x1de fp=0x1493aef4 sp=0x1493ae54
main.libbbtewf_read(0x8, 0x3587dc00, 0xbfffd760, 0xbfffd768, 0x0)
    /Users/joe/src/repo004/GOPATH/src/libbbtewf/libbbtewf.go:468 +0xfb fp=0x1493af3c sp=0x1493aef4
main._cgoexpwrap_7a988ec7975c_libbbtewf_read(0x8, 0x3587dc00, 0xbfffd760, 0xbfffd768, 0x3587dc00)
    ??:0 +0x33 fp=0x1493af54 sp=0x1493af3c
runtime.call32(0x0, 0xbfffd630, 0xbfffd678, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:489 +0x34 fp=0x1493af78 sp=0x1493af54
runtime.cgocallbackg1()
    /Users/joe/Downloads/go/src/runtime/cgocall.go:267 +0xd8 fp=0x1493af98 sp=0x1493af78
runtime.cgocallbackg()
    /Users/joe/Downloads/go/src/runtime/cgocall.go:180 +0xb3 fp=0x1493afc8 sp=0x1493af98
runtime.cgocallback_gofunc(0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:698 +0x3e fp=0x1493afd8 sp=0x1493afc8
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1493afdc sp=0x1493afd8

goroutine 2 [force gc (idle)]:
runtime.gopark(0x2e8a348, 0x2efddb0, 0x2e62430, 0xf, 0x1428d314, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x149287ac sp=0x14928798
runtime.goparkunlock(0x2efddb0, 0x2e62430, 0xf, 0x14900014, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x149287c8 sp=0x149287ac
runtime.forcegchelper()
    /Users/joe/Downloads/go/src/runtime/proc.go:229 +0x9e fp=0x149287e0 sp=0x149287c8
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x149287e4 sp=0x149287e0
created by runtime.init.4
    /Users/joe/Downloads/go/src/runtime/proc.go:218 +0x24

goroutine 18 [GC sweep wait]:
runtime.gopark(0x2e8a348, 0x2efde10, 0x2e61920, 0xd, 0x2d7a114, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x149247a0 sp=0x1492478c
runtime.goparkunlock(0x2efde10, 0x2e61920, 0xd, 0x14, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x149247bc sp=0x149247a0
runtime.bgsweep(0x1496c000)
    /Users/joe/Downloads/go/src/runtime/mgcsweep.go:79 +0x119 fp=0x149247d8 sp=0x149247bc
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x149247dc sp=0x149247d8
created by runtime.gcenable
    /Users/joe/Downloads/go/src/runtime/mgc.go:191 +0x4c

goroutine 19 [finalizer wait]:
runtime.gopark(0x2e8a348, 0x2ef974c, 0x2e62360, 0xe, 0x14, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14924f8c sp=0x14924f78
runtime.goparkunlock(0x2ef974c, 0x2e62360, 0xe, 0x14, 0x1)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14924fa8 sp=0x14924f8c
runtime.runfinq()
    /Users/joe/Downloads/go/src/runtime/mfinal.go:158 +0x92 fp=0x14924fe0 sp=0x14924fa8
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14924fe4 sp=0x14924fe0
created by runtime.createfing
    /Users/joe/Downloads/go/src/runtime/mfinal.go:139 +0x56

goroutine 34 [syscall, locked to thread]:
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14936fdc sp=0x14936fd8

goroutine 35 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x14d68000, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d54794 sp=0x14d54780
runtime.gcBgMarkWorker(0x1491e000)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d547d8 sp=0x14d54794
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d547dc sp=0x14d547d8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 36 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1498c280, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d54f94 sp=0x14d54f80
runtime.gcBgMarkWorker(0x1491ea00)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d54fd8 sp=0x14d54f94
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d54fdc sp=0x14d54fd8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 37 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1495e000, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d55794 sp=0x14d55780
runtime.gcBgMarkWorker(0x1491f400)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d557d8 sp=0x14d55794
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d557dc sp=0x14d557d8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 38 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1498c500, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d55f94 sp=0x14d55f80
runtime.gcBgMarkWorker(0x14920000)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d55fd8 sp=0x14d55f94
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d55fdc sp=0x14d55fd8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 39 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1492c780, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d56794 sp=0x14d56780
runtime.gcBgMarkWorker(0x14920a00)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d567d8 sp=0x14d56794
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d567dc sp=0x14d567d8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 40 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x14d68280, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d56f94 sp=0x14d56f80
runtime.gcBgMarkWorker(0x14921400)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d56fd8 sp=0x14d56f94
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d56fdc sp=0x14d56fd8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 41 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1498c780, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d57794 sp=0x14d57780
runtime.gcBgMarkWorker(0x14922000)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d577d8 sp=0x14d57794
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d577dc sp=0x14d577d8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 42 [GC worker (idle)]:
runtime.gopark(0x2e8a29c, 0x1492c500, 0x2e64ca0, 0x10, 0x14, 0x0)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d57f94 sp=0x14d57f80
runtime.gcBgMarkWorker(0x14922a00)
    /Users/joe/Downloads/go/src/runtime/mgc.go:1378 +0xf2 fp=0x14d57fd8 sp=0x14d57f94
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d57fdc sp=0x14d57fd8
created by runtime.gcBgMarkStartWorkers
    /Users/joe/Downloads/go/src/runtime/mgc.go:1325 +0x74

goroutine 52 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f02440, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1492b730 sp=0x1492b71c
runtime.goparkunlock(0x2f02440, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1492b74c sp=0x1492b730
runtime.semacquire(0x16bda02c, 0x14d6a301)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x1492b780 sp=0x1492b74c
sync.runtime_Semacquire(0x16bda02c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x1492b78c sp=0x1492b780
sync.(*WaitGroup).Wait(0x16bda020)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x1492b7b4 sp=0x1492b78c
go4n6/ioutil.(*LookaheadReader).start(0x14978000)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x1492b7d8 sp=0x1492b7b4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1492b7dc sp=0x1492b7d8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 67 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f05b80, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14928f30 sp=0x14928f1c
runtime.goparkunlock(0x2f05b80, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14928f4c sp=0x14928f30
runtime.semacquire(0x19be202c, 0x1498ef01)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x14928f80 sp=0x14928f4c
sync.runtime_Semacquire(0x19be202c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x14928f8c sp=0x14928f80
sync.(*WaitGroup).Wait(0x19be2020)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x14928fb4 sp=0x14928f8c
go4n6/ioutil.(*LookaheadReader).start(0x14978070)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x14928fd8 sp=0x14928fb4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14928fdc sp=0x14928fd8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 43 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf8ebc sp=0x16bf8ea8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x1492c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf8ed8 sp=0x16bf8ebc
runtime.chansend(0x2e16160, 0x1499c040, 0x16bf8f84, 0x2e3dc01, 0x2dd3946, 0x16bd7140)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf8f20 sp=0x16bf8ed8
runtime.chansend1(0x2e16160, 0x1499c040, 0x16bf8f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf8f3c sp=0x16bf8f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf8fd0 sp=0x16bf8f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf8fd4 sp=0x16bf8fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 44 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf96bc sp=0x16bf96a8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x14d68216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf96d8 sp=0x16bf96bc
runtime.chansend(0x2e16160, 0x1499c040, 0x16bf9784, 0x2e3dc01, 0x2dd3946, 0x16bceac0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf9720 sp=0x16bf96d8
runtime.chansend1(0x2e16160, 0x1499c040, 0x16bf9784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf973c sp=0x16bf9720
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf97d0 sp=0x16bf973c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf97d4 sp=0x16bf97d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 45 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf9ebc sp=0x16bf9ea8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x1495e016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf9ed8 sp=0x16bf9ebc
runtime.chansend(0x2e16160, 0x1499c040, 0x16bf9f84, 0x2e3dc01, 0x2dd3946, 0x1496aac0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf9f20 sp=0x16bf9ed8
runtime.chansend1(0x2e16160, 0x1499c040, 0x16bf9f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf9f3c sp=0x16bf9f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf9fd0 sp=0x16bf9f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf9fd4 sp=0x16bf9fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 46 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d506bc sp=0x14d506a8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x1492c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14d506d8 sp=0x14d506bc
runtime.chansend(0x2e16160, 0x1499c040, 0x14d50784, 0x2e3dc01, 0x2dd3946, 0x14910980)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14d50720 sp=0x14d506d8
runtime.chansend1(0x2e16160, 0x1499c040, 0x14d50784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14d5073c sp=0x14d50720
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14d507d0 sp=0x14d5073c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d507d4 sp=0x14d507d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 47 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d50ebc sp=0x14d50ea8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14d50ed8 sp=0x14d50ebc
runtime.chansend(0x2e16160, 0x1499c040, 0x14d50f84, 0x2e3dc01, 0x2dd3946, 0x16c407c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14d50f20 sp=0x14d50ed8
runtime.chansend1(0x2e16160, 0x1499c040, 0x14d50f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14d50f3c sp=0x14d50f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14d50fd0 sp=0x14d50f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d50fd4 sp=0x14d50fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 48 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d516bc sp=0x14d516a8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x1498c216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14d516d8 sp=0x14d516bc
runtime.chansend(0x2e16160, 0x1499c040, 0x14d51784, 0x2e3dc01, 0x2dd3946, 0x16bfaa00)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14d51720 sp=0x14d516d8
runtime.chansend1(0x2e16160, 0x1499c040, 0x14d51784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14d5173c sp=0x14d51720
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14d517d0 sp=0x14d5173c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d517d4 sp=0x14d517d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 49 [chan send]:
runtime.gopark(0x2e8a348, 0x1499c070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14d51ebc sp=0x14d51ea8
runtime.goparkunlock(0x1499c070, 0x2e5ee10, 0x9, 0x14d68016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14d51ed8 sp=0x14d51ebc
runtime.chansend(0x2e16160, 0x1499c040, 0x14d51f84, 0x2e3dc01, 0x2dd3946, 0x14998ae0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14d51f20 sp=0x14d51ed8
runtime.chansend1(0x2e16160, 0x1499c040, 0x14d51f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14d51f3c sp=0x14d51f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x16bda020, 0x14978000, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14d51fd0 sp=0x14d51f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14d51fd4 sp=0x14d51fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 90 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f04c80, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14929730 sp=0x1492971c
runtime.goparkunlock(0x2f04c80, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1492974c sp=0x14929730
runtime.semacquire(0x1ad8202c, 0x14d6a401)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x14929780 sp=0x1492974c
sync.runtime_Semacquire(0x1ad8202c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x1492978c sp=0x14929780
sync.(*WaitGroup).Wait(0x1ad82020)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x149297b4 sp=0x1492978c
go4n6/ioutil.(*LookaheadReader).start(0x149781c0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x149297d8 sp=0x149297b4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x149297dc sp=0x149297d8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 68 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad9aebc sp=0x1ad9aea8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x1498c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad9aed8 sp=0x1ad9aebc
runtime.chansend(0x2e16160, 0x1ad86040, 0x1ad9af84, 0x2e3dc01, 0x2dd3946, 0x149983c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad9af20 sp=0x1ad9aed8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x1ad9af84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9af3c sp=0x1ad9af20
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad9afd0 sp=0x1ad9af3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad9afd4 sp=0x1ad9afd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 83 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf4ebc sp=0x16bf4ea8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x1498c216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf4ed8 sp=0x16bf4ebc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf4f84, 0x2e3dc01, 0x2dd3946, 0x16bfa6e0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf4f20 sp=0x16bf4ed8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf4f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf4f3c sp=0x16bf4f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf4fd0 sp=0x16bf4f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf4fd4 sp=0x16bf4fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 84 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf56bc sp=0x16bf56a8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x1492c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf56d8 sp=0x16bf56bc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf5784, 0x2e3dc01, 0x2dd3946, 0x16bd6e80)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf5720 sp=0x16bf56d8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf5784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf573c sp=0x16bf5720
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf57d0 sp=0x16bf573c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf57d4 sp=0x16bf57d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 85 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf5ebc sp=0x16bf5ea8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x1492c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf5ed8 sp=0x16bf5ebc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf5f84, 0x2e3dc01, 0x2dd3946, 0x149106c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf5f20 sp=0x16bf5ed8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf5f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf5f3c sp=0x16bf5f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf5fd0 sp=0x16bf5f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf5fd4 sp=0x16bf5fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 86 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf66bc sp=0x16bf66a8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf66d8 sp=0x16bf66bc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf6784, 0x2e3dc01, 0x2dd3946, 0x16c405c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf6720 sp=0x16bf66d8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf6784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf673c sp=0x16bf6720
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf67d0 sp=0x16bf673c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf67d4 sp=0x16bf67d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 87 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf6ebc sp=0x16bf6ea8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x14d68216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf6ed8 sp=0x16bf6ebc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf6f84, 0x2e3dc01, 0x2dd3946, 0x16bce840)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf6f20 sp=0x16bf6ed8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf6f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf6f3c sp=0x16bf6f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf6fd0 sp=0x16bf6f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf6fd4 sp=0x16bf6fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 88 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf76bc sp=0x16bf76a8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x1495e016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf76d8 sp=0x16bf76bc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf7784, 0x2e3dc01, 0x2dd3946, 0x1496a840)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf7720 sp=0x16bf76d8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf7784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf773c sp=0x16bf7720
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf77d0 sp=0x16bf773c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf77d4 sp=0x16bf77d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 89 [chan send]:
runtime.gopark(0x2e8a348, 0x19bd2070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf7ebc sp=0x16bf7ea8
runtime.goparkunlock(0x19bd2070, 0x2e5ee10, 0x9, 0x14d68016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf7ed8 sp=0x16bf7ebc
runtime.chansend(0x2e16160, 0x19bd2040, 0x16bf7f84, 0x2e3dc01, 0x2dd3946, 0x14998860)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf7f20 sp=0x16bf7ed8
runtime.chansend1(0x2e16160, 0x19bd2040, 0x16bf7f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf7f3c sp=0x16bf7f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x19be2020, 0x14978070, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf7fd0 sp=0x16bf7f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf7fd4 sp=0x16bf7fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 132 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad97ebc sp=0x1ad97ea8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x1498c216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad97ed8 sp=0x1ad97ebc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad97f84, 0x2e3dc01, 0x2dd3946, 0x16c40a20)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad97f20 sp=0x1ad97ed8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad97f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad97f3c sp=0x1ad97f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad97fd0 sp=0x1ad97f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad97fd4 sp=0x1ad97fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 95 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x149256bc sp=0x149256a8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x149256d8 sp=0x149256bc
runtime.chansend(0x2e16160, 0x1496c140, 0x14925784, 0x2e3dc01, 0x2dd3946, 0x16bce7e0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14925720 sp=0x149256d8
runtime.chansend1(0x2e16160, 0x1496c140, 0x14925784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1492573c sp=0x14925720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x149257d0 sp=0x1492573c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x149257d4 sp=0x149257d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 96 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14929ebc sp=0x14929ea8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14929ed8 sp=0x14929ebc
runtime.chansend(0x2e16160, 0x1496c140, 0x14929f84, 0x2e3dc01, 0x2dd3946, 0x16bce9e0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14929f20 sp=0x14929ed8
runtime.chansend1(0x2e16160, 0x1496c140, 0x14929f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14929f3c sp=0x14929f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14929fd0 sp=0x14929f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14929fd4 sp=0x14929fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 94 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14927ebc sp=0x14927ea8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1492c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14927ed8 sp=0x14927ebc
runtime.chansend(0x2e16160, 0x1496c140, 0x14927f84, 0x2e3dc01, 0x2dd3946, 0x16c40360)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x14927f20 sp=0x14927ed8
runtime.chansend1(0x2e16160, 0x1496c140, 0x14927f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x14927f3c sp=0x14927f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x14927fd0 sp=0x14927f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14927fd4 sp=0x14927fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 50 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad96ebc sp=0x1ad96ea8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x14d68016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad96ed8 sp=0x1ad96ebc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad96f84, 0x2e3dc01, 0x2dd3946, 0x16bfab40)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad96f20 sp=0x1ad96ed8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad96f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad96f3c sp=0x1ad96f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad96fd0 sp=0x1ad96f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad96fd4 sp=0x1ad96fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 131 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad976bc sp=0x1ad976a8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x1492c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad976d8 sp=0x1ad976bc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad97784, 0x2e3dc01, 0x2dd3946, 0x1496bd00)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad97720 sp=0x1ad976d8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad97784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9773c sp=0x1ad97720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad977d0 sp=0x1ad9773c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad977d4 sp=0x1ad977d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 56 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f02c40, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1492bf30 sp=0x1492bf1c
runtime.goparkunlock(0x2f02c40, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1492bf4c sp=0x1492bf30
runtime.semacquire(0x2831a02c, 0x14961601)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x1492bf80 sp=0x1492bf4c
sync.runtime_Semacquire(0x2831a02c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x1492bf8c sp=0x1492bf80
sync.(*WaitGroup).Wait(0x2831a020)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x1492bfb4 sp=0x1492bf8c
go4n6/ioutil.(*LookaheadReader).start(0x14978230)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x1492bfd8 sp=0x1492bfb4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1492bfdc sp=0x1492bfd8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 93 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x2c4f3ebc sp=0x2c4f3ea8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x2c4f3ed8 sp=0x2c4f3ebc
runtime.chansend(0x2e16160, 0x1496c140, 0x2c4f3f84, 0x2e3dc01, 0x2dd3946, 0x16bce8e0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x2c4f3f20 sp=0x2c4f3ed8
runtime.chansend1(0x2e16160, 0x1496c140, 0x2c4f3f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x2c4f3f3c sp=0x2c4f3f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x2c4f3fd0 sp=0x2c4f3f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x2c4f3fd4 sp=0x2c4f3fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 69 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad9b6bc sp=0x1ad9b6a8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x1498c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad9b6d8 sp=0x1ad9b6bc
runtime.chansend(0x2e16160, 0x1ad86040, 0x1ad9b784, 0x2e3dc01, 0x2dd3946, 0x16bfa2a0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad9b720 sp=0x1ad9b6d8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x1ad9b784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9b73c sp=0x1ad9b720
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad9b7d0 sp=0x1ad9b73c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad9b7d4 sp=0x1ad9b7d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 70 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad9bebc sp=0x1ad9bea8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x1498c216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad9bed8 sp=0x1ad9bebc
runtime.chansend(0x2e16160, 0x1ad86040, 0x1ad9bf84, 0x2e3dc01, 0x2dd3946, 0x14910460)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad9bf20 sp=0x1ad9bed8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x1ad9bf84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9bf3c sp=0x1ad9bf20
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad9bfd0 sp=0x1ad9bf3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad9bfd4 sp=0x1ad9bfd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 71 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf26bc sp=0x16bf26a8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x14d68016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf26d8 sp=0x16bf26bc
runtime.chansend(0x2e16160, 0x1ad86040, 0x16bf2784, 0x2e3dc01, 0x2dd3946, 0x16bd62c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf2720 sp=0x16bf26d8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x16bf2784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf273c sp=0x16bf2720
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf27d0 sp=0x16bf273c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf27d4 sp=0x16bf27d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 72 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf2ebc sp=0x16bf2ea8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x14d68216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf2ed8 sp=0x16bf2ebc
runtime.chansend(0x2e16160, 0x1ad86040, 0x16bf2f84, 0x2e3dc01, 0x2dd3946, 0x16c15f80)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf2f20 sp=0x16bf2ed8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x16bf2f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf2f3c sp=0x16bf2f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf2fd0 sp=0x16bf2f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf2fd4 sp=0x16bf2fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 73 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf36bc sp=0x16bf36a8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x1492c516, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf36d8 sp=0x16bf36bc
runtime.chansend(0x2e16160, 0x1ad86040, 0x16bf3784, 0x2e3dc01, 0x2dd3946, 0x1496a4e0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf3720 sp=0x16bf36d8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x16bf3784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf373c sp=0x16bf3720
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf37d0 sp=0x16bf373c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf37d4 sp=0x16bf37d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 74 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad86070, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x16bf3ebc sp=0x16bf3ea8
runtime.goparkunlock(0x1ad86070, 0x2e5ee10, 0x9, 0x1492c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x16bf3ed8 sp=0x16bf3ebc
runtime.chansend(0x2e16160, 0x1ad86040, 0x16bf3f84, 0x2e3dc01, 0x2dd3946, 0x16bce380)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x16bf3f20 sp=0x16bf3ed8
runtime.chansend1(0x2e16160, 0x1ad86040, 0x16bf3f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x16bf3f3c sp=0x16bf3f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x1ad82020, 0x149781c0, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x16bf3fd0 sp=0x16bf3f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x16bf3fd4 sp=0x16bf3fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 58 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f03440, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x14926f30 sp=0x14926f1c
runtime.goparkunlock(0x2f03440, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x14926f4c sp=0x14926f30
runtime.semacquire(0x2c52e19c, 0x14901201)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x14926f80 sp=0x14926f4c
sync.runtime_Semacquire(0x2c52e19c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x14926f8c sp=0x14926f80
sync.(*WaitGroup).Wait(0x2c52e190)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x14926fb4 sp=0x14926f8c
go4n6/ioutil.(*LookaheadReader).start(0x1491c070)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x14926fd8 sp=0x14926fb4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x14926fdc sp=0x14926fd8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 127 [semacquire]:
runtime.gopark(0x2e8a348, 0x2f03600, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad95730 sp=0x1ad9571c
runtime.goparkunlock(0x2f03600, 0x2e604d0, 0xa, 0x19, 0x4)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad9574c sp=0x1ad95730
runtime.semacquire(0x2c4e802c, 0x14901401)
    /Users/joe/Downloads/go/src/runtime/sema.go:104 +0x2b5 fp=0x1ad95780 sp=0x1ad9574c
sync.runtime_Semacquire(0x2c4e802c)
    /Users/joe/Downloads/go/src/runtime/sema.go:47 +0x20 fp=0x1ad9578c sp=0x1ad95780
sync.(*WaitGroup).Wait(0x2c4e8020)
    /Users/joe/Downloads/go/src/sync/waitgroup.go:127 +0x9e fp=0x1ad957b4 sp=0x1ad9578c
go4n6/ioutil.(*LookaheadReader).start(0x14978310)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:439 +0xbf fp=0x1ad957d8 sp=0x1ad957b4
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad957dc sp=0x1ad957d8
created by go4n6/ioutil.(*LookaheadReader).Get
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:205 +0x1e6

goroutine 91 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x2c4f2ebc sp=0x2c4f2ea8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1498c216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x2c4f2ed8 sp=0x2c4f2ebc
runtime.chansend(0x2e16160, 0x1496c140, 0x2c4f2f84, 0x2e3dc01, 0x2dd3946, 0x14998320)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x2c4f2f20 sp=0x2c4f2ed8
runtime.chansend1(0x2e16160, 0x1496c140, 0x2c4f2f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x2c4f2f3c sp=0x2c4f2f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x2c4f2fd0 sp=0x2c4f2f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x2c4f2fd4 sp=0x2c4f2fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 133 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad986bc sp=0x1ad986a8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x1495e016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad986d8 sp=0x1ad986bc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad98784, 0x2e3dc01, 0x2dd3946, 0x16bd6de0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad98720 sp=0x1ad986d8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad98784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9873c sp=0x1ad98720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad987d0 sp=0x1ad9873c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad987d4 sp=0x1ad987d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 134 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad98ebc sp=0x1ad98ea8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x1492c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad98ed8 sp=0x1ad98ebc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad98f84, 0x2e3dc01, 0x2dd3946, 0x14910ce0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad98f20 sp=0x1ad98ed8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad98f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad98f3c sp=0x1ad98f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad98fd0 sp=0x1ad98f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad98fd4 sp=0x1ad98fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 135 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad996bc sp=0x1ad996a8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x1498c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad996d8 sp=0x1ad996bc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad99784, 0x2e3dc01, 0x2dd3946, 0x14998b40)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad99720 sp=0x1ad996d8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad99784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad9973c sp=0x1ad99720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad997d0 sp=0x1ad9973c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad997d4 sp=0x1ad997d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 136 [chan send]:
runtime.gopark(0x2e8a348, 0x1ad860f0, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1ad99ebc sp=0x1ad99ea8
runtime.goparkunlock(0x1ad860f0, 0x2e5ee10, 0x9, 0x14d68216, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1ad99ed8 sp=0x1ad99ebc
runtime.chansend(0x2e16160, 0x1ad860c0, 0x1ad99f84, 0x2e3dc01, 0x2dd3946, 0x16bcea20)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1ad99f20 sp=0x1ad99ed8
runtime.chansend1(0x2e16160, 0x1ad860c0, 0x1ad99f84)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1ad99f3c sp=0x1ad99f20
go4n6/ioutil.(*LookaheadReader).start.func1(0x2831a020, 0x14978230, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1ad99fd0 sp=0x1ad99f3c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1ad99fd4 sp=0x1ad99fd0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 92 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x2c4f36bc sp=0x2c4f36a8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1495e016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x2c4f36d8 sp=0x2c4f36bc
runtime.chansend(0x2e16160, 0x1496c140, 0x2c4f3784, 0x2e3dc01, 0x2dd3946, 0x2b04a5c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x2c4f3720 sp=0x2c4f36d8
runtime.chansend1(0x2e16160, 0x1496c140, 0x2c4f3784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x2c4f373c sp=0x2c4f3720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x2c4f37d0 sp=0x2c4f373c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x2c4f37d4 sp=0x2c4f37d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 97 [chan send]:
runtime.gopark(0x2e8a348, 0x1496c170, 0x2e5ee10, 0x9, 0x8016, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:262 +0x11e fp=0x1492a6bc sp=0x1492a6a8
runtime.goparkunlock(0x1496c170, 0x2e5ee10, 0x9, 0x1498c716, 0x3)
    /Users/joe/Downloads/go/src/runtime/proc.go:268 +0x45 fp=0x1492a6d8 sp=0x1492a6bc
runtime.chansend(0x2e16160, 0x1496c140, 0x1492a784, 0x2e3dc01, 0x2dd3946, 0x16bd66c0)
    /Users/joe/Downloads/go/src/runtime/chan.go:213 +0x38c fp=0x1492a720 sp=0x1492a6d8
runtime.chansend1(0x2e16160, 0x1496c140, 0x1492a784)
    /Users/joe/Downloads/go/src/runtime/chan.go:100 +0x38 fp=0x1492a73c sp=0x1492a720
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c4e8020, 0x14978310, 0x6)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:432 +0x4e6 fp=0x1492a7d0 sp=0x1492a73c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1492a7d4 sp=0x1492a7d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 163 [runnable]:
runtime.call16(0x0, 0x2e8a3b8, 0x16bceb7c, 0x4, 0x4)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:488 fp=0x1f6dac1c sp=0x1f6dac18
runtime.gopanic(0x2e3a4a0, 0x1490a068)
    /Users/joe/Downloads/go/src/runtime/panic.go:426 +0x3f1 fp=0x1f6dac60 sp=0x1f6dac1c
runtime.cgoCheckUnknownPointer(0x3f195510, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1f6dacbc sp=0x1f6dac60
runtime.cgoCheckArg(0x2e10da0, 0x3f195510, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1f6dad38 sp=0x1f6dacbc
runtime.cgoCheckPointer(0x2e10da0, 0x3f195510, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1f6dad60 sp=0x1f6dad38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2ca50330, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1f6dadb4 sp=0x1f6dad60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2ca50330, 0x1901, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1f6daf34 sp=0x1f6dadb4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1f6dafc8 sp=0x1f6daf34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1f6dafcc sp=0x1f6dafc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 164 [runnable]:
runtime.call16(0x0, 0x2e8a3b8, 0x1499837c, 0x4, 0x4)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:488 fp=0x1f6d6c1c sp=0x1f6d6c18
runtime.gopanic(0x2e3a4a0, 0x16c28030)
    /Users/joe/Downloads/go/src/runtime/panic.go:426 +0x3f1 fp=0x1f6d6c60 sp=0x1f6d6c1c
runtime.cgoCheckUnknownPointer(0x3c7d4d80, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1f6d6cbc sp=0x1f6d6c60
runtime.cgoCheckArg(0x2e10da0, 0x3c7d4d80, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1f6d6d38 sp=0x1f6d6cbc
runtime.cgoCheckPointer(0x2e10da0, 0x3c7d4d80, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1f6d6d60 sp=0x1f6d6d38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2ca44220, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1f6d6db4 sp=0x1f6d6d60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2ca44220, 0x1900, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1f6d6f34 sp=0x1f6d6db4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x1)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1f6d6fc8 sp=0x1f6d6f34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1f6d6fcc sp=0x1f6d6fc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 165 [runnable]:
syscall.Syscall6(0x46, 0xffff8364, 0xffffffff, 0x1, 0x0, 0x0, 0x0, 0xc2950a6, 0x0, 0x0)
    /Users/joe/Downloads/go/src/syscall/asm_darwin_386.s:41 +0x5 fp=0x2ec2d4e0 sp=0x2ec2d4dc
syscall.Seek(0x46, 0xffff8364, 0xffffffff, 0x1, 0x2e10da0, 0x325e510, 0x0, 0x0)
    /Users/joe/Downloads/go/src/syscall/zsyscall_darwin_386.go:1060 +0x5b fp=0x2ec2d50c sp=0x2ec2d4e0
os.(*File).seek(0x14974198, 0xffff8364, 0xffffffff, 0x1, 0x8000, 0x8000, 0x0, 0x0)
    /Users/joe/Downloads/go/src/os/file_unix.go:283 +0x44 fp=0x2ec2d530 sp=0x2ec2d50c
os.(*File).Seek(0x14974198, 0xffff8364, 0xffffffff, 0x1, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/os/file.go:181 +0x71 fp=0x2ec2d56c sp=0x2ec2d530
go4n6/compress/zlib.(*reader).Close(0x2b04a940, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:144 +0xa6 fp=0x2ec2d5bc sp=0x2ec2d56c
go4n6/disk/ewf.decompress(0x46f910e0, 0x2c54c120, 0x1903, 0x0, 0x2e4ad60, 0x149a85a0, 0x1f6c0000, 0x8000, 0x8000, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:314 +0x4f4 fp=0x2ec2d73c sp=0x2ec2d5bc
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x2)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x2ec2d7d0 sp=0x2ec2d73c
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x2ec2d7d4 sp=0x2ec2d7d0
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 166 [runnable]:
runtime.call16(0x0, 0x2e8a3b8, 0x16c400bc, 0x4, 0x4)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:488 fp=0x1f6e6c1c sp=0x1f6e6c18
runtime.gopanic(0x2e3a4a0, 0x1499e008)
    /Users/joe/Downloads/go/src/runtime/panic.go:426 +0x3f1 fp=0x1f6e6c60 sp=0x1f6e6c1c
runtime.cgoCheckUnknownPointer(0x3f300000, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1f6e6cbc sp=0x1f6e6c60
runtime.cgoCheckArg(0x2e10da0, 0x3f300000, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1f6e6d38 sp=0x1f6e6cbc
runtime.cgoCheckPointer(0x2e10da0, 0x3f300000, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1f6e6d60 sp=0x1f6e6d38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2ca312f0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1f6e6db4 sp=0x1f6e6d60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2ca312f0, 0x1904, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1f6e6f34 sp=0x1f6e6db4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x3)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1f6e6fc8 sp=0x1f6e6f34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1f6e6fcc sp=0x1f6e6fc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 167 [runnable]:
runtime.call16(0x0, 0x2e8a3b8, 0x16bceafc, 0x4, 0x4)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:488 fp=0x1f6dec1c sp=0x1f6dec18
runtime.gopanic(0x2e3a4a0, 0x16bc4078)
    /Users/joe/Downloads/go/src/runtime/panic.go:426 +0x3f1 fp=0x1f6dec60 sp=0x1f6dec1c
runtime.cgoCheckUnknownPointer(0x46742db0, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1f6decbc sp=0x1f6dec60
runtime.cgoCheckArg(0x2e10da0, 0x46742db0, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1f6ded38 sp=0x1f6decbc
runtime.cgoCheckPointer(0x2e10da0, 0x46742db0, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1f6ded60 sp=0x1f6ded38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2c4e81f0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1f6dedb4 sp=0x1f6ded60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2c4e81f0, 0x1906, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1f6def34 sp=0x1f6dedb4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x4)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1f6defc8 sp=0x1f6def34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1f6defcc sp=0x1f6defc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a

goroutine 168 [runnable]:
runtime.call16(0x0, 0x2e8a3b8, 0x16c400dc, 0x4, 0x4)
    /Users/joe/Downloads/go/src/runtime/asm_386.s:488 fp=0x1f6d2c1c sp=0x1f6d2c18
runtime.gopanic(0x2e3a4a0, 0x16bdc040)
    /Users/joe/Downloads/go/src/runtime/panic.go:426 +0x3f1 fp=0x1f6d2c60 sp=0x1f6d2c1c
runtime.cgoCheckUnknownPointer(0x46743390, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:508 +0x112 fp=0x1f6d2cbc sp=0x1f6d2c60
runtime.cgoCheckArg(0x2e10da0, 0x46743390, 0x2d90100, 0x2e788e0, 0x29)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:494 +0x4a3 fp=0x1f6d2d38 sp=0x1f6d2cbc
runtime.cgoCheckPointer(0x2e10da0, 0x46743390, 0x0, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/Downloads/go/src/runtime/cgocall.go:391 +0xa8 fp=0x1f6d2d60 sp=0x1f6d2d38
go4n6/compress/zlib.NewReader(0x46f91100, 0x2ec0ca00, 0x0, 0x0, 0x0, 0x0)
    /Users/joe/src/repo004/GOPATH/src/go4n6/compress/zlib/zlib.go:74 +0x115 fp=0x1f6d2db4 sp=0x1f6d2d60
go4n6/disk/ewf.decompress(0x46f910e0, 0x2ec0ca00, 0x1902, 0x0, 0x2e4ad60, 0x149a85a0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/joe/src/repo004/GOPATH/src/go4n6/disk/ewf/segment.go:296 +0x5d0 fp=0x1f6d2f34 sp=0x1f6d2db4
go4n6/ioutil.(*LookaheadReader).start.func1(0x2c52e190, 0x1491c070, 0x5)
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:427 +0x42c fp=0x1f6d2fc8 sp=0x1f6d2f34
runtime.goexit()
    /Users/joe/Downloads/go/src/runtime/asm_386.s:1583 +0x1 fp=0x1f6d2fcc sp=0x1f6d2fc8
created by go4n6/ioutil.(*LookaheadReader).start
    /Users/joe/src/repo004/GOPATH/src/go4n6/ioutil/lookahead.go:435 +0x8a
@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

Setting GODEBUG=cgocheck=0 allows the application to function as expected.

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

The error means that Go sees a pointer into the Go heap that the Go GC is not aware of. This is a serious error that you shouldn't cover up by setting GODEBUG=cgocheck. Or there is a bug in the checking code, of course, although it seems pretty simple.

You could create an error of this sort by calling the C function free with a Go pointer. You should check that you are not doing that.

Could you try running your program with GODEBUG=cgocheck=2 to see if the stricter checks find an earlier problem?

Is there a way we can try running this program ourselves to recreate the problem?

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

Although I understand you may not want to share the source for your whole app, if you can post your full zlib package (I assume just zlib.go), I suspect we'll be able to identify pretty quickly what is wrong (whether in that code or in the cgo checks) and how to fix it. Thanks.

@rsc rsc changed the title cmd/cgo: panic: runtime error: cgo argument has invalid Go pointer cmd/cgo: bad pointer detected in private zlib wrapper Jan 13, 2016

@jtsylve jtsylve closed this Jan 13, 2016

@jtsylve jtsylve reopened this Jan 13, 2016

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

I believe it's almost certainly a problem with the check. This very stripped down version causes the same panic:

// Package zlib implements zlib compression using libz, which should
// be faster than the Go implementation
package zlib

// #cgo LDFLAGS: -lz
// #include <zlib.h>
// #include <stdlib.h>
//
// // inflateInit is a macro so we need to do this
// int InflateInit(z_streamp s) {
//     return inflateInit(s);
// }
//
// // We do the zstream allocation in C, so that the Go
// // GC doesn't inspect the pointers inside that are
// // allocated by zlib and panic.
// z_streamp new_zstream() {
//     return (z_streamp) calloc(sizeof(z_stream), 1);
// }
import "C"

import (
    "errors"
    "io"
    "unsafe"
)

type reader struct {
    s  C.z_streamp
}


// NewReader creates a new ReadCloser. Reads from the returned ReadCloser
// read and decompress data from r. The implementation buffers input and
// may read more data than necessary from r. It is the caller's
// responsibility to call Close on the ReadCloser when done.
func NewReader(r io.Reader) (io.ReadCloser, error) {
    rd := &reader{
        // This allocates memory using C.calloc, so it's not go memory
        s:  C.new_zstream(),
    }

    err := C.InflateInit(rd.s) // <-- Occasional panic here
    if err != C.Z_OK {
        return nil, errors.New("Could not init inflate.")
    }

    return rd, nil
}

func (r *reader) Read(p []byte) (n int, err error) {
    // Do nothing to show we're not putting any Go pointers
    // in C memory.
    return len(p), nil
}

// Close implements the io.Closer interface
//
// Calling Close does not close the wrapped io.Reader originally passed to NewReader
func (r *reader) Close() error {
    err := C.inflateEnd(r.s)
    if err != C.Z_OK {
        return errors.New("Could not end inflate")
    }

    C.free(unsafe.Pointer(r.s))

    r.s = nil

    return nil
}

In this case cgoCheck=2 doesn't find any earlier errors

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

Russ, I deleted those comments because I realized that was an issue. I nulled out the references before the function returned and it still presented the same issue. See the new stripped down version of the code that still has the panic.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

I tried your new program but I can't make it crash on darwin/386. This is the standalone version I am running:

package main

// #cgo LDFLAGS: -lz
// #include <zlib.h>
// #include <stdlib.h>
//
// // inflateInit is a macro so we need to do this
// int InflateInit(z_streamp s) {
//     return inflateInit(s);
// }
//
// // We do the zstream allocation in C, so that the Go
// // GC doesn't inspect the pointers inside that are
// // allocated by zlib and panic.
// z_streamp new_zstream() {
//     return (z_streamp) calloc(sizeof(z_stream), 1);
// }
import "C"

import (
    "errors"
    "io"
    "unsafe"
)

type reader struct {
    s C.z_streamp
}

// NewReader creates a new ReadCloser. Reads from the returned ReadCloser
// read and decompress data from r. The implementation buffers input and
// may read more data than necessary from r. It is the caller's
// responsibility to call Close on the ReadCloser when done.
func NewReader(r io.Reader) (io.ReadCloser, error) {
    rd := &reader{
        // This allocates memory using C.calloc, so it's not go memory
        s: C.new_zstream(),
    }

    err := C.InflateInit(rd.s) // <-- Occasional panic here
    if err != C.Z_OK {
        return nil, errors.New("Could not init inflate.")
    }

    return rd, nil
}

func (r *reader) Read(p []byte) (n int, err error) {
    // Do nothing to show we're not putting any Go pointers
    // in C memory.
    return len(p), nil
}

// Close implements the io.Closer interface
//
// Calling Close does not close the wrapped io.Reader originally passed to NewReader
func (r *reader) Close() error {
    err := C.inflateEnd(r.s)
    if err != C.Z_OK {
        return errors.New("Could not end inflate")
    }

    C.free(unsafe.Pointer(r.s))

    r.s = nil

    return nil
}

func main() {
    for {
        r, _ := NewReader(nil)
        r.Close()
    }
}
@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

Yeah, that's the thing, it only crashes under very specific conditions in my application. If my application is in a certain state, it crashes every time consistently. In other states it doesn't crash at all. I believe it's highly dependant on the memory layout.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

What is the concrete type of the io.Reader you are passing to zlib.NewReader? Is that inner Reader allocated from Go or from C?

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

Never mind, I see the problem.

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

@rsc Don't leave me hanging

@ebfe

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

Yup, well removing that panic would definitely fix it for me.

@gopherbot

This comment has been minimized.

Copy link

commented Jan 13, 2016

CL https://golang.org/cl/18611 mentions this issue.

@rsc

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2016

@jtsylve Sorry I expected Gopherbot to mention the CL more quickly than it did.

@jtsylve

This comment has been minimized.

Copy link
Contributor Author

commented Jan 13, 2016

NP. It seems to only mention the CL if someone posts the mention in a comment on the CL, not when the CL is posted.

@gopherbot gopherbot closed this in dd6753a Jan 13, 2016

@golang golang locked and limited conversation to collaborators Jan 13, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants
You can’t perform that action at this time.