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

stack overflow: stack exceeds 1000000000-byte limit fatal error: #45

Closed
kisdaniel opened this issue Jul 21, 2019 · 0 comments · Fixed by #52
Closed

stack overflow: stack exceeds 1000000000-byte limit fatal error: #45

kisdaniel opened this issue Jul 21, 2019 · 0 comments · Fixed by #52

Comments

@kisdaniel
Copy link

When I start my mock server I get a following error after several time:

🌱 Sprouting Eurobank Traktor Payment on port 10000
2019/07/21 08:42:15 POST /v1/authentication/authenticate (Accept application/json) (authenticateUsingPOST) => 201 ()
2019/07/21 08:42:22 POST /v1/authentication/authenticate (Accept application/json) (authenticateUsingPOST) => 200 (application/json)
runtime: goroutine stack exceeds 1000000000-byte limit
fatal error: stack overflow

runtime stack:
runtime.throw(0x95d16e, 0xe)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/panic.go:617 +0x72
runtime.newstack()
	/usr/local/Cellar/go/1.12/libexec/src/runtime/stack.go:1041 +0x6f0
runtime.morestack()
	/usr/local/Cellar/go/1.12/libexec/src/runtime/asm_amd64.s:429 +0x8f

goroutine 18 [running]:
runtime.heapBitsSetType(0xc01615c7a0, 0x10, 0x10, 0x8a9ee0)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/mbitmap.go:938 +0xa55 fp=0xc024000318 sp=0xc024000310 pc=0x415905
runtime.mallocgc(0x10, 0x8a9ee0, 0x1, 0x8)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/malloc.go:969 +0x51c fp=0xc0240003b8 sp=0xc024000318 pc=0x40b81c
runtime.convTstring(0x95a360, 0x6, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/iface.go:355 +0x5b fp=0xc0240003e8 sp=0xc0240003b8 pc=0x4093eb
main.OpenAPIExample(0x1, 0xc000258b60, 0xc024000628, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:157 +0x1c6 fp=0xc024000540 sp=0xc0240003e8 pc=0x858a26
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c790, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024000698 sp=0xc024000540 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165958, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240007f0 sp=0xc024000698 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c770, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024000948 sp=0xc0240007f0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165838, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024000aa0 sp=0xc024000948 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c750, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024000bf8 sp=0xc024000aa0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165718, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024000d50 sp=0xc024000bf8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c730, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024000ea8 sp=0xc024000d50 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161655f8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024001000 sp=0xc024000ea8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c710, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024001158 sp=0xc024001000 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161654d8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240012b0 sp=0xc024001158 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c6f0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024001408 sp=0xc0240012b0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161653c8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024001560 sp=0xc024001408 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240016b8 sp=0xc024001560 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0240018f8, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024001810 sp=0xc0240016b8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c6c0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024001968 sp=0xc024001810 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165298, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024001ac0 sp=0xc024001968 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c6a0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024001c18 sp=0xc024001ac0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165178, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024001d70 sp=0xc024001c18 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c680, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024001ec8 sp=0xc024001d70 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016165058, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024002020 sp=0xc024001ec8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c660, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024002178 sp=0xc024002020 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164f38, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240022d0 sp=0xc024002178 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c640, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024002428 sp=0xc0240022d0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164e18, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024002580 sp=0xc024002428 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240026d8 sp=0xc024002580 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024002918, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024002830 sp=0xc0240026d8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c620, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024002988 sp=0xc024002830 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164cf8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024002ae0 sp=0xc024002988 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024002c38 sp=0xc024002ae0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024002e78, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024002d90 sp=0xc024002c38 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c600, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024002ee8 sp=0xc024002d90 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164be8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024003040 sp=0xc024002ee8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c5d0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024003198 sp=0xc024003040 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164ac8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240032f0 sp=0xc024003198 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c5a0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024003448 sp=0xc0240032f0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164998, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240035a0 sp=0xc024003448 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240036f8 sp=0xc0240035a0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024003938, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024003850 sp=0xc0240036f8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c580, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240039a8 sp=0xc024003850 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164878, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024003b00 sp=0xc0240039a8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c560, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024003c58 sp=0xc024003b00 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164758, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024003db0 sp=0xc024003c58 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c540, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024003f08 sp=0xc024003db0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164638, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024004060 sp=0xc024003f08 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c520, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240041b8 sp=0xc024004060 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016164518, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024004310 sp=0xc0240041b8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x203005, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024004468 sp=0xc024004310 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161643e8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240045c0 sp=0xc024004468 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x203005, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024004718 sp=0xc0240045c0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161642c8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024004870 sp=0xc024004718 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240049c8 sp=0xc024004870 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024004c08, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024004b20 sp=0xc0240049c8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c4e0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024004c78 sp=0xc024004b20 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161641b8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024004dd0 sp=0xc024004c78 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c4c0, 0x7f240e333488, 0x0, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024004f28 sp=0xc024004dd0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161640a8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024005080 sp=0xc024004f28 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c490, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240051d8 sp=0xc024005080 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163f08, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024005330 sp=0xc0240051d8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c460, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024005488 sp=0xc024005330 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163dd8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240055e0 sp=0xc024005488 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c440, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024005738 sp=0xc0240055e0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163cb8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024005890 sp=0xc024005738 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240059e8 sp=0xc024005890 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024005c28, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024005b40 sp=0xc0240059e8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c420, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024005c98 sp=0xc024005b40 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163b98, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024005df0 sp=0xc024005c98 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c400, 0x0, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024005f48 sp=0xc024005df0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163a78, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240060a0 sp=0xc024005f48 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c3e0, 0x7f240e3331b8, 0x203005, 0x203005)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240061f8 sp=0xc0240060a0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163958, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024006350 sp=0xc0240061f8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c3c0, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240064a8 sp=0xc024006350 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163848, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024006600 sp=0xc0240064a8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c390, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024006758 sp=0xc024006600 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163728, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240068b0 sp=0xc024006758 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x203005, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024006a08 sp=0xc0240068b0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161635e8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024006b60 sp=0xc024006a08 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x203005, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024006cb8 sp=0xc024006b60 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161634c8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024006e10 sp=0xc024006cb8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c340, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024006f68 sp=0xc024006e10 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc0161633b8, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240070c0 sp=0xc024006f68 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c320, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024007218 sp=0xc0240070c0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163298, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024007370 sp=0xc024007218 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c300, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240074c8 sp=0xc024007370 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163178, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024007620 sp=0xc0240074c8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024007778 sp=0xc024007620 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0240079b8, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240078d0 sp=0xc024007778 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c2e0, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024007a28 sp=0xc0240078d0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016163068, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024007b80 sp=0xc024007a28 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c2b0, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024007cd8 sp=0xc024007b80 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016162f48, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024007e30 sp=0xc024007cd8 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x203005, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024007f88 sp=0xc024007e30 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016162e08, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc0240080e0 sp=0xc024007f88 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0x0, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc024008238 sp=0xc0240080e0 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc024008478, 0x0, 0x0, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024008390 sp=0xc024008238 pc=0x8593fc
main.OpenAPIExample(0x1, 0xc0002589c0, 0xc01615c270, 0x0, 0x203003, 0x203003)
	/Users/dan/Projects/apisprout/example.go:183 +0x729 fp=0xc0240084e8 sp=0xc024008390 pc=0x858f89
main.OpenAPIExample(0x1, 0xc000258ea0, 0xc0001a7c8c, 0x4, 0xc016162d08, 0x0)
	/Users/dan/Projects/apisprout/example.go:162 +0xb9c fp=0xc024008640 sp=0xc0240084e8 pc=0x8593fc
...additional frames elided...
created by net/http.(*Server).Serve
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:2884 +0x2f4

goroutine 1 [IO wait, 1 minutes]:
internal/poll.runtime_pollWait(0x7f2410d36f68, 0x72, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc0000fab98, 0x72, 0x0, 0x0, 0x95a68a)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0000fab80, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_unix.go:384 +0x1ba
net.(*netFD).accept(0xc0000fab80, 0xc00003ca70, 0xc00003ca00, 0x40b5e9)
	/usr/local/Cellar/go/1.12/libexec/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc00000f2c0, 0xc00018f9b8, 0xd9f26ffe, 0x86e62ea640e41d19)
	/usr/local/Cellar/go/1.12/libexec/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).AcceptTCP(0xc00000f2c0, 0xc00018f9e0, 0x4ad316, 0x5d34094e)
	/usr/local/Cellar/go/1.12/libexec/src/net/tcpsock.go:247 +0x48
net/http.tcpKeepAliveListener.Accept(0xc00000f2c0, 0xc00018fa30, 0x18, 0xc000000180, 0x6bfc94)
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:3264 +0x2f
net/http.(*Server).Serve(0xc0001f56c0, 0xa13dc0, 0xc00000f2c0, 0x0, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:2859 +0x22d
net/http.(*Server).ListenAndServe(0xc0001f56c0, 0xc0001f56c0, 0xc00018fc78)
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:2797 +0xe4
net/http.ListenAndServe(...)
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:3037
main.server(0xc000124280, 0xc000097cb0, 0x1, 0x3)
	/Users/dan/Projects/apisprout/apisprout.go:601 +0x855
github.com/spf13/cobra.(*Command).execute(0xc000124280, 0xc00001e0d0, 0x3, 0x3, 0xc000124280, 0xc00001e0d0)
	/Users/dan/Projects/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:766 +0x2ae
github.com/spf13/cobra.(*Command).ExecuteC(0xc000124280, 0x95b8c2, 0xa, 0x0)
	/Users/dan/Projects/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:852 +0x2c0
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/dan/Projects/pkg/mod/github.com/spf13/cobra@v0.0.3/command.go:800
main.main()
	/Users/dan/Projects/apisprout/apisprout.go:120 +0x822

goroutine 19 [IO wait, 1 minutes]:
internal/poll.runtime_pollWait(0x7f2410d36e98, 0x72, 0xffffffffffffffff)
	/usr/local/Cellar/go/1.12/libexec/src/runtime/netpoll.go:182 +0x56
internal/poll.(*pollDesc).wait(0xc00045c298, 0x72, 0x0, 0x1, 0xffffffffffffffff)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x9b
internal/poll.(*pollDesc).waitRead(...)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00045c280, 0xc00025e671, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/internal/poll/fd_unix.go:169 +0x19b
net.(*netFD).Read(0xc00045c280, 0xc00025e671, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc000548020, 0xc00025e671, 0x1, 0x1, 0x0, 0x0, 0x0)
	/usr/local/Cellar/go/1.12/libexec/src/net/net.go:177 +0x69
net/http.(*connReader).backgroundRead(0xc00025e660)
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:677 +0x58
created by net/http.(*connReader).startBackgroundRead
	/usr/local/Cellar/go/1.12/libexec/src/net/http/server.go:673 +0xca
impl added a commit to puppetlabs/apisprout that referenced this issue Aug 22, 2019
This change checks for cycles when resolving schemas by keeping a cache
of each fully built schema object in a given example. If an item is in
the cache but not yet completely built, it indicates a cycle, and the
example generator bails out.

Sometimes, the recursion isn't actually necessary (e.g., for a property
that isn't required), in which case we try to intelligently omit
recursive schema references.

This should resolve danielgtaylor#45, although without a link to the spec they're
using it's difficult to be 100% sure.
impl added a commit to puppetlabs/apisprout that referenced this issue Sep 29, 2019
This change checks for cycles when resolving schemas by keeping a cache
of each fully built schema object in a given example. If an item is in
the cache but not yet completely built, it indicates a cycle, and the
example generator bails out.

Sometimes, the recursion isn't actually necessary (e.g., for a property
that isn't required), in which case we try to intelligently omit
recursive schema references.

This should resolve danielgtaylor#45, although without a link to the spec they're
using it's difficult to be 100% sure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant