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

0.64: process hangs up on "Building sites" line #6789

Closed
artch opened this issue Jan 23, 2020 · 15 comments
Closed

0.64: process hangs up on "Building sites" line #6789

artch opened this issue Jan 23, 2020 · 15 comments

Comments

@artch
Copy link

artch commented Jan 23, 2020

What version of Hugo are you using (hugo version)?

$ hugo version
Hugo Static Site Generator v0.63.0/extended windows/amd64 BuildDate: unknown

My site is unable to build using Hugo 0.63 extended version. It worked fine on 0.62.2.

Building sites … ERROR 2020/01/23 16:16:37 [BUG] Got panic:
runtime error: invalid memory address or nil pointer dereference
goroutine 110 [running]:
runtime/debug.Stack(0x1e639c8, 0x2, 0xc006bb5600)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa4
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func1.1(0xc006bb5f20, 0xc0015ef050)
	/root/project/hugo/hugolib/page__per_output.go:93 +0xce
panic(0x1bec8c0, 0x19a2f70)
	/usr/local/go/src/runtime/panic.go:679 +0x1c0
github.com/gohugoio/hugo/tpl/tplimpl.(*templateNamespace).parse(0x0, 0xc00afe5740, 0x35, 0xc012522000, 0xb899, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/root/project/hugo/tpl/tplimpl/template.go:797 +0x55
github.com/gohugoio/hugo/tpl/tplimpl.(*templateHandler).AddLateTemplate(0xc0008252c0, 0xc00afe5740, 0x35, 0xc012522000, 0xb899, 0x0, 0x0)
	/root/project/hugo/tpl/tplimpl/template.go:280 +0x195
github.com/gohugoio/hugo/hugolib.(*pageContentOutput).addSelfTemplate(0xc0047c5dc0, 0xc003b1be80, 0x31)
	/root/project/hugo/hugolib/page__per_output.go:433 +0x173
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func1(0x22beb80, 0xc01100db00)
	/root/project/hugo/hugolib/page__per_output.go:200 +0x5c3
github.com/gohugoio/hugo/hugolib.newPageContentOutput.func2(0x22e7040, 0xc0111b5b00, 0x1e63941, 0x1, 0x4, 0xc0009abfa8)
	/root/project/hugo/hugolib/page__per_output.go:215 +0x2d
github.com/gohugoio/hugo/lazy.(*Init).withTimeout.func1(0xc003f36070, 0x22e7040, 0xc0111b5b00, 0xc0111b5b60)
	/root/project/hugo/lazy/init.go:177 +0x4e
created by github.com/gohugoio/hugo/lazy.(*Init).withTimeout
	/root/project/hugo/lazy/init.go:176 +0x115
Built in 3272 ms
@bep
Copy link
Member

bep commented Jan 23, 2020

Please revise the title of this issue (I assume no one died) and provide more detail as to "what".

@bep bep changed the title Fatal regression on 0.63 0.63: "late templates" fails with a nil-pointer Jan 23, 2020
@bep bep added this to the v0.63.1 milestone Jan 23, 2020
@bep
Copy link
Member

bep commented Jan 23, 2020

Hey, the stacktrace tells me the "what" but not the "why", and I'm not able to reproduce this.

I suspect that I need to see your site's source to be able to track down this issue.

@bep
Copy link
Member

bep commented Jan 23, 2020

I'm guessing you have multiple languages with some plain HTML templates inside /content. Maybe.

bep added a commit that referenced this issue Jan 23, 2020
@bep
Copy link
Member

bep commented Jan 23, 2020

I have committed a fix that I'm guessing will fix this, but I failed to create a failing test, so it is a little bit guesswork.

@artch
Copy link
Author

artch commented Jan 24, 2020

Thank you for quick response! I'm sorry I couldn't follow it yesterday.

I don't have any ideas about "what" and "why" as I'm simply using Hugo, not developing it. It was intended to be a user bug report, and not the insightful debug session. I can help with debugging, but only within my limited knowledge.

"Fatal" in that sense means it's a fatal error, i.e. a crash, meaning the process exits and is unable to gracefully handle the error and continue. Nobody died for sure! 🙂

We have a pretty complex web site with two languages and thousands of pages. Many of them are indeed HTML. Its structure looks like this:

                   |  EN  |  RU
+------------------+------+------+
  Pages            | 1414 | 2796
  Paginator pages  |   56 |   74
  Non-page files   |  343 |  391
  Static files     |   21 |   21
  Processed images | 1437 | 1068
  Aliases          |  721 |  880
  Sitemaps         |    2 |    1
  Cleaned          |    0 |    0

Do you have a binary for me to test? I don't have any Go environment to build Hugo on my own.

@artch
Copy link
Author

artch commented Jan 24, 2020

Sorry, I've just realized there is a new 0.63.1 release already. I checked it, and there is no fatal error leading to a process crash, but instead the process hangs up on Building sites ... line.

@bep bep modified the milestones: v0.63.1, v0.63.2, v0.63.3, v0.64, v0.65 Jan 26, 2020
@bep
Copy link
Member

bep commented Jan 30, 2020

With the information I have, I'm not able to reproduce or fix this. Maybe others will.

@bep bep modified the milestones: v0.64, v0.65 Jan 30, 2020
@artch
Copy link
Author

artch commented Jan 30, 2020

Is there some way to enable any debug output to figure out what exactly is hanging up there?

@artch artch changed the title 0.63: "late templates" fails with a nil-pointer 0.64: process hangs up on "Building sites" line Feb 5, 2020
@artch
Copy link
Author

artch commented Feb 5, 2020

Still reproducible on 0.64 - hugo doesn't render my site and hangs up infinitely.

@moorereason
Copy link
Contributor

@artch, can you provide access to the site source?

@artch
Copy link
Author

artch commented Feb 5, 2020

This is complicated, it's intellectual property and I would have to request approval for that. Can I build hugo with some verbose output enabled to help you debug?

@bep bep modified the milestones: v0.65, v0.66 Feb 18, 2020
@bep bep modified the milestones: v0.66, v0.67 Mar 2, 2020
@artch
Copy link
Author

artch commented Mar 4, 2020

This is fixed in v0.65.0.

@artch artch closed this as completed Mar 4, 2020
bep added a commit to bep/hugo that referenced this issue Mar 9, 2020
This means that any HTML file inside /content will be treated as a regular file.

If you want it processes with shortcodes and a layout, add front matter.

The defintion of an HTML file here is:

* File with extension .htm or .html
* With first non-whitespace character "<" that isn't a HTML comment.

This is in line with the documentation.

Fixes gohugoio#7030
Fixes gohugoio#7028
See gohugoio#6789
bep added a commit that referenced this issue Mar 9, 2020
This means that any HTML file inside /content will be treated as a regular file.

If you want it processes with shortcodes and a layout, add front matter.

The defintion of an HTML file here is:

* File with extension .htm or .html
* With first non-whitespace character "<" that isn't a HTML comment.

This is in line with the documentation.

Fixes #7030
Fixes #7028
See #6789
@SMUsamaShah
Copy link

I am having the same problem in current version. There is no stack trace I can diagnose with either.

https://github.com/AbdulRafayZaidi/AbdulRafayZaidi.github.io/runs/2337541258?check_suite_focus=true

@jmooring
Copy link
Member

@SMUsamaShah

You are experiencing a different problem.

Please use the forum (https://discourse.gohugo.io) for questions and troubleshooting. We prefer to use GitHub for verified bugs and vetted enhancements.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants