mcuadros / go-candyjs Goto Github PK
View Code? Open in Web Editor NEWfully transparent bridge between Go and the JavaScript
License: MIT License
fully transparent bridge between Go and the JavaScript
License: MIT License
Key | Value |
---|---|
Operating System | OS X Yosemite 10.10.3 (14D136) |
Go | go1.4.2 darwin/amd64 |
I’m getting the following panic when load testing examples/http/http.go using wrk
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
SIGABRT: abort
PC=0x7fff8fc75286
signal arrived during cgo execution
goroutine 9 [syscall, locked to thread]:
runtime.cgocall_errno(0x4003710, 0xc20808d750, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/runtime/cgocall.go:130 +0xf5 fp=0xc20808d730 sp=0xc20808d708
github.com/olebedev/go-duktape._Cfunc_duk_put_prop_string(0x470d320, 0xfffffffe, 0x5363480, 0x0)
github.com/olebedev/go-duktape/_obj/_cgo_gotypes.go:1098 +0x43 fp=0xc20808d750 sp=0xc20808d730
github.com/olebedev/go-duktape.(*Context).PutPropString(0xc20804e018, 0xfffffffffffffffe, 0x43b8c10, 0x15, 0xc20a772d00)
/Users/peter/Go/src/github.com/olebedev/go-duktape/api.go:1150 +0x84 fp=0xc20808d780 sp=0xc20808d750
github.com/olebedev/go-duktape.(*Context).PushGoFunction(0xc20804e018, 0xc20a776000, 0xc20a772d90)
/Users/peter/Go/src/github.com/olebedev/go-duktape/duktape.go:82 +0xda fp=0xc20808d7c8 sp=0xc20808d780
github.com/mcuadros/go-candyjs.(*Context).PushGoFunction(0xc20800aa70, 0x42f7ee0, 0xc20a772d90, 0x5)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:353 +0x58 fp=0xc20808d7f0 sp=0xc20808d7c8
github.com/mcuadros/go-candyjs.(*Context).PushProxy(0xc20800aa70, 0x436d900, 0xc20a76b5f0, 0x436d900)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:106 +0x18e fp=0xc20808d848 sp=0xc20808d7f0
github.com/mcuadros/go-candyjs.(*Context).pushValue(0xc20800aa70, 0x436d900, 0xc20a76b5f0, 0x16, 0x0, 0x0)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:260 +0x592 fp=0xc20808d920 sp=0xc20808d848
github.com/mcuadros/go-candyjs.(*Context).pushValues(0xc20800aa70, 0xc20a770990, 0x2, 0x2, 0x0, 0x0)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:300 +0x10f fp=0xc20808d9d8 sp=0xc20808d920
github.com/mcuadros/go-candyjs.func·004(0xc20a770990, 0x2, 0x2, 0x0, 0x0, 0x0)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:439 +0x12f fp=0xc20808da30 sp=0xc20808d9d8
reflect.callReflect(0xc20801e0c0, 0xc20808dc38)
/usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:482 +0x345 fp=0xc20808dc20 sp=0xc20808da30
reflect.makeFuncStub(0x4614090, 0xc20a75fa40, 0xc20a76b5f0, 0x40b4bdd, 0xc20801e0c0, 0x4614090, 0xc20a75fa40, 0xc20a76b5f0, 0xc20800a1d0, 0x1, ...)
/usr/local/Cellar/go/1.4.2/libexec/src/reflect/asm_amd64.s:17 +0x36 fp=0xc20808dc38 sp=0xc20808dc20
net/http.HandlerFunc.ServeHTTP(0xc20801e0c0, 0x4614090, 0xc20a75fa40, 0xc20a76b5f0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1265 +0x41 fp=0xc20808dc58 sp=0xc20808dc38
net/http.(*ServeMux).ServeHTTP(0xc20803a7e0, 0x4614090, 0xc20a75fa40, 0xc20a76b5f0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1541 +0x17d fp=0xc20808dcb0 sp=0xc20808dc58
net/http.serverHandler.ServeHTTP(0xc208076060, 0x4614090, 0xc20a75fa40, 0xc20a76b5f0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1703 +0x19a fp=0xc20808dd08 sp=0xc20808dcb0
net/http.(*conn).serve(0xc20805c640)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1204 +0xb57 fp=0xc20808dfd8 sp=0xc20808dd08
runtime.goexit()
/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc20808dfe0 sp=0xc20808dfd8
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 1 [IO wait, locked to thread]:
net.(*pollDesc).Wait(0xc2080100d0, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080100d0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).accept(0xc208010070, 0x0, 0x4612b80, 0xc20800afe8)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:419 +0x40b
net.(*TCPListener).AcceptTCP(0xc20804e070, 0x40b5a7e, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/tcpsock_posix.go:234 +0x4e
net/http.tcpKeepAliveListener.Accept(0xc20804e070, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1976 +0x4c
net/http.(*Server).Serve(0xc208076060, 0x4613ed8, 0xc20804e070, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1728 +0x92
net/http.(*Server).ListenAndServe(0xc208076060, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1718 +0x154
net/http.ListenAndServe(0xc20800a288, 0x5, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1808 +0xba
reflect.Value.call(0x42fbf40, 0x441e220, 0x13, 0x4387e80, 0x4, 0xc20803ac00, 0x2, 0x2, 0x0, 0x0, ...)
/usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:419 +0x10e5
reflect.Value.Call(0x42fbf40, 0x441e220, 0x13, 0xc20803ac00, 0x2, 0x2, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/reflect/value.go:296 +0xbc
github.com/mcuadros/go-candyjs.(*Context).callFunction(0xc20800aa70, 0x42fbf40, 0x441e220, 0xc20803ac00, 0x2, 0x2, 0xc20804c500)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:495 +0xad
github.com/mcuadros/go-candyjs.func·003(0xc20804e068, 0x4716e20)
/Users/peter/Go/src/github.com/mcuadros/go-candyjs/base.go:360 +0x8d
github.com/olebedev/go-duktape.goFunctionCall(0x470d320, 0x470d320)
/Users/peter/Go/src/github.com/olebedev/go-duktape/duktape.go:102 +0x129
github.com/olebedev/go-duktape._Cfunc__duk_eval_string(0x470d320, 0x470fa90)
github.com/olebedev/go-duktape/_obj/_cgo_gotypes.go:198 +0x45
github.com/olebedev/go-duktape.(*Context).EvalString(0xc20804e018, 0x4422b30, 0xca)
/Users/peter/Go/src/github.com/olebedev/go-duktape/api.go:404 +0x74
main.main()
/Users/peter/s.go:22 +0x11a
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.4.2/libexec/src/runtime/asm_amd64.s:2232 +0x1
goroutine 5 [IO wait]:
net.(*pollDesc).Wait(0xc208010140, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010140, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2080100e0, 0xc20800f000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20800afb8)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e078, 0xc20800f000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805c048, 0xc20800f000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20801e200, 0xc20800f000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc2080760c0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc2080760c0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc2080760c0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc20803ad80, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc20803ad80, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc2080760c0, 0xc2080328f0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805c000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805c000)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 7 [IO wait]:
net.(*pollDesc).Wait(0xc2080103e0, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080103e0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208010380, 0xc208061000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772570)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e198, 0xc208061000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805c548, 0xc208061000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20801f1c0, 0xc208061000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076300)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076300, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076300, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc208164150, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc208164150, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076300, 0xc20a76bba0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805c500, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805c500)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 8 [IO wait]:
net.(*pollDesc).Wait(0xc208010450, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010450, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2080103f0, 0xc208069000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a7721d0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e1a0, 0xc208069000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805c5e8, 0xc208069000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20801f1e0, 0xc208069000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076360)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076360, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076360, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc208af0090, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc208af0090, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076360, 0xc20a76ba00, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805c5a0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805c5a0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 10 [IO wait]:
net.(*pollDesc).Wait(0xc208010530, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010530, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2080104d0, 0xc20806d000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a773100)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e1b0, 0xc20806d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805c728, 0xc20806d000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20801f220, 0xc20806d000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076420)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076420, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076420, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc209e88120, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc209e88120, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076420, 0xc2085e01a0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805c6e0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805c6e0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 11 [IO wait]:
net.(*pollDesc).Wait(0xc2080108b0, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc2080108b0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208010850, 0xc208095000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772ae0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e150, 0xc208095000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805cb88, 0xc208095000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e8e0, 0xc208095000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076480)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076480, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc2088880f0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc2088880f0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076480, 0xc20a76bee0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805cb40, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805cb40)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 12 [IO wait]:
net.(*pollDesc).Wait(0xc208010920, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010920, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2080108c0, 0xc2080a1000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772f50)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e158, 0xc2080a1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805cc28, 0xc2080a1000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e900, 0xc2080a1000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc2080764e0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc2080764e0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc2080764e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc2084b4000, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc2084b4000, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc2080764e0, 0xc2085e00d0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805cbe0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805cbe0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 13 [IO wait]:
net.(*pollDesc).Wait(0xc208010990, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010990, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208010930, 0xc2080a3000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a7723a0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e160, 0xc2080a3000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805ccc8, 0xc2080a3000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e920, 0xc2080a3000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076540)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076540, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076540, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc2082b8060, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc2082b8060, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076540, 0xc20a76bad0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805cc80, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805cc80)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 14 [IO wait]:
net.(*pollDesc).Wait(0xc208010a00, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010a00, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc2080109a0, 0xc2080a5000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772740)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e168, 0xc2080a5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805cd68, 0xc2080a5000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e940, 0xc2080a5000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc2080765a0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc2080765a0, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc2080765a0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc20803bcb0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc20803bcb0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc2080765a0, 0xc20a76bc70, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805cd20, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805cd20)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 15 [IO wait]:
net.(*pollDesc).Wait(0xc208010a70, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010a70, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208010a10, 0xc2080a7000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772910)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e170, 0xc2080a7000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805ce08, 0xc2080a7000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e960, 0xc2080a7000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076600)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076600, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc20820c000, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc20820c000, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076600, 0xc20a76be10, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805cdc0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805cdc0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
goroutine 16 [IO wait]:
net.(*pollDesc).Wait(0xc208010ae0, 0x72, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:84 +0x47
net.(*pollDesc).WaitRead(0xc208010ae0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_poll_runtime.go:89 +0x43
net.(*netFD).Read(0xc208010a80, 0xc2080a9000, 0x1000, 0x1000, 0x0, 0x4612b80, 0xc20a772cc0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/fd_unix.go:242 +0x40f
net.(*conn).Read(0xc20804e178, 0xc2080a9000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/net.go:121 +0xdc
net/http.(*liveSwitchReader).Read(0xc20805cea8, 0xc2080a9000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:214 +0xab
io.(*LimitedReader).Read(0xc20809e980, 0xc2080a9000, 0x1000, 0x1000, 0xc208020700, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/io/io.go:408 +0xce
bufio.(*Reader).fill(0xc208076660)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:97 +0x1ce
bufio.(*Reader).ReadSlice(0xc208076660, 0xa, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:295 +0x257
bufio.(*Reader).ReadLine(0xc208076660, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/bufio/bufio.go:324 +0x62
net/textproto.(*Reader).readLineSlice(0xc2093ee0f0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:55 +0x9e
net/textproto.(*Reader).ReadLine(0xc2093ee0f0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/textproto/reader.go:36 +0x4f
net/http.ReadRequest(0xc208076660, 0xc2085e0000, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/request.go:598 +0xcb
net/http.(*conn).readRequest(0xc20805ce60, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:586 +0x26f
net/http.(*conn).serve(0xc20805ce60)
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1162 +0x69e
created by net/http.(*Server).Serve
/usr/local/Cellar/go/1.4.2/libexec/src/net/http/server.go:1751 +0x35e
rax 0x0
rbx 0x6
rcx 0x7fff5fbfe688
rdx 0x0
rdi 0xb03
rsi 0x6
rbp 0x7fff5fbfe6b0
rsp 0x7fff5fbfe688
r8 0x7fff5fbfe6a0
r9 0xb0104000
r10 0x8000000
r11 0x206
r12 0x0
r13 0x2
r14 0xb0104000
r15 0x7fff76564c50
rip 0x7fff8fc75286
rflags 0x206
cs 0x7
fs 0x0
gs 0x0
exit status 2
Hi there,
While playing around with your excellent library i noticed a problem when using JsonEncode
with a proxy (or with an object containing a proxy).
FATAL 56: uncaught error
PANIC 56: uncaught error (calling abort)
SIGABRT: abort
PC=0x7fff8772d0ae
signal arrived during cgo execution
goroutine 7 [syscall, locked to thread]:
runtime.cgocall_errno(0x40030f0, 0xc2080f1280, 0x0)
/usr/local/go/src/runtime/cgocall.go:130 +0xf5 fp=0xc2080f1260 sp=0xc2080f1238
github.com/olebedev/go-duktape._Cfunc_duk_json_encode(0x5c04130, 0xffffffff, 0x0)
github.com/olebedev/go-duktape/_obj/_cgo_gotypes.go:882 +0x44 fp=0xc2080f1280 sp=0xc2080f1260
github.com/olebedev/go-duktape.(*Context).JsonEncode(0xc2080320d0, 0xffffffffffffffff, 0x0, 0x0)
The problem can be reproduced with the following unit test
func (s *CandySuite) TestPushProxyJson(c *C) {
s.ctx.PushGlobalObject()
s.ctx.PushObject()
// note: it works when using a struct instead of a proxy!
// s.ctx.PushStruct(&MyStruct{Int: 142})
s.ctx.PushProxy(&MyStruct{Int: 142})
s.ctx.PutPropString(-2, "obj")
s.ctx.PutPropString(-2, "foo")
s.ctx.Pop()
// note: also fails with script `foo`
err := s.ctx.PevalString(`foo.obj`)
c.Assert(err, IsNil)
s.ctx.JsonEncode(-1) // *BOOOM*!
}
Any ideas why it fails and/or how to fix this?
thanx.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.