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

Panic while updating page on docker-serve #17890

Closed
Colstuwjx opened this issue Dec 1, 2019 · 5 comments · Fixed by #17894
Closed

Panic while updating page on docker-serve #17890

Colstuwjx opened this issue Dec 1, 2019 · 5 comments · Fixed by #17894
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@Colstuwjx
Copy link
Contributor

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.

@Colstuwjx
Copy link
Contributor Author

/kind bug

@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Dec 1, 2019
@tengqm
Copy link
Contributor

tengqm commented Dec 1, 2019

Your hugo version? You may want to file an issue at hugo site.

@Colstuwjx
Copy link
Contributor Author

I'm using our master branch makefile, which said the hugo version is 0.57.2.

Yes, maybe it would be an issue of hugo, but I just wonder anyone could reproduce this issue, update the content while website is docker-serve should be a common case.

Thanks.

@tengqm
Copy link
Contributor

tengqm commented Dec 1, 2019

tbh, my experience on hugoing locally is very limited. Maybe you just hit this issue because your change to the markdown files is not making hugo happy? I'm not aware of any issues so far building the site using 0.57.2.

@Colstuwjx
Copy link
Contributor Author

targeted! This issue was confirmed by the hugo official repo, see PR 6466 and relate issue.

It has been fixed by hugo version 0.59.1, so our version 0.57.2 still meet this issue. You can confirm this by modifying the pages under tasks/federation, after running hugo locally, edit content in the pages would panic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants