How can I troubleshoot concurrent map read and write errors?

We’ve been using Hugo for a couple of years and have been getting these errors intermittently when building locally on latest MacOS. Now we’re getting them on the server too. I’ve searched this site for clues, and it looks like this type of error isn’t caused by any one thing. What should I look for? Also, where should I look for complete log output/stack trace on Mac?

hugo env
Hugo Static Site Generator v0.73.0/extended darwin/amd64 BuildDate: unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.14.4"

Partial output:

goroutine 148 [runnable]:
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc000e62828, 0x56a6ae0, 0xc01996ff98, 0x95, 0x591e060, 0xc0005e7b90, 0x1c213, 0x5ee6660, 0xc0005281e0, 0xc0006b0c7d, ...)
        /private/tmp/hugo-20200623-60686-ovbxfj/hugo-0.73.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:304 +0x7da
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalField(0xc000e62828, 0x56a6ae0, 0xc01996ff98, 0x95, 0xc0006b0c7d, 0x3, 0x5ee6660, 0xc0005281e0, 0x0, 0x0, ...)
        /private/tmp/hugo-20200623-60686-ovbxfj/hugo-0.73.0/src/github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:172 +0x5fc
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFieldChain(0xc000e62828, 0x56a6ae0, 0xc01996ff98, 0x95, 0x591e060, 0xc0005e7b90, 0x16, 0x5ee6660, 0xc0005281e0, 0xc0005ab2f0, ...)

Here is a partial stack trace from the server, different environment (not sure of the details, but I can find out):

Building sites … WARN 2020/07/01 13:33:52 Page.URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url 
fatal error: concurrent map read and map write 
goroutine 128 [running]: 
runtime.throw(0x1eb5fbe, 0x21) 
	/usr/local/go/src/runtime/panic.go:774 +0x79 fp=0xc002c9b698 sp=0xc002c9b668 pc=0x4340a9 
