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

fatal error: concurrent map read and map write #15

Closed
bep opened this issue Sep 21, 2017 · 9 comments
Closed

fatal error: concurrent map read and map write #15

bep opened this issue Sep 21, 2017 · 9 comments

Comments

@bep
Copy link
Contributor

bep commented Sep 21, 2017

goroutine 348 [running]:
runtime.throw(0x1a16f5a, 0x21)
	/usr/local/go/src/runtime/panic.go:605 +0x95 fp=0xc4220c82a8 sp=0xc4220c8288 pc=0x102c4d5
runtime.mapaccess1_faststr(0x19059c0, 0xc4202bc630, 0x19ceae6, 0x4, 0x0)
	/usr/local/go/src/runtime/hashmap_fast.go:217 +0x43a fp=0xc4220c8300 sp=0xc4220c82a8 pc=0x100d5da
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0xc4202bfe00)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:181 +0x197 fp=0xc4220c84b0 sp=0xc4220c8300 pc=0x143b277
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0xc42109ccc0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:172 +0x8e fp=0xc4220c8660 sp=0xc4220c84b0 pc=0x143b16e
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*coalescer).Tokenise.func1(0xc42109cc80)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/coalesce.go:15 +0x3b fp=0xc4220c86c8 sp=0xc4220c8660 pc=0x14398eb
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.Iterator.Tokens(0xc42109c740, 0x1a6afe8, 0xc4220c87c0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/iterator.go:13 +0x5f fp=0xc4220c8740 sp=0xc4220c86c8 pc=0x14352cf
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).Format(0xc4208dcd20, 0x281a0a0, 0xc420e61650, 0xc420492720, 0xc42109c740, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:76 +0x74 fp=0xc4220c8798 sp=0xc4220c8740 pc=0x143f3d4
github.com/gohugoio/hugo/helpers.chromaHighlight(0x281a0a0, 0xc420e61650, 0xc4215f5afd, 0xac, 0xc420094723, 0x4, 0xc4203a60c0, 0x8, 0x281a7a0, 0xc4208dcd20, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:226 +0x1da fp=0xc4220c8800 sp=0xc4220c8798 pc=0x1613d8a
github.com/gohugoio/hugo/helpers.highlighters.chromaHighlighter(0xc4201c0d20, 0x18cc900, 0xc420014f80, 0x3c, 0xc4215f5afd, 0xac, 0xc420094723, 0x4, 0xc420094729, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:96 +0x1f9 fp=0xc4220c8920 sp=0xc4220c8800 pc=0x1612759
github.com/gohugoio/hugo/helpers.(highlighters).(github.com/gohugoio/hugo/helpers.chromaHighlighter)-fm(0xc4215f5afd, 0xac, 0xc420094723, 0x4, 0xc420094729, 0x0, 0xc421436870, 0xc4220c8a20)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/content.go:91 +0x96 fp=0xc4220c8990 sp=0xc4220c8920 pc=0x161bb86
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight(0xc42039c250, 0x18cc9c0, 0xc421436870, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0xc4220c8ac8, 0x10bcd0f, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/transform.go:58 +0xe5 fp=0xc4220c89e0 sp=0xc4220c8990 pc=0x17908f5
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight-fm(0x18cc9c0, 0xc421436870, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/init.go:39 +0x73 fp=0xc4220c8a48 sp=0xc4220c89e0 pc=0x1791bf3
runtime.call128(0xc420bf5e00, 0xc420291c70, 0xc4208dccd0, 0x3000000050)
	/usr/local/go/src/runtime/asm_amd64.s:511 +0x52 fp=0xc4220c8ad8 sp=0xc4220c8a48 pc=0x1057b52
reflect.Value.call(0x1909480, 0xc420291c70, 0x13, 0x19cd92e, 0x4, 0xc4208dcc80, 0x3, 0x3, 0x19c5840, 0x1911b01, ...)
	/usr/local/go/src/reflect/value.go:434 +0x906 fp=0xc4220c8db0 sp=0xc4220c8ad8 pc=0x10b6186
reflect.Value.Call(0x1909480, 0xc420291c70, 0x13, 0xc4208dcc80, 0x3, 0x3, 0x2824f60, 0xc4204aa1c0, 0x18cd640)
	/usr/local/go/src/reflect/value.go:302 +0xa4 fp=0xc4220c8e18 sp=0xc4220c8db0 pc=0x10b5764
text/template.(*state).evalCall(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0x1909480, 0xc420291c70, 0x13, 0x2824ba0, 0xc42029ba70, 0xc420094710, ...)
	/usr/local/go/src/text/template/exec.go:670 +0x580 fp=0xc4220c9050 sp=0xc4220c8e18 pc=0x119b070
text/template.(*state).evalFunction(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0xc42029baa0, 0x2824ba0, 0xc42029ba70, 0xc4204aa180, 0x4, 0x4, ...)
	/usr/local/go/src/text/template/exec.go:538 +0x176 fp=0xc4220c9148 sp=0xc4220c9050 pc=0x1199ae6
text/template.(*state).evalCommand(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0xc42029ba70, 0x0, 0x0, 0x0, 0xc4220c92e8, 0x1198ad5, ...)
	/usr/local/go/src/text/template/exec.go:435 +0x53a fp=0xc4220c91f8 sp=0xc4220c9148 pc=0x11988da
text/template.(*state).evalPipeline(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0xc4201f9950, 0xc42029b9e0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:408 +0x115 fp=0xc4220c92f0 sp=0xc4220c91f8 pc=0x1197f05
text/template.(*state).walk(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0x2824a20, 0xc42029bb00)
	/usr/local/go/src/text/template/exec.go:234 +0x4af fp=0xc4220c9370 sp=0xc4220c92f0 pc=0x1196c0f
text/template.(*state).walk(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0x2824d80, 0xc42029ba40)
	/usr/local/go/src/text/template/exec.go:242 +0x11d fp=0xc4220c93f0 sp=0xc4220c9370 pc=0x119687d
text/template.(*state).walkIfOrWith(0xc4220c9600, 0xa, 0x193d560, 0xc420c38780, 0x16, 0xc4201f9900, 0xc42029ba40, 0xc42029bb30)
	/usr/local/go/src/text/template/exec.go:272 +0x1c4 fp=0xc4220c9488 sp=0xc4220c93f0 pc=0x1196e84
text/template.(*state).walk(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0x2824d20, 0xc4204aa240)
	/usr/local/go/src/text/template/exec.go:239 +0x318 fp=0xc4220c9508 sp=0xc4220c9488 pc=0x1196a78
text/template.(*state).walk(0xc4220c9600, 0x193d560, 0xc420c38780, 0x16, 0x2824d80, 0xc4204a9f50)
	/usr/local/go/src/text/template/exec.go:242 +0x11d fp=0xc4220c9588 sp=0xc4220c9508 pc=0x119687d
text/template.(*Template).execute(0xc420505ec0, 0x281a0a0, 0xc420476460, 0x193d560, 0xc420c38780, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:197 +0x1f9 fp=0xc4220c9658 sp=0xc4220c9588 pc=0x11962b9
text/template.(*Template).Execute(0xc420505ec0, 0x281a0a0, 0xc420476460, 0x193d560, 0xc420c38780, 0xc420b93580, 0x4)
	/usr/local/go/src/text/template/exec.go:180 +0x53 fp=0xc4220c96a0 sp=0xc4220c9658 pc=0x1196093
html/template.(*Template).Execute(0xc4204a9ef0, 0x281a0a0, 0xc420476460, 0x193d560, 0xc420c38780, 0xc4220c9738, 0xc420476460)
	/usr/local/go/src/html/template/template.go:122 +0x8c fp=0xc4220c96e8 sp=0xc4220c96a0 pc=0x11e364c
github.com/gohugoio/hugo/tpl.(*TemplateAdapter).Execute(0xc421436750, 0x281a0a0, 0xc420476460, 0x193d560, 0xc420c38780, 0x2caa300, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/template.go:76 +0x5b fp=0xc4220c9730 sp=0xc4220c96e8 pc=0x162d85b
github.com/gohugoio/hugo/hugolib.renderShortcodeWithPage(0x281ec60, 0xc421436750, 0xc420c38780, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:721 +0xd3 fp=0xc4220c97e8 sp=0xc4220c9730 pc=0x17e87c3
github.com/gohugoio/hugo/hugolib.renderShortcode(0xc4202ed390, 0x2, 0x19cdaaa, 0x4, 0x19ce5b6, 0x4, 0xc420d20560, 0x17, 0xc4215f5aa2, 0x4, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:340 +0x60b fp=0xc4220c9ac8 sp=0xc4220c97e8 pc=0x17e351b
github.com/gohugoio/hugo/hugolib.prepareShortcodeForPage.func1(0x19036e0, 0xc42081c840, 0xc4220c9c90, 0xc4201d3280)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:261 +0xa8 fp=0xc4220c9bc8 sp=0xc4220c9ac8 pc=0x180af78
github.com/gohugoio/hugo/hugolib.(*shortcodeHandler).executeShortcodesForDelta(0xc420b1de40, 0xc4209a6500, 0x1b, 0xc4220c9dc8)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:406 +0xd1 fp=0xc4220c9d00 sp=0xc4220c9bc8 pc=0x17e4751
github.com/gohugoio/hugo/hugolib.handleShortcodes(0xc4209a6500, 0xc42063a680, 0x558, 0x558, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:611 +0x1aa fp=0xc4220c9df8 sp=0xc4220c9d00 pc=0x17befca
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender.func1(0xc420103180, 0xc421053690, 0xc421fe7680, 0xc42202a580)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:559 +0x233 fp=0xc4220c9fc0 sp=0xc4220c9df8 pc=0x1806d23
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2337 +0x1 fp=0xc4220c9fc8 sp=0xc4220c9fc0 pc=0x105a2a1
created by github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:515 +0xd3

goroutine 1 [chan send]:
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender(0xc420103180, 0xc421053690)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:594 +0x129
github.com/gohugoio/hugo/hugolib.(*HugoSites).render(0xc4203649c0, 0xc421053690, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:216 +0x146
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc4203649c0, 0x100, 0x0, 0x0, 0x0, 0x0, 0x1012267, 0xc4200e6b80)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites_build.go:57 +0x167
github.com/gohugoio/hugo/commands.(*commandeer).buildSites(0xc4200e6b80, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/commands/hugo.go:759 +0xaf
github.com/gohugoio/hugo/commands.(*commandeer).build(0xc4200e6b80, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/commands/hugo.go:530 +0x9a
github.com/gohugoio/hugo/commands.glob..func8(0x2878560, 0x28a37a0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/commands/hugo.go:133 +0xad
github.com/gohugoio/hugo/vendor/github.com/spf13/cobra.(*Command).execute(0x2878560, 0xc420010180, 0x0, 0x0, 0x2878560, 0xc420010180)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/spf13/cobra/command.go:649 +0x456
github.com/gohugoio/hugo/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x2878560, 0x1a6ab10, 0x19d017e, 0x5)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/spf13/cobra/command.go:728 +0x2fe
github.com/gohugoio/hugo/commands.Execute()
	/Users/bep/go/src/github.com/gohugoio/hugo/commands/hugo.go:173 +0x60
main.main()
	/Users/bep/go/src/github.com/gohugoio/hugo/main.go:27 +0x36

goroutine 349 [runnable]:
github.com/dlclark/regexp2.(*runner).initMatch(0xc420af9e00)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:1377 +0x415
github.com/dlclark/regexp2.(*runner).scan(0xc420af9e00, 0xc42232aa10, 0x18d, 0x1bc, 0x0, 0x0, 0x7fffffffffffffff, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:136 +0x353
github.com/dlclark/regexp2.(*Regexp).run(0xc421331400, 0xc421436b00, 0xffffffffffffffff, 0xc42232aa10, 0x18d, 0x1bc, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:91 +0xff
github.com/dlclark/regexp2.(*Regexp).FindRunesMatch(0xc421331400, 0xc42232aa10, 0x18d, 0x1bc, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/regexp.go:163 +0x57
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.matchRules(0xc42232aa10, 0x18d, 0x1bc, 0xc4202de000, 0x18, 0x20, 0x2, 0x0, 0x0, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:281 +0x130
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0xc42109ce20)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:181 +0x206
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:172 +0x8e
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*coalescer).Tokenise.func1(0xc4226d19c0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/coalesce.go:15 +0x4b
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.Iterator.Tokens(0xc4226836a0, 0x1a6afe8, 0xc4220d47c0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/iterator.go:13 +0x5f
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).Format(0xc42096e320, 0x281a0a0, 0xc42217a620, 0xc420492720, 0xc4226836a0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:76 +0x74
github.com/gohugoio/hugo/helpers.chromaHighlight(0x281a0a0, 0xc42217a620, 0xc4201f5500, 0x300, 0xc420094723, 0x4, 0xc4203a60c0, 0x8, 0x281a7a0, 0xc42096e320, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:226 +0x1da
github.com/gohugoio/hugo/helpers.highlighters.chromaHighlighter(0xc4201c0d20, 0x0, 0xc420014f80, 0x3c, 0xc4201f5500, 0x300, 0xc420094723, 0x4, 0xc420094729, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:96 +0x1f9
github.com/gohugoio/hugo/helpers.(highlighters).(github.com/gohugoio/hugo/helpers.chromaHighlighter)-fm(0xc4201f5500, 0x300, 0xc420094723, 0x4, 0xc420094729, 0x0, 0xc420034a80, 0x10549d0)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/content.go:91 +0x96
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight(0xc42039c250, 0x18cc9c0, 0xc4226c6090, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x101471d, 0xc42096e2f0, 0xc420094729, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/transform.go:58 +0xe5
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight-fm(0x18cc9c0, 0xc4226c6090, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/init.go:39 +0x73
reflect.Value.call(0x1909480, 0xc420291c70, 0x13, 0x19cd92e, 0x4, 0xc42096e280, 0x3, 0x3, 0x19c5840, 0x1911b01, ...)
	/usr/local/go/src/reflect/value.go:434 +0x906
reflect.Value.Call(0x1909480, 0xc420291c70, 0x13, 0xc42096e280, 0x3, 0x3, 0x2824f60, 0xc4204aa1c0, 0x18cd640)
	/usr/local/go/src/reflect/value.go:302 +0xa4
text/template.(*state).evalCall(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0x1909480, 0xc420291c70, 0x13, 0x2824ba0, 0xc42029ba70, 0xc420094710, ...)
	/usr/local/go/src/text/template/exec.go:670 +0x580
text/template.(*state).evalFunction(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0xc42029baa0, 0x2824ba0, 0xc42029ba70, 0xc4204aa180, 0x4, 0x4, ...)
	/usr/local/go/src/text/template/exec.go:538 +0x176
text/template.(*state).evalCommand(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0xc42029ba70, 0x0, 0x0, 0x0, 0xc4220d52e8, 0x1198ad5, ...)
	/usr/local/go/src/text/template/exec.go:435 +0x53a
text/template.(*state).evalPipeline(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0xc4201f9950, 0xc42029ba40, 0xc4220d5620, 0xc4220d5360)
	/usr/local/go/src/text/template/exec.go:408 +0x115
text/template.(*state).walk(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0x2824a20, 0xc42029bb00)
	/usr/local/go/src/text/template/exec.go:234 +0x4af
text/template.(*state).walk(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0x2824d80, 0xc42029ba40)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*state).walkIfOrWith(0xc4220d5600, 0xa, 0x193d560, 0xc420b48600, 0x16, 0xc4201f9900, 0xc42029ba40, 0xc42029bb30)
	/usr/local/go/src/text/template/exec.go:272 +0x1c4
text/template.(*state).walk(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0x2824d20, 0xc4204aa240)
	/usr/local/go/src/text/template/exec.go:239 +0x318
text/template.(*state).walk(0xc4220d5600, 0x193d560, 0xc420b48600, 0x16, 0x2824d80, 0xc4204a9f50)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*Template).execute(0xc420505ec0, 0x281a0a0, 0xc421e84000, 0x193d560, 0xc420b48600, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:197 +0x1f9
text/template.(*Template).Execute(0xc420505ec0, 0x281a0a0, 0xc421e84000, 0x193d560, 0xc420b48600, 0x0, 0xc4220d5700)
	/usr/local/go/src/text/template/exec.go:180 +0x53
html/template.(*Template).Execute(0xc4204a9ef0, 0x281a0a0, 0xc421e84000, 0x193d560, 0xc420b48600, 0xc4220d5738, 0xc420d51440)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/gohugoio/hugo/tpl.(*TemplateAdapter).Execute(0xc422669f70, 0x281a0a0, 0xc421e84000, 0x193d560, 0xc420b48600, 0x2c69008, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/template.go:76 +0x5b
github.com/gohugoio/hugo/hugolib.renderShortcodeWithPage(0x281ec60, 0xc422669f70, 0xc420b48600, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:721 +0xd3
github.com/gohugoio/hugo/hugolib.renderShortcode(0xc4202ed390, 0x2, 0x19cdaaa, 0x4, 0x19ce5b6, 0x4, 0xc4213e5c20, 0x17, 0xc4216b0532, 0x4, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:340 +0x60b
github.com/gohugoio/hugo/hugolib.prepareShortcodeForPage.func1(0xc4220d5c90, 0xc422602200, 0xc4213e5c00, 0x17)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:261 +0xa8
github.com/gohugoio/hugo/hugolib.(*shortcodeHandler).executeShortcodesForDelta(0xc420ca9e80, 0xc420c7e000, 0x1b, 0xc4220d5dc8)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:406 +0xd1
github.com/gohugoio/hugo/hugolib.handleShortcodes(0xc420c7e000, 0xc42177a000, 0x1393, 0x1c45, 0xc422538480, 0x202, 0xc422538240, 0x202, 0x240)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:611 +0x1aa
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender.func1(0xc420103180, 0xc421053690, 0xc421fe7680, 0xc42202a580)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:559 +0x233
created by github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:515 +0xd3

goroutine 347 [runnable]:
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).styleToCSS(0xc420ef6460, 0xc420492720, 0xc421a81160)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:211 +0x107
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).writeHTML(0xc420ef6460, 0x281a0a0, 0xc421caf030, 0xc420492720, 0xc420ba6200, 0x1a, 0x20, 0x28a4301, 0xc42102ed30)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:83 +0x50
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).Format(0xc420ef6460, 0x281a0a0, 0xc421caf030, 0xc420492720, 0xc420904740, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:76 +0xbe
github.com/gohugoio/hugo/helpers.chromaHighlight(0x281a0a0, 0xc421caf030, 0xc4218d8e32, 0x8e, 0xc420094723, 0x4, 0xc4203a60c0, 0x8, 0x281a7a0, 0xc420ef6460, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:226 +0x1da
github.com/gohugoio/hugo/helpers.highlighters.chromaHighlighter(0xc4201c0d20, 0x18cc900, 0xc420014f80, 0x3c, 0xc4218d8e32, 0x8e, 0xc420094723, 0x4, 0xc420094729, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:96 +0x1f9
github.com/gohugoio/hugo/helpers.(highlighters).(github.com/gohugoio/hugo/helpers.chromaHighlighter)-fm(0xc4218d8e32, 0x8e, 0xc420094723, 0x4, 0xc420094729, 0x0, 0xc4210b42a0, 0xc421866a20)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/content.go:91 +0x96
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight(0xc42039c250, 0x18cc9c0, 0xc4210b42a0, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0xc421866ac8, 0x10bcd0f, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/transform.go:58 +0xe5
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight-fm(0x18cc9c0, 0xc4210b42a0, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/init.go:39 +0x73
reflect.Value.call(0x1909480, 0xc420291c70, 0x13, 0x19cd92e, 0x4, 0xc420ef63c0, 0x3, 0x3, 0x19c5840, 0x1911b01, ...)
	/usr/local/go/src/reflect/value.go:434 +0x906
reflect.Value.Call(0x1909480, 0xc420291c70, 0x13, 0xc420ef63c0, 0x3, 0x3, 0x2824f60, 0xc4204aa1c0, 0x18cd640)
	/usr/local/go/src/reflect/value.go:302 +0xa4
text/template.(*state).evalCall(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0x1909480, 0xc420291c70, 0x13, 0x2824ba0, 0xc42029ba70, 0xc420094710, ...)
	/usr/local/go/src/text/template/exec.go:670 +0x580
text/template.(*state).evalFunction(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0xc42029baa0, 0x2824ba0, 0xc42029ba70, 0xc4204aa180, 0x4, 0x4, ...)
	/usr/local/go/src/text/template/exec.go:538 +0x176
text/template.(*state).evalCommand(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0xc42029ba70, 0x0, 0x0, 0x0, 0xc4218672e8, 0x1198ad5, ...)
	/usr/local/go/src/text/template/exec.go:435 +0x53a
text/template.(*state).evalPipeline(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0xc4201f9950, 0xc42029b9e0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:408 +0x115
text/template.(*state).walk(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0x2824a20, 0xc42029bb00)
	/usr/local/go/src/text/template/exec.go:234 +0x4af
text/template.(*state).walk(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0x2824d80, 0xc42029ba40)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*state).walkIfOrWith(0xc421867600, 0xa, 0x193d560, 0xc420f8b940, 0x16, 0xc4201f9900, 0xc42029ba40, 0xc42029bb30)
	/usr/local/go/src/text/template/exec.go:272 +0x1c4
text/template.(*state).walk(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0x2824d20, 0xc4204aa240)
	/usr/local/go/src/text/template/exec.go:239 +0x318
text/template.(*state).walk(0xc421867600, 0x193d560, 0xc420f8b940, 0x16, 0x2824d80, 0xc4204a9f50)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*Template).execute(0xc420505ec0, 0x281a0a0, 0xc421ce83f0, 0x193d560, 0xc420f8b940, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:197 +0x1f9
text/template.(*Template).Execute(0xc420505ec0, 0x281a0a0, 0xc421ce83f0, 0x193d560, 0xc420f8b940, 0xc4205bbc80, 0x4)
	/usr/local/go/src/text/template/exec.go:180 +0x53
html/template.(*Template).Execute(0xc4204a9ef0, 0x281a0a0, 0xc421ce83f0, 0x193d560, 0xc420f8b940, 0xc421867738, 0xc421ce83f0)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/gohugoio/hugo/tpl.(*TemplateAdapter).Execute(0xc421355da0, 0x281a0a0, 0xc421ce83f0, 0x193d560, 0xc420f8b940, 0x2f179a0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/template.go:76 +0x5b
github.com/gohugoio/hugo/hugolib.renderShortcodeWithPage(0x281ec60, 0xc421355da0, 0xc420f8b940, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:721 +0xd3
github.com/gohugoio/hugo/hugolib.renderShortcode(0xc4202ed390, 0x2, 0x19cdaaa, 0x4, 0x19ce5b6, 0x4, 0xc4209991c0, 0x17, 0xc4218d8e0a, 0x4, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:340 +0x60b
github.com/gohugoio/hugo/hugolib.prepareShortcodeForPage.func1(0xc421867c90, 0xc4209712f0, 0xc4209991a0, 0x17)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:261 +0xa8
github.com/gohugoio/hugo/hugolib.(*shortcodeHandler).executeShortcodesForDelta(0xc420910b00, 0xc420f82500, 0x1b, 0xc421867dc8)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:406 +0xd1
github.com/gohugoio/hugo/hugolib.handleShortcodes(0xc420f82500, 0xc4219be000, 0x3294, 0x57e1, 0xc4219b4a00, 0x4d9, 0xc4219b4000, 0x4d9, 0x500)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:611 +0x1aa
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender.func1(0xc420103180, 0xc421053690, 0xc421fe7680, 0xc42202a580)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:559 +0x233
created by github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:515 +0xd3

goroutine 346 [runnable]:
github.com/dlclark/regexp2/syntax.CharSet.CharIn(0xc420b4a540, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x28, 0x8)
	/Users/bep/go/src/github.com/dlclark/regexp2/syntax/charclass.go:226 +0x22d
github.com/dlclark/regexp2.(*runner).execute(0xc420c75600, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:600 +0xfc0
github.com/dlclark/regexp2.(*runner).scan(0xc420c75600, 0xc421f31208, 0x222, 0x23e, 0x0, 0x0, 0x7fffffffffffffff, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:144 +0x1e1
github.com/dlclark/regexp2.(*Regexp).run(0xc421331400, 0xc421701e00, 0xffffffffffffffff, 0xc421f31208, 0x222, 0x23e, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/runner.go:91 +0xff
github.com/dlclark/regexp2.(*Regexp).FindRunesMatch(0xc421331400, 0xc421f31208, 0x222, 0x23e, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/dlclark/regexp2/regexp.go:163 +0x57
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.matchRules(0xc421f31208, 0x222, 0x23e, 0xc4202de000, 0x18, 0x20, 0x6, 0x0, 0x0, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:281 +0x130
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0xc421eb2160)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:181 +0x206
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*LexerState).Iterator.func1(0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/regexp.go:172 +0x8e
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.(*coalescer).Tokenise.func1(0xc420b47700)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/coalesce.go:15 +0x4b
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma.Iterator.Tokens(0xc420b5ea20, 0x1a6afe8, 0xc4218627c0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/iterator.go:13 +0x5f
github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html.(*Formatter).Format(0xc42175c910, 0x281a0a0, 0xc420fe25b0, 0xc420492720, 0xc420b5ea20, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/vendor/github.com/alecthomas/chroma/formatters/html/html.go:76 +0x74
github.com/gohugoio/hugo/helpers.chromaHighlight(0x281a0a0, 0xc420fe25b0, 0xc42160484d, 0x361, 0xc420094723, 0x4, 0xc4203a60c0, 0x8, 0x281a7a0, 0xc42175c910, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:226 +0x1da
github.com/gohugoio/hugo/helpers.highlighters.chromaHighlighter(0xc4201c0d20, 0x18cc900, 0xc420014f80, 0x3c, 0xc42160484d, 0x361, 0xc420094723, 0x4, 0xc420094729, 0x0, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/pygments.go:96 +0x1f9
github.com/gohugoio/hugo/helpers.(highlighters).(github.com/gohugoio/hugo/helpers.chromaHighlighter)-fm(0xc42160484d, 0x361, 0xc420094723, 0x4, 0xc420094729, 0x0, 0xc421701900, 0xc421862a20)
	/Users/bep/go/src/github.com/gohugoio/hugo/helpers/content.go:91 +0x96
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight(0xc42039c250, 0x18cc9c0, 0xc421701900, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0xc421862ac8, 0x10bcd0f, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/transform.go:58 +0xe5
github.com/gohugoio/hugo/tpl/transform.(*Namespace).Highlight-fm(0x18cc9c0, 0xc421701900, 0xc420094723, 0x4, 0xc420094729, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/transform/init.go:39 +0x73
reflect.Value.call(0x1909480, 0xc420291c70, 0x13, 0x19cd92e, 0x4, 0xc42175c870, 0x3, 0x3, 0x19c5840, 0x1911b01, ...)
	/usr/local/go/src/reflect/value.go:434 +0x906
reflect.Value.Call(0x1909480, 0xc420291c70, 0x13, 0xc42175c870, 0x3, 0x3, 0x2824f60, 0xc4204aa1c0, 0x18cd640)
	/usr/local/go/src/reflect/value.go:302 +0xa4
text/template.(*state).evalCall(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0x1909480, 0xc420291c70, 0x13, 0x2824ba0, 0xc42029ba70, 0xc420094710, ...)
	/usr/local/go/src/text/template/exec.go:670 +0x580
text/template.(*state).evalFunction(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0xc42029baa0, 0x2824ba0, 0xc42029ba70, 0xc4204aa180, 0x4, 0x4, ...)
	/usr/local/go/src/text/template/exec.go:538 +0x176
text/template.(*state).evalCommand(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0xc42029ba70, 0x0, 0x0, 0x0, 0xc4218632e8, 0x1198ad5, ...)
	/usr/local/go/src/text/template/exec.go:435 +0x53a
text/template.(*state).evalPipeline(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0xc4201f9950, 0xc42029b9e0, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:408 +0x115
text/template.(*state).walk(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0x2824a20, 0xc42029bb00)
	/usr/local/go/src/text/template/exec.go:234 +0x4af
text/template.(*state).walk(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0x2824d80, 0xc42029ba40)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*state).walkIfOrWith(0xc421863600, 0xa, 0x193d560, 0xc421212c80, 0x16, 0xc4201f9900, 0xc42029ba40, 0xc42029bb30)
	/usr/local/go/src/text/template/exec.go:272 +0x1c4
text/template.(*state).walk(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0x2824d20, 0xc4204aa240)
	/usr/local/go/src/text/template/exec.go:239 +0x318
text/template.(*state).walk(0xc421863600, 0x193d560, 0xc421212c80, 0x16, 0x2824d80, 0xc4204a9f50)
	/usr/local/go/src/text/template/exec.go:242 +0x11d
text/template.(*Template).execute(0xc420505ec0, 0x281a0a0, 0xc420fe2540, 0x193d560, 0xc421212c80, 0x0, 0x0)
	/usr/local/go/src/text/template/exec.go:197 +0x1f9
text/template.(*Template).Execute(0xc420505ec0, 0x281a0a0, 0xc420fe2540, 0x193d560, 0xc421212c80, 0xc420b93480, 0x4)
	/usr/local/go/src/text/template/exec.go:180 +0x53
html/template.(*Template).Execute(0xc4204a9ef0, 0x281a0a0, 0xc420fe2540, 0x193d560, 0xc421212c80, 0xc421863738, 0xc420fe2540)
	/usr/local/go/src/html/template/template.go:122 +0x8c
github.com/gohugoio/hugo/tpl.(*TemplateAdapter).Execute(0xc4217017e0, 0x281a0a0, 0xc420fe2540, 0x193d560, 0xc421212c80, 0x2c6fe10, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/tpl/template.go:76 +0x5b
github.com/gohugoio/hugo/hugolib.renderShortcodeWithPage(0x281ec60, 0xc4217017e0, 0xc421212c80, 0x0, 0x0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:721 +0xd3
github.com/gohugoio/hugo/hugolib.renderShortcode(0xc4202ed390, 0x2, 0x19cdaaa, 0x4, 0x19ce5b6, 0x4, 0xc4216e9140, 0x17, 0xc42160480a, 0x4, ...)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:340 +0x60b
github.com/gohugoio/hugo/hugolib.prepareShortcodeForPage.func1(0xc421863c90, 0xc4208d8300, 0xc4216e9120, 0x17)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:261 +0xa8
github.com/gohugoio/hugo/hugolib.(*shortcodeHandler).executeShortcodesForDelta(0xc42118ce40, 0xc42171b400, 0x1b, 0xc421863dc8)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/shortcode.go:406 +0xd1
github.com/gohugoio/hugo/hugolib.handleShortcodes(0xc42171b400, 0xc42126ea80, 0xd10, 0x29fc, 0xc4213da840, 0x28f, 0xc4213da580, 0x28f, 0x2c0)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:611 +0x1aa
github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender.func1(0xc420103180, 0xc421053690, 0xc421fe7680, 0xc42202a580)
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:559 +0x233
created by github.com/gohugoio/hugo/hugolib.(*Site).preparePagesForRender
	/Users/bep/go/src/github.com/gohugoio/hugo/hugolib/hugo_sites.go:515 +0xd3
@alecthomas
Copy link
Owner

What commit is that running?

@alecthomas
Copy link
Owner

Also, do you have a link to the code that is calling it?

@bep
Copy link
Contributor Author

bep commented Sep 21, 2017

What commit is that running?

commit e5e7b57c46d6290a92e7b9d3c4048bdf90d6a2b2
Author: Alec Thomas <alec@swapoff.org>
Date:   Thu Sep 21 12:54:18 2017 +1000

    Fix style tests.

I'm building the Hugo docs site from this PR:

gohugoio/hugo#3891

@bep
Copy link
Contributor Author

bep commented Sep 21, 2017

But the stack trace points to this:

ruleIndex, rule, groups := matchRules(l.Text[l.Pos:], l.Rules[l.State])

@alecthomas
Copy link
Owner

Any idea what language was being formatted when it failed? I suspect this is due to the Combined() mutator, which is the only location l.Rules is modified. Though I would have expected to see it in one of the stacks.

@bep
Copy link
Contributor Author

bep commented Sep 21, 2017

Any idea what language was being formatted when it failed?

Most likely html; maybe bash.

@alecthomas
Copy link
Owner

(Whoops, didn't mean to close it.)

Can you test that commit? I moved the Combined() mutation to a pre-processing phase, which is locked behind a mutex.

@alecthomas alecthomas reopened this Sep 21, 2017
@alecthomas
Copy link
Owner

Thanks for all the bug reports, by the way!

@bep
Copy link
Contributor Author

bep commented Sep 21, 2017

Thanks for all the bug reports, by the way!

Your commit looks good, I cannot reproduce it.

These bug reports are entirely out of self-interest (I would much rather fixing them now than having to get mysterious bug reports in the wild), so thanks for fixing them.

@bep bep closed this as completed Sep 21, 2017
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

No branches or pull requests

2 participants