Skip to content

Instantly share code, notes, and snippets.

@jchris
Created June 20, 2013 23:19
Show Gist options
  • Save jchris/5827630 to your computer and use it in GitHub Desktop.
Save jchris/5827630 to your computer and use it in GitHub Desktop.
test makes Sync Gateway crash if you run it over and over again and control c it if it gets stuck and run it again
16:17:18.807032 Reset guest user to config
16:17:18.807057 Starting auth server on :4985
16:17:18.819518 Starting server on :4984 ...
16:17:25.028532 HTTP: GET /db/
16:17:25.029184 WARNING: all_docs got error: Reduce is not supported yet, sorry -- db.(*Database).queryAllDocs() at database.go:299
16:17:25.182783 HTTP: GET /db/
16:17:25.182877 WARNING: all_docs got error: Reduce is not supported yet, sorry -- db.(*Database).queryAllDocs() at database.go:299
16:17:25.189725 HTTP: GET /db/_changes?filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:25.189957 HTTP: GET /db/test-doc-b
16:17:25.190017 HTTP: --> 404 missing
16:17:25.192343 HTTP: PUT /db/test-doc-b
16:17:25.192490 CRUD: Invoking sync on doc "test-doc-b" rev 1-e56831e46cad386f2cb92e406b332704
16:17:25.192594 CRUD: Doc "test-doc-b" in channels "{abc, ok}"
16:17:25.192677 CRUD: Added doc "test-doc-b" / "1-e56831e46cad386f2cb92e406b332704"
16:17:25.194763 HTTP: GET /db/test-doc-b
16:17:25.196824 HTTP: PUT /db/test-doc-b
16:17:25.197029 CRUD: Invoking sync on doc "test-doc-b" rev 2-609f1bad986e0e89d264406a7d49271a
16:17:25.197339 CRUD: Added doc "test-doc-b" / "2-609f1bad986e0e89d264406a7d49271a"
16:17:25.305849 HTTP: GET /db/test-doc
16:17:25.305946 HTTP: --> 404 missing
16:17:25.306052 HTTP: GET /db/_changes?since=abc%3A2%2Cok%3A2&filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:25.307637 HTTP: PUT /db/test-doc
16:17:25.307767 CRUD: Invoking sync on doc "test-doc" rev 1-e56831e46cad386f2cb92e406b332704
16:17:25.307881 CRUD: Doc "test-doc" in channels "{abc, ok}"
16:17:25.307991 CRUD: Added doc "test-doc" / "1-e56831e46cad386f2cb92e406b332704"
16:17:25.317517 HTTP: GET /db/_changes?filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:25.317683 HTTP: GET /db/test-doc-b
16:17:25.319392 HTTP: PUT /db/test-doc-b
16:17:25.319613 CRUD: Invoking sync on doc "test-doc-b" rev 3-e11736219cc17b3720850a92e749fce4
16:17:25.319868 CRUD: Doc "test-doc-b" in channels "{empty}"
16:17:25.319943 CRUD: Added doc "test-doc-b" / "3-e11736219cc17b3720850a92e749fce4"
16:17:33.835539 HTTP: GET /db/
16:17:33.839606 WARNING: all_docs got error: Reduce is not supported yet, sorry -- db.(*Database).queryAllDocs() at database.go:299
16:17:33.991627 HTTP: GET /db/
16:17:33.991721 WARNING: all_docs got error: Reduce is not supported yet, sorry -- db.(*Database).queryAllDocs() at database.go:299
16:17:33.999438 HTTP: GET /db/_changes?filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:33.999604 HTTP: GET /db/test-doc-b
16:17:34.002983 HTTP: PUT /db/test-doc-b
16:17:34.003296 CRUD: Invoking sync on doc "test-doc-b" rev 4-30b7ebb48ce923abf615399a3cb01519
16:17:34.003566 CRUD: Doc "test-doc-b" in channels "{abc, ok}"
16:17:34.003659 CRUD: Added doc "test-doc-b" / "4-30b7ebb48ce923abf615399a3cb01519"
16:17:34.005851 HTTP: GET /db/test-doc-b
16:17:34.008070 HTTP: PUT /db/test-doc-b
16:17:34.008304 CRUD: Invoking sync on doc "test-doc-b" rev 5-a31173e5afb7125a8dcf2e308cde63ca
16:17:34.008613 CRUD: Added doc "test-doc-b" / "5-a31173e5afb7125a8dcf2e308cde63ca"
16:17:34.116645 HTTP: GET /db/_changes?since=abc%3A6%2Cempty%3A5%2Cok%3A6&filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:34.116946 HTTP: GET /db/test-doc
16:17:34.119627 HTTP: PUT /db/test-doc
16:17:34.119921 CRUD: Invoking sync on doc "test-doc" rev 2-609f1bad986e0e89d264406a7d49271a
16:17:34.120379 CRUD: Added doc "test-doc" / "2-609f1bad986e0e89d264406a7d49271a"
16:17:34.129960 HTTP: GET /db/_changes?filter=sync_gateway%2Fbychannel&feed=continuous&channels=ok%2Cabc%2Cempty
16:17:34.130131 HTTP: GET /db/test-doc-b
panic: interface conversion: interface is map[string]interface {}, not bool
goroutine 294 [running]:
github.com/couchbaselabs/sync_gateway/db.func·003()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:240 +0x7ac
created by github.com/couchbaselabs/sync_gateway/db.(*Database).changesFeedFromView
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:264 +0x5f7
goroutine 1 [runnable]:
net.runtime_pollWait(0x9faf00, 0x72, 0x0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/runtime/znetpoll_darwin_amd64.c:118 +0x82
net.(*pollDesc).WaitRead(0xc2014c1740, 0x23, 0xc200168960)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_poll_runtime.go:75 +0x31
net.(*netFD).accept(0xc2014c16c0, 0x4d2ca0, 0x0, 0xc200168960, 0x23, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_unix.go:381 +0x2c1
net.(*TCPListener).AcceptTCP(0xc201546930, 0x6a5b6, 0x999d18, 0x6a5b6)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/tcpsock_posix.go:229 +0x45
net.(*TCPListener).Accept(0xc201546930, 0xc201510120, 0xc201514960, 0xc200d1c750, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/tcpsock_posix.go:239 +0x25
net/http.(*Server).Serve(0xc200fe7f00, 0xc201087d80, 0xc201546930, 0x0, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1545 +0x85
net/http.(*Server).ListenAndServe(0xc200fe7f00, 0xc200fe7f00, 0xc201084780)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1535 +0x9e
net/http.ListenAndServe(0x412e10, 0x5, 0xc201084780, 0xc200da5820, 0x1, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1600 +0x65
github.com/couchbaselabs/sync_gateway/rest.RunServer(0xc20016f080)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/config.go:340 +0x39b
github.com/couchbaselabs/sync_gateway/rest.ServerMain()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/config.go:348 +0x29
main.main()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/main.go:16 +0x18
goroutine 2 [syscall]:
goroutine 4 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc2002fc280, 0xc200301900)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 5 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc20053cd70, 0xc2004ae300)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 6 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc2008cd690, 0xc2001f2360)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 7 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc2009da5f0, 0xc2009a9360)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 8 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc200d44410, 0xc200ec1420)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 9 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc200f44960, 0xc200e9b360)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 10 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc200d00960, 0xc200a2d360)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 282 [semacquire]:
sync.runtime_Semacquire(0xc2015148e8)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/runtime/zsema_darwin_amd64.c:165 +0x2e
sync.(*Cond).Wait(0xc200a2e980)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/sync/cond.go:73 +0x95
github.com/couchbaselabs/sync_gateway/db.(*changeListener).Wait(0xc200a2d560, 0x1c, 0x0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:77 +0x187
github.com/couchbaselabs/sync_gateway/db.(*changeWaiter).Wait(0xc200d1afd0, 0xc200fd0f80)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:106 +0x31
github.com/couchbaselabs/sync_gateway/db.func·004()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:366 +0x7df
created by github.com/couchbaselabs/sync_gateway/db.(*Database).MultiChangesFeed
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:378 +0x291
goroutine 12 [chan receive]:
github.com/couchbaselabs/sync_gateway/db.func·001()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:36 +0xb0
created by github.com/couchbaselabs/sync_gateway/db.(*changeListener).Start
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:45 +0x1aa
goroutine 13 [chan receive]:
github.com/couchbaselabs/walrus.(*JSServer).serve(0xc200da5e60, 0xc20108b4e0)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:190 +0x49
created by github.com/couchbaselabs/walrus.NewJSServer
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/couchbaselabs/walrus/js_server.go:63 +0x163
goroutine 14 [IO wait]:
net.runtime_pollWait(0x9fae60, 0x72, 0x0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/runtime/znetpoll_darwin_amd64.c:118 +0x82
net.(*pollDesc).WaitRead(0xc2014c17d0, 0x23, 0xc200168960)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_poll_runtime.go:75 +0x31
net.(*netFD).accept(0xc2014c1750, 0x4d2ca0, 0x0, 0xc200168960, 0x23, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_unix.go:381 +0x2c1
net.(*TCPListener).AcceptTCP(0xc201546978, 0x18, 0xc200fff810, 0x6a3a7)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/tcpsock_posix.go:229 +0x45
net.(*TCPListener).Accept(0xc201546978, 0x0, 0xc200000000, 0x0, 0xc201260fc0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/tcpsock_posix.go:239 +0x25
net/http.(*Server).Serve(0xc200fe7f50, 0xc201087d80, 0xc201546978, 0x0, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1545 +0x85
net/http.(*Server).ListenAndServe(0xc200fe7f50, 0xc200fe7f50, 0xc200da57d0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1535 +0x9e
net/http.ListenAndServe(0x412e30, 0x5, 0xc201084780, 0xc200cb8190, 0x1, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1600 +0x65
created by github.com/couchbaselabs/sync_gateway/rest.StartAuthListener
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/authrest.go:335 +0x5b
goroutine 281 [semacquire]:
sync.runtime_Semacquire(0xc2015148e8)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/runtime/zsema_darwin_amd64.c:165 +0x2e
sync.(*Cond).Wait(0xc200a2e980)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/sync/cond.go:73 +0x95
github.com/couchbaselabs/sync_gateway/db.(*changeListener).Wait(0xc200a2d560, 0x1c, 0x0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:77 +0x187
github.com/couchbaselabs/sync_gateway/db.(*changeWaiter).Wait(0xc200d1ae40, 0xc200fd0e00)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/change_listener.go:106 +0x31
github.com/couchbaselabs/sync_gateway/db.func·004()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:366 +0x7df
created by github.com/couchbaselabs/sync_gateway/db.(*Database).MultiChangesFeed
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:378 +0x291
goroutine 295 [runnable]:
github.com/couchbaselabs/sync_gateway/db.func·002()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:122 +0x1c1
created by github.com/couchbaselabs/sync_gateway/db.(*Database).changesFeed
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:177 +0x299
goroutine 289 [select]:
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleContinuousChanges(0xc200e7d690, 0xc200e7fc30, 0xc200e7fab0, 0x0, 0x10000, ...)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:505 +0x56b
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleChanges(0xc200e7d690, 0xc2014c0860, 0x0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:425 +0x4cb
github.com/couchbaselabs/sync_gateway/rest.(*handler).invoke(0xc200e7d690, 0x4d20d8, 0x1, 0x3fcbc0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:107 +0x359
github.com/couchbaselabs/sync_gateway/rest.func·003(0xc201087f80, 0xc200738690, 0xc2005024e0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:73 +0x94
net/http.HandlerFunc.ServeHTTP(0xc201257020, 0xc201087f80, 0xc200738690, 0xc2005024e0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1152 +0x3e
github.com/gorilla/mux.(*Router).ServeHTTP(0xc200da5820, 0xc201087f80, 0xc200738690, 0xc2005024e0)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/gorilla/mux/mux.go:86 +0x1d9
net/http.serverHandler.ServeHTTP(0xc200fe7f00, 0xc201087f80, 0xc200738690, 0xc2005024e0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1520 +0x16c
net/http.(*conn).serve(0xc200d1c630)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1099 +0x765
created by net/http.(*Server).Serve
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1567 +0x266
goroutine 156 [select]:
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleContinuousChanges(0xc2014f3730, 0xc2006496f0, 0xc200e7f360, 0x0, 0x10000, ...)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:505 +0x56b
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleChanges(0xc2014f3730, 0xc200c41680, 0x0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:425 +0x4cb
github.com/couchbaselabs/sync_gateway/rest.(*handler).invoke(0xc2014f3730, 0x4d20d8, 0x1, 0x3fcbc0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:107 +0x359
github.com/couchbaselabs/sync_gateway/rest.func·003(0xc201087f80, 0xc20088a5b0, 0xc2012c2410)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:73 +0x94
net/http.HandlerFunc.ServeHTTP(0xc201257020, 0xc201087f80, 0xc20088a5b0, 0xc2012c2410)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1152 +0x3e
github.com/gorilla/mux.(*Router).ServeHTTP(0xc200da5820, 0xc201087f80, 0xc20088a5b0, 0xc2012c2410)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/gorilla/mux/mux.go:86 +0x1d9
net/http.serverHandler.ServeHTTP(0xc200fe7f00, 0xc201087f80, 0xc20088a5b0, 0xc2012c2410)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1520 +0x16c
net/http.(*conn).serve(0xc200a3aea0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1099 +0x765
created by net/http.(*Server).Serve
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1567 +0x266
goroutine 260 [select]:
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleContinuousChanges(0xc2012ad7d0, 0xc200355810, 0xc200e7f3f0, 0x0, 0x10000, ...)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:505 +0x56b
github.com/couchbaselabs/sync_gateway/rest.(*handler).handleChanges(0xc2012ad7d0, 0xc200ed8b60, 0x0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/rest.go:425 +0x4cb
github.com/couchbaselabs/sync_gateway/rest.(*handler).invoke(0xc2012ad7d0, 0x4d20d8, 0x1, 0x3fcbc0)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:107 +0x359
github.com/couchbaselabs/sync_gateway/rest.func·003(0xc201087f80, 0xc2004b2930, 0xc201094750)
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/rest/handler.go:73 +0x94
net/http.HandlerFunc.ServeHTTP(0xc201257020, 0xc201087f80, 0xc2004b2930, 0xc201094750)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1152 +0x3e
github.com/gorilla/mux.(*Router).ServeHTTP(0xc200da5820, 0xc201087f80, 0xc2004b2930, 0xc201094750)
/Users/jchris/code/cb/mobile/sync_gateway/vendor/src/github.com/gorilla/mux/mux.go:86 +0x1d9
net/http.serverHandler.ServeHTTP(0xc200fe7f00, 0xc201087f80, 0xc2004b2930, 0xc201094750)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1520 +0x16c
net/http.(*conn).serve(0xc2014fabd0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1099 +0x765
created by net/http.(*Server).Serve
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1567 +0x266
goroutine 290 [runnable]:
net.runtime_pollWait(0x9fac80, 0x72, 0x0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/runtime/znetpoll_darwin_amd64.c:118 +0x82
net.(*pollDesc).WaitRead(0xc200d1c740, 0x23, 0xc200168960)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_poll_runtime.go:75 +0x31
net.(*netFD).Read(0xc200d1c6c0, 0xc200f6c000, 0x1000, 0x1000, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/fd_unix.go:191 +0x2b3
net.(*conn).Read(0xc201514960, 0xc200f6c000, 0x1000, 0x1000, 0xc200738930, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/net.go:123 +0xc3
net/http.(*liveSwitchReader).Read(0xc200d1c778, 0xc200f6c000, 0x1000, 0x1000, 0x1, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:208 +0x91
io.(*LimitedReader).Read(0xc2014c0620, 0xc200f6c000, 0x1000, 0x1000, 0x465310, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/io/io.go:382 +0xc0
net/http.(*switchReader).Read(0xc2012ef650, 0xc200f6c000, 0x1000, 0x1000, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/chunked.go:0 +0x62
bufio.(*Reader).fill(0xc200e98420)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/bufio/bufio.go:79 +0x10c
bufio.(*Reader).ReadSlice(0xc200e98420, 0xa, 0x0, 0x0, 0x0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/bufio/bufio.go:262 +0x202
bufio.(*Reader).ReadLine(0xc200e98420, 0x0, 0x0, 0x0, 0xd93c00, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/bufio/bufio.go:293 +0x61
net/textproto.(*Reader).readLineSlice(0xc200e7f810, 0xe00060f4b, 0x1fc2f, 0xc200502c30, 0x3f4ca0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/textproto/reader.go:55 +0x51
net/textproto.(*Reader).ReadLine(0xc200e7f810, 0xc200502c30, 0xd93d6f, 0x10, 0xc2000f04e0, ...)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/textproto/reader.go:36 +0x25
net/http.ReadRequest(0xc200e98420, 0xc200502c30, 0x0, 0x0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/request.go:510 +0x86
net/http.(*conn).readRequest(0xc200d1c750, 0x0, 0x0, 0x0)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:550 +0x1bc
net/http.(*conn).serve(0xc200d1c750)
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1055 +0x398
created by net/http.(*Server).Serve
/opt/boxen/homebrew/Cellar/go/1.1beta1/src/pkg/net/http/server.go:1567 +0x266
goroutine 291 [chan receive]:
github.com/couchbaselabs/sync_gateway/db.func·004()
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:321 +0x6c9
created by github.com/couchbaselabs/sync_gateway/db.(*Database).MultiChangesFeed
/Users/jchris/code/cb/mobile/sync_gateway/src/github.com/couchbaselabs/sync_gateway/db/changes.go:378 +0x291
exit status 2
➜ sync_gateway git:(node-test-tap) ✗
➜ node-tap git:(node-test-tap) ✗ npm test
> [email protected] test /Users/jchris/code/cb/mobile/sync_gateway/tests/node-tap
> tap ./test --tap
# assert-test.js
# TAP version 13
# reachable
ok 1 no error
ok 2 correct db name
# tests 2
# pass 2
# ok
ok 3 test/assert-test.js
# simple-test.js
# TAP version 13
# sync gateway database is reachable
ok 4 no errors
ok 5 is a database
# put http://localhost:4984/db/test-doc-b undefined
# put http://localhost:4984/db/test-doc-b 1-e56831e46cad386f2cb92e406b332704
# begin watch and save abc:2,ok:2
# will put
# put http://localhost:4984/db/test-doc undefined
# did put null { id: 'test-doc',
# saved seq abc:2,ok:3
# docs are seen on the changes feed of all channels
ok 6 doc-saved
ok 7 doc-saved
ok 8 has a sequence
ok 9 no err on saved doc
ok 10 has a sequence
ok 11 on abc channel
ok 12 on ok channel
# put http://localhost:4984/db/test-doc-b 2-609f1bad986e0e89d264406a7d49271a
^C% ➜ node-tap git:(node-test-tap) ✗ npm test
> [email protected] test /Users/jchris/code/cb/mobile/sync_gateway/tests/node-tap
> tap ./test --tap
# assert-test.js
# TAP version 13
# reachable
ok 1 no error
ok 2 correct db name
# tests 2
# pass 2
# ok
ok 3 test/assert-test.js
# simple-test.js
# TAP version 13
# sync gateway database is reachable
ok 4 no errors
ok 5 is a database
# put http://localhost:4984/db/test-doc-b 3-e11736219cc17b3720850a92e749fce4
# put http://localhost:4984/db/test-doc-b 4-30b7ebb48ce923abf615399a3cb01519
# begin watch and save abc:6,empty:5,ok:6
# will put
# put http://localhost:4984/db/test-doc 1-e56831e46cad386f2cb92e406b332704
# did put null { id: 'test-doc',
# saved seq abc:6,empty:5,ok:7
# docs are seen on the changes feed of all channels
ok 6 doc-saved
ok 7 doc-saved
ok 8 has a sequence
ok 9 no err on saved doc
ok 10 has a sequence
ok 11 on abc channel
ok 12 on ok channel
# put http://localhost:4984/db/test-doc-b 5-a31173e5afb7125a8dcf2e308cde63ca
not ok 13 test/simple-test.js
---
exit: 1
stderr: |
events.js:66
throw arguments[1]; // Unhandled 'error' event
^
Error: socket hang up
at createHangUpError (http.js:1263:15)
at Socket.socketOnEnd [as onend] (http.js:1351:23)
at TCP.onread (net.js:417:26)
command: "node" "simple-test.js"
...
1..13
# tests 13
# pass 12
# fail 1
npm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
➜ node-tap git:(node-test-tap) ✗
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment