Skip to content

Panic while updating page on docker-serve #17890

Closed
@Colstuwjx

Description

@Colstuwjx

This is a Bug Report

Hi team,

I'm running website locally, with make docker-image and make docker-serve.The first step for docker-serve works fine, but when I update the page ( in my case, it was just some modification under page federation v1 ), it panic with errors below:

Change detected, rebuilding site.
2019-12-01 03:24:25.914 +0000
Source changed "/src/content/en/docs/tasks/federation/set-up-cluster-federation-kubefed.md": WRITE
Total in 36 ms
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xbe5a82]

goroutine 1688 [running]:
github.com/gohugoio/hugo/hugofs.(*fileInfoMeta).IsDir(0xc02c064040, 0xc000413f00)
	<autogenerated>:1 +0x32
github.com/gohugoio/hugo/hugofs.(*FilterFs).LstatIfPossible(0xc000413f20, 0xc0187d87e0, 0x16, 0x4936f5, 0x7fabf5f19670, 0x0, 0x10, 0x16c7ae0)
	/root/project/hugo/hugofs/filter_fs.go:152 +0x95
github.com/gohugoio/hugo/hugofs.(*FilterFs).Stat(0xc000413f20, 0xc0187d87e0, 0x16, 0xc000699440, 0x16cb160, 0x49090d, 0x20300a)
	/root/project/hugo/hugofs/filter_fs.go:208 +0x3f
github.com/gohugoio/hugo/hugolib.(*pagesCollector).collectDir(0xc02eb18960, 0xc0187d87e0, 0x16, 0xc01c322d01, 0x0, 0xc0187d87e0, 0x16)
	/root/project/hugo/hugolib/pages_capture.go:151 +0x66
github.com/gohugoio/hugo/hugolib.(*pagesCollector).Collect(0xc02eb18960, 0xc02eb18960, 0xc000413f20)
	/root/project/hugo/hugolib/pages_capture.go:126 +0x2df
github.com/gohugoio/hugo/hugolib.(*Site).readAndProcessContent(0xc00047c380, 0xc0109118d0, 0x1, 0x1, 0x1, 0x1)
	/root/project/hugo/hugolib/site.go:1249 +0x189
github.com/gohugoio/hugo/hugolib.(*Site).processPartial(0xc00047c380, 0xc03567e340, 0xc02dcdc5d0, 0xc0213ef8e0, 0x1, 0x1, 0x0, 0x2aea0d0)
	/root/project/hugo/hugolib/site.go:1050 +0xdcf
github.com/gohugoio/hugo/hugolib.(*HugoSites).process(0xc000206b00, 0xc03567e340, 0xc02dcdc5d0, 0xc0213ef840, 0x1, 0x1, 0xc005d6d770, 0x20)
	/root/project/hugo/hugolib/hugo_sites_build.go:225 +0x97
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2.2()
	/root/project/hugo/hugolib/hugo_sites_build.go:103 +0x64
runtime/trace.WithRegion(0x1c0bfc0, 0xc02dcdc570, 0x184d7f3, 0x7, 0xc005d6d830)
	/usr/local/go/src/runtime/trace/annotation.go:137 +0xe9
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func2(0xc005d6d8b8, 0x20)
	/root/project/hugo/hugolib/hugo_sites_build.go:105 +0x176
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build.func3()
	/root/project/hugo/hugolib/hugo_sites_build.go:122 +0x2f
runtime/trace.WithRegion(0x1c0bfc0, 0xc02dcdc570, 0x184d791, 0x7, 0xc005d6d9c8)
	/usr/local/go/src/runtime/trace/annotation.go:137 +0xe9
github.com/gohugoio/hugo/hugolib.(*HugoSites).Build(0xc000206b00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc02dcdc540, 0xc0213ef840, 0x1, ...)
	/root/project/hugo/hugolib/hugo_sites_build.go:124 +0x7d9
github.com/gohugoio/hugo/commands.(*commandeer).rebuildSites(0xc0005d5d40, 0xc0213ef840, 0x1, 0x1, 0x0, 0x0)
	/root/project/hugo/commands/hugo.go:738 +0x3c2
github.com/gohugoio/hugo/commands.(*commandeer).handleEvents(0xc0005d5d40, 0xc03184d740, 0xc000f95830, 0xc03e3047e0, 0x2, 0x2, 0xc0278b9bc0)
	/root/project/hugo/commands/hugo.go:1095 +0x76e
github.com/gohugoio/hugo/commands.(*commandeer).newWatcher.func1(0xc03184d740, 0xc0005d5d40, 0xc000f95830, 0xc0278b9bc0)
	/root/project/hugo/commands/hugo.go:842 +0x1d8
created by github.com/gohugoio/hugo/commands.(*commandeer).newWatcher
	/root/project/hugo/commands/hugo.go:838 +0x28e
make: *** [docker-serve] Error 2

Problem:
panic while updating page under docker serve, and I need to ctrl-c the serve and re-run it.

Proposed Solution:
it seems that hugo build broken.

Page to Update:
it's about hugo, not pages related issue, I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions