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

hugo serve -D hangs at "Start building sites" when serving locally #10565

Closed
Lyoness opened this issue Dec 21, 2022 · 12 comments
Closed

hugo serve -D hangs at "Start building sites" when serving locally #10565

Lyoness opened this issue Dec 21, 2022 · 12 comments

Comments

@Lyoness
Copy link

Lyoness commented Dec 21, 2022

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

$ hugo version
hugo v0.108.0+extended darwin/arm64 BuildDate=unknown

Does this issue reproduce with the latest release?

at latest.

When running hugo serve -D the process hangs at:

Start building sites …
hugo v0.108.0+extended darwin/arm64 BuildDate=unknown

This starts to throttle my CPU:

$ps aux | grep -i hugo
carmen           27950  98.4  0.7 409417616 115232 s000  R+    1:06PM   3:48.40 hugo serve -D

Coredump here: https://gist.github.com/Lyoness/c2a4f259e652b60239892b08f07c08df

Thank you, happy to add any more context if needed.

@Lyoness Lyoness changed the title hugo serve -D hangs when serving locally hugo serve -D hangs at "Start building sites" when serving locally Dec 21, 2022
@Lyoness
Copy link
Author

Lyoness commented Dec 21, 2022

Not sure if #8166 is similar, but it hangs at Start building sites …

@bep
Copy link
Member

bep commented Dec 21, 2022

My best guess is an infinite recursion in some partial, which I guess can happen. Does it happen only when running the server? Is the source somehow available for me to test/look at?

@bep bep added this to the v0.109.0 milestone Jan 17, 2023
@bep bep modified the milestones: v0.109.0, v0.111.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@anne-usmedia
Copy link

I'm having the same issue, but with v0.110.0. Sometimes it hangs and sometimes it works, seems to be random. And when I get the project up and running it always hangs again when I change something in the scss.

Co-workers working on a linux computer do not have any issues, my fellow Macbook users are having the same problems as me.

repo: https://github.com/cue-lang/cuelang.org/tree/alpha

@jmooring
Copy link
Member

@anne-usmedia Whenever I hear about Mac vs Linux behavior, and the project uses Hugo Modules, the first thing that comes to mind is volatility of the cache location.

See https://discourse.gohugo.io/t/37837/6

This may not address the problem that you are experiencing, but it’s good starting point.

@myitcv
Copy link
Contributor

myitcv commented Mar 1, 2023

I can also repro this. Raised golang/go#58814 on the Go side. The stack trace in that issue (like the one above) clearly shows things blocked on the cgo call to libsass. All other goroutines are blocked (I'm assuming there is some global lock for cgo calls).

@jmooring

Whenever I hear about Mac vs Linux behavior, and the project uses Hugo Modules, the first thing that comes to mind is volatility of the cache location.

We are not using Hugo modules AFAIK.

@jmooring
Copy link
Member

jmooring commented Mar 1, 2023

@myitcv

We are not using Hugo modules AFAIK.

Understood. I saw the go.mod and didn't look inside.

@myitcv
Copy link
Contributor

myitcv commented Mar 1, 2023

I've tracked down the problem here. Per golang/go#58814 (comment), this is a Go problem that was fixed in golang/go@7d3a5a5. That commit is present in go1.20.

I notice that https://github.com/gohugoio/hugo/releases/tag/v0.111.0 has just been released. That was built using go1.20. So anyone seeing this problem should find that it is fixed by v0.111.0.

@myitcv
Copy link
Contributor

myitcv commented Mar 3, 2023

@Lyoness - I'd suggest this issue can be closed now per #10565 (comment)

@sftim
Copy link

sftim commented May 3, 2023

I can reproduce this with some consistency trying to build the Kubernetes docs locally. Out of 5 attempts it's very likely that at least one will freeze (stop making progress).

@myitcv
Copy link
Contributor

myitcv commented May 4, 2023

@sftim did you see #10565 (comment)?

@bep I think this can be closed so long as at least go1.20 is used to build hugo versions.

@sftim
Copy link

sftim commented May 4, 2023

I'm happy to see this closed as I can't reproduce the symptoms locally any more (we - Kubernetes docs - switched to building the development container with Golang 1.20)

@jmooring jmooring closed this as completed May 4, 2023
@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 May 26, 2023
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

6 participants