runtime.mapaccess1_faststr(0x1b702a0, 0xc00052e0f0, 0xc0001ae9c7, 0x10, 0x2297e40) 
	/usr/local/go/src/runtime/map_faststr.go:21 +0x456 fp=0xc002c9b708 sp=0xc002c9b698 pc=0x414b06 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkTemplate(0xc002c9c548, 0x1e172c0, 0xc0023bcdd0, 0x194, 0xc000292f40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:402 +0x95 fp=0xc002c9b7f0 sp=0xc002c9b708 pc=0xdbc7c5 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e172c0, 0xc0023bcdd0, 0x194, 0x2297fc0, 0xc000292f40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:271 +0x20c fp=0xc002c9b880 sp=0xc002c9b7f0 pc=0xdbb8ec 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e172c0, 0xc0023bcdd0, 0x194, 0x2297e40, 0xc000433200) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9b910 sp=0xc002c9b880 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9c548, 0xa, 0x1e172c0, 0xc0023bcdd0, 0x194, 0xc0009814a0, 0xc0004331d0, 0xc000433200) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:299 +0x24f fp=0xc002c9b9b8 sp=0xc002c9b910 pc=0xdbbeaf 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e172c0, 0xc0023bcdd0, 0x194, 0x2297e00, 0xc000292fc0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9ba48 sp=0xc002c9b9b8 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e172c0, 0xc0023bcdd0, 0x194, 0x2297e40, 0xc000432ff0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9bad8 sp=0xc002c9ba48 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange.func1(0x1ac8ac0, 0xc005d86878, 0x82, 0x1e172c0, 0xc0023bcdd0, 0x194) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:353 +0x12b fp=0xc002c9bb28 sp=0xc002c9bad8 pc=0xdcd53b 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0xc000293040) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:362 +0x51e fp=0xc002c9bc98 sp=0xc002c9bb28 pc=0xdbc3fe 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297f40, 0xc000293040) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:269 +0x444 fp=0xc002c9bd28 sp=0xc002c9bc98 pc=0xdbbb24 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e40, 0xc000432f30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9bdb8 sp=0xc002c9bd28 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9c548, 0xa, 0x1e2cd00, 0xc0004abb00, 0x16, 0xc00083ff80, 0xc000432ba0, 0xc000432f30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:299 +0x24f fp=0xc002c9be60 sp=0xc002c9bdb8 pc=0xdbbeaf 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e00, 0xc000293180) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9bef0 sp=0xc002c9be60 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e40, 0xc0004325d0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9bf80 sp=0xc002c9bef0 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9c548, 0xa, 0x1e2cd00, 0xc0004abb00, 0x16, 0xc00083fc80, 0xc0004325d0, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1f7 fp=0xc002c9c028 sp=0xc002c9bf80 pc=0xdbbe57 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e00, 0xc0002932c0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9c0b8 sp=0xc002c9c028 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e40, 0xc00041dd40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9c148 sp=0xc002c9c0b8 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9c548, 0xa, 0x1e2cd00, 0xc0004abb00, 0x16, 0xc0004de360, 0xc00041dd40, 0xc000433350) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1f7 fp=0xc002c9c1f0 sp=0xc002c9c148 pc=0xdbbe57 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e00, 0xc0002936c0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9c280 sp=0xc002c9c1f0 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1e2cd00, 0xc0004abb00, 0x16, 0x2297e40, 0xc00038be30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9c310 sp=0xc002c9c280 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9c548, 0x13, 0x1b73ae0, 0xc005ff3698, 0x95, 0xc0004de300, 0xc00038be30, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:294 +0x190 fp=0xc002c9c3b8 sp=0xc002c9c310 pc=0xdbbdf0 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1b73ae0, 0xc005ff3698, 0x95, 0x2298080, 0xc000293700) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:277 +0x2c0 fp=0xc002c9c448 sp=0xc002c9c3b8 pc=0xdbb9a0 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9c548, 0x1b73ae0, 0xc005ff3698, 0x95, 0x2297e40, 0xc00038bbf0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9c4d8 sp=0xc002c9c448 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkTemplate(0xc002c9d318, 0x1e172c0, 0xc000d97920, 0x194, 0xc000292f40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:416 +0x217 fp=0xc002c9c5c0 sp=0xc002c9c4d8 pc=0xdbc947 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e172c0, 0xc000d97920, 0x194, 0x2297fc0, 0xc000292f40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:271 +0x20c fp=0xc002c9c650 sp=0xc002c9c5c0 pc=0xdbb8ec 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e172c0, 0xc000d97920, 0x194, 0x2297e40, 0xc000433200) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9c6e0 sp=0xc002c9c650 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9d318, 0xa, 0x1e172c0, 0xc000d97920, 0x194, 0xc0009814a0, 0xc0004331d0, 0xc000433200) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:299 +0x24f fp=0xc002c9c788 sp=0xc002c9c6e0 pc=0xdbbeaf 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e172c0, 0xc000d97920, 0x194, 0x2297e00, 0xc000292fc0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9c818 sp=0xc002c9c788 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e172c0, 0xc000d97920, 0x194, 0x2297e40, 0xc000432ff0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9c8a8 sp=0xc002c9c818 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange.func1(0x1ac8ac0, 0xc005d86828, 0x82, 0x1e172c0, 0xc000d97920, 0x194) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:353 +0x12b fp=0xc002c9c8f8 sp=0xc002c9c8a8 pc=0xdcd53b 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0xc000293040) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:362 +0x51e fp=0xc002c9ca68 sp=0xc002c9c8f8 pc=0xdbc3fe 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297f40, 0xc000293040) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:269 +0x444 fp=0xc002c9caf8 sp=0xc002c9ca68 pc=0xdbbb24 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e40, 0xc000432f30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9cb88 sp=0xc002c9caf8 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9d318, 0xa, 0x1e2cd00, 0xc0009033e0, 0x16, 0xc00083ff80, 0xc000432ba0, 0xc000432f30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:299 +0x24f fp=0xc002c9cc30 sp=0xc002c9cb88 pc=0xdbbeaf 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e00, 0xc000293180) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9ccc0 sp=0xc002c9cc30 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e40, 0xc0004325d0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9cd50 sp=0xc002c9ccc0 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9d318, 0xa, 0x1e2cd00, 0xc0009033e0, 0x16, 0xc00083fc80, 0xc0004325d0, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1f7 fp=0xc002c9cdf8 sp=0xc002c9cd50 pc=0xdbbe57 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e00, 0xc0002932c0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9ce88 sp=0xc002c9cdf8 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e40, 0xc00041dd40) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9cf18 sp=0xc002c9ce88 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9d318, 0xa, 0x1e2cd00, 0xc0009033e0, 0x16, 0xc0004de360, 0xc00041dd40, 0xc000433350) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1f7 fp=0xc002c9cfc0 sp=0xc002c9cf18 pc=0xdbbe57 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e00, 0xc0002936c0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9d050 sp=0xc002c9cfc0 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1e2cd00, 0xc0009033e0, 0x16, 0x2297e40, 0xc00038be30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9d0e0 sp=0xc002c9d050 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9d318, 0x13, 0x1b73ae0, 0xc005eba6d8, 0x95, 0xc0004de300, 0xc00038be30, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:294 +0x190 fp=0xc002c9d188 sp=0xc002c9d0e0 pc=0xdbbdf0 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1b73ae0, 0xc005eba6d8, 0x95, 0x2298080, 0xc000293700) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:277 +0x2c0 fp=0xc002c9d218 sp=0xc002c9d188 pc=0xdbb9a0 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9d318, 0x1b73ae0, 0xc005eba6d8, 0x95, 0x2297e40, 0xc00038bbf0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9d2a8 sp=0xc002c9d218 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkTemplate(0xc002c9da48, 0x1e172c0, 0xc000124440, 0x194, 0xc0008ccb80) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:416 +0x217 fp=0xc002c9d390 sp=0xc002c9d2a8 pc=0xdbc947 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e172c0, 0xc000124440, 0x194, 0x2297fc0, 0xc0008ccb80) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:271 +0x20c fp=0xc002c9d420 sp=0xc002c9d390 pc=0xdbb8ec 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e172c0, 0xc000124440, 0x194, 0x2297e40, 0xc000902720) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9d4b0 sp=0xc002c9d420 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange.func1(0x1ac8ac0, 0xc005d863e8, 0x82, 0x1e172c0, 0xc000124440, 0x194) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:353 +0x12b fp=0xc002c9d500 sp=0xc002c9d4b0 pc=0xdcd53b 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkRange(0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0008ccbc0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:362 +0x51e fp=0xc002c9d670 sp=0xc002c9d500 pc=0xdbc3fe 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297f40, 0xc0008ccbc0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:269 +0x444 fp=0xc002c9d700 sp=0xc002c9d670 pc=0xdbbb24 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e40, 0xc000902660) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9d790 sp=0xc002c9d700 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9da48, 0xa, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0004de060, 0xc00038ba70, 0xc000902660) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:299 +0x24f fp=0xc002c9d838 sp=0xc002c9d790 pc=0xdbbeaf 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e00, 0xc0008ccc00) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9d8c8 sp=0xc002c9d838 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e40, 0xc00041db30) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9d958 sp=0xc002c9d8c8 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*Template).executeWithState(0xc00017d7c0, 0xc002c9da48, 0x1e2cd00, 0xc001259ec0, 0x16, 0x0, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:93 +0xd3 fp=0xc002c9d9e0 sp=0xc002c9d958 pc=0xdc9043 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*executer).Execute(0xc000506f90, 0x9906200, 0xc0001762d0, 0x2263a60, 0xc0073e42a0, 0x1e2cd00, 0xc001259ec0, 0x44c14e, 0xc00029da90) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:79 +0x1fc fp=0xc002c9dac0 sp=0xc002c9d9e0 pc=0xdc8e1c 
github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).Execute(0xc0008823f0, 0x22759c0, 0xc0001762d0, 0x2263a60, 0xc0073e42a0, 0x1e2cd00, 0xc001259ec0, 0x0, 0x0) 
	/root/project/hugo/tpl/tplimpl/template.go:233 +0x141 fp=0xc002c9dbd8 sp=0xc002c9dac0 pc=0xf2b351 
github.com/gohugoio/hugo/tpl/partials.(*Namespace).Include(0xc000506690, 0xc00016e7e2, 0x9, 0xc005b79540, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) 
	/root/project/hugo/tpl/partials/partials.go:142 +0x23e fp=0xc002c9dcd8 sp=0xc002c9dbd8 pc=0xf063fe 
github.com/gohugoio/hugo/tpl/partials.(*Namespace).Include-fm(0xc00016e7e2, 0x9, 0xc005b79540, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) 
	/root/project/hugo/tpl/partials/partials.go:95 +0x6a fp=0xc002c9dd38 sp=0xc002c9dcd8 pc=0xf079fa 
runtime.call128(0xc0016fd230, 0xc0005066b0, 0xc005b31360, 0x2800000048) 
	/usr/local/go/src/runtime/asm_amd64.s:541 +0x59 fp=0xc002c9ddc8 sp=0xc002c9dd38 pc=0x460d99 
reflect.Value.call(0x1b9efa0, 0xc0005066b0, 0x13, 0x1e33810, 0x4, 0xc005b90ba0, 0x2, 0x2, 0x16, 0x22d18c0, ...) 
	/usr/local/go/src/reflect/value.go:460 +0x5fd fp=0xc002c9dfe8 sp=0xc002c9ddc8 pc=0x4de12d 
reflect.Value.Call(0x1b9efa0, 0xc0005066b0, 0x13, 0xc005b90ba0, 0x2, 0x2, 0x80a1400, 0x0, 0x1) 
	/usr/local/go/src/reflect/value.go:321 +0xbb fp=0xc002c9e068 sp=0xc002c9dfe8 pc=0x4dd8eb 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.safeCall(0x1b9efa0, 0xc0005066b0, 0x13, 0xc005b90ba0, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/funcs.go:352 +0xe1 fp=0xc002c9e108 sp=0xc002c9e068 pc=0xdc4b81 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0x1b9efa0, 0xc0005066b0, 0x13, 0x2297d00, 0xc00096e4b0, 0xc00016e7d9, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:297 +0x619 fp=0xc002c9e258 sp=0xc002c9e108 pc=0xdcab89 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFunction(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc00096e4e0, 0x2297d00, 0xc00096e4b0, 0xc0008f5580, 0x3, 0x4, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:130 +0x174 fp=0xc002c9e358 sp=0xc002c9e258 pc=0xdc9264 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCommand(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc00096e4b0, 0x1bb6420, 0x2f8ae78, 0x99, 0xc002c9e508, 0xdc186b, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:465 +0x665 fp=0xc002c9e428 sp=0xc002c9e358 pc=0xdbd665 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalPipeline(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0008c1260, 0x0, 0x0, 0x98) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:434 +0x121 fp=0xc002c9e518 sp=0xc002c9e428 pc=0xdbcbd1 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297c00, 0xc00096e510) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:258 +0x4a2 fp=0xc002c9e5a8 sp=0xc002c9e518 pc=0xdbbb82 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e40, 0xc00090b3e0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9e638 sp=0xc002c9e5a8 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*Template).executeWithState(0xc0008f4d40, 0xc002c9e728, 0x1e2cd00, 0xc001259ec0, 0x16, 0x0, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:93 +0xd3 fp=0xc002c9e6c0 sp=0xc002c9e638 pc=0xdc9043 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*executer).Execute(0xc000506f90, 0x9906200, 0xc0007c0b40, 0x2263a60, 0xc006cd66f0, 0x1e2cd00, 0xc001259ec0, 0x44c14e, 0xc00029d1a0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:79 +0x1fc fp=0xc002c9e7a0 sp=0xc002c9e6c0 pc=0xdc8e1c 
github.com/gohugoio/hugo/tpl/tplimpl.(*templateExec).Execute(0xc0008823f0, 0x22759c0, 0xc0007c0b40, 0x2263a60, 0xc006cd66f0, 0x1e2cd00, 0xc001259ec0, 0x0, 0x0) 
	/root/project/hugo/tpl/tplimpl/template.go:233 +0x141 fp=0xc002c9e8b8 sp=0xc002c9e7a0 pc=0xf2b351 
github.com/gohugoio/hugo/tpl/partials.(*Namespace).Include(0xc000506690, 0xc0014d2e60, 0x1c, 0xc0025a6db0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) 
	/root/project/hugo/tpl/partials/partials.go:142 +0x23e fp=0xc002c9e9b8 sp=0xc002c9e8b8 pc=0xf063fe 
github.com/gohugoio/hugo/tpl/partials.(*Namespace).Include-fm(0xc0014d2e60, 0x1c, 0xc0025a6db0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0) 
	/root/project/hugo/tpl/partials/partials.go:95 +0x6a fp=0xc002c9ea18 sp=0xc002c9e9b8 pc=0xf079fa 
runtime.call128(0xc0016fd230, 0xc0005066b0, 0xc0024b30e0, 0x2800000048) 
	/usr/local/go/src/runtime/asm_amd64.s:541 +0x59 fp=0xc002c9eaa8 sp=0xc002c9ea18 pc=0x460d99 
reflect.Value.call(0x1b9efa0, 0xc0005066b0, 0x13, 0x1e33810, 0x4, 0xc002e1df20, 0x2, 0x2, 0x16, 0x22d18c0, ...) 
	/usr/local/go/src/reflect/value.go:460 +0x5fd fp=0xc002c9ecc8 sp=0xc002c9eaa8 pc=0x4de12d 
reflect.Value.Call(0x1b9efa0, 0xc0005066b0, 0x13, 0xc002e1df20, 0x2, 0x2, 0x80a1400, 0x0, 0xc0006f4778) 
	/usr/local/go/src/reflect/value.go:321 +0xbb fp=0xc002c9ed48 sp=0xc002c9ecc8 pc=0x4dd8eb 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.safeCall(0x1b9efa0, 0xc0005066b0, 0x13, 0xc002e1df20, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/funcs.go:352 +0xe1 fp=0xc002c9ede8 sp=0xc002c9ed48 pc=0xdc4b81 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCall(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x1b9efa0, 0xc0005066b0, 0x13, 0x2297d00, 0xc0056ee0c0, 0xc000538bb2, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:297 +0x619 fp=0xc002c9ef38 sp=0xc002c9ede8 pc=0xdcab89 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalFunction(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0056ee0f0, 0x2297d00, 0xc0056ee0c0, 0xc0056de140, 0x3, 0x4, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:130 +0x174 fp=0xc002c9f038 sp=0xc002c9ef38 pc=0xdc9264 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalCommand(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0056ee0c0, 0x1bb6420, 0x2f8ae78, 0x99, 0xc002c9f218, 0xdbd7a1, ...) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:465 +0x665 fp=0xc002c9f108 sp=0xc002c9f038 pc=0xdbd665 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).evalPipeline(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0056adaa0, 0x0, 0x0, 0x1e2cd00) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:434 +0x121 fp=0xc002c9f1f8 sp=0xc002c9f108 pc=0xdbcbd1 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297c00, 0xc0056ee1e0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:258 +0x4a2 fp=0xc002c9f288 sp=0xc002c9f1f8 pc=0xdbbb82 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e40, 0xc0056ee060) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9f318 sp=0xc002c9f288 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walkIfOrWith(0xc002c9f5d0, 0xa, 0x1e2cd00, 0xc001259ec0, 0x16, 0xc0056ada40, 0xc0056ee060, 0xc0056ee240) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:296 +0x1f7 fp=0xc002c9f3c0 sp=0xc002c9f318 pc=0xdbbe57 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e00, 0xc0056de280) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:263 +0x32e fp=0xc002c9f450 sp=0xc002c9f3c0 pc=0xdbba0e 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*state).walk(0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x2297e40, 0xc0056c1ad0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/exec.go:266 +0x149 fp=0xc002c9f4e0 sp=0xc002c9f450 pc=0xdbb829 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*Template).executeWithState(0xc005358ac0, 0xc002c9f5d0, 0x1e2cd00, 0xc001259ec0, 0x16, 0x0, 0x0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:93 +0xd3 fp=0xc002c9f568 sp=0xc002c9f4e0 pc=0xdc9043 
github.com/gohugoio/hugo/tpl/internal/go_templates/texttemplate.(*executer).Execute(0xc000506f90, 0x9906200, 0xc000d5d2c0, 0x2263a60, 0xc007e50c90, 0x1e2cd00, 0xc001259ec0, 0x22adcc0, 0xc002c9f6b0) 
	/root/project/hugo/tpl/internal/go_templates/texttemplate/hugo_template.go:79 +0x1fc fp=0xc002c9f648 sp=0xc002c9f568 pc=0xdc8e1c

I’m pretty sure that this is this bug:

I implemented a workaround for this in Hugo last week, but benchmarks showed that it was a little on the expensive side, so I need to revisit it (make it cheaper).

I have not seen this on any of my sites, so I assumed it was something exotic.

If you use any of the Google Analytics internal Hugo templates, I suspect that is your culprit. If so, you should be able to work around this by copy this (or the other) template into your project, and remove the usage off the __ga_js_set_doNotTrack etc. inline templates.

Thanks for responding @bep. We do use GA but not one of the templates – haven’t heard of those. We just have the standard “isogram” script at the top of the page. Should we be doing it differently?

If you want to work around that error before I (or the Go team) fixes it, yes.

But it’s a little hard to say what. I have seen this error situation with a combination of

  • Inline templates (“define”) used in “script” tags

Haven’t look at this since your reply @bep, but I’m confused. We don’t currently use one of the templates, but it sounds like the problem is related to templates… so how would using a template help? Or, another way to ask: how would copying that code and removing the inline template part be different than what we are currently doing?