hugo: Hugo stuck on "Start building sites …"
What version of Hugo are you using (hugo version
)?
$ hugo version Hugo Static Site Generator v0.80.0-792EF0F4 linux/amd64 BuildDate: 2020-12-31T13:37:58Z
Does this issue reproduce with the latest release?
Yes
Context
Hugo running as a container in Gitlab pages, container base is klakegg/hugo:debian
but it doesn’t seem to matter.
Description
Every once in a while (actually, every single time when run in Gitlab) hugo will be stuck on Start building sites …
message.
I was able to run in --debug
and got the following :
INFO 2021/01/21 17:14:55 Using config file:
Start building sites …
INFO 2021/01/21 17:14:55 syncing static files to /public/
Then I wanted to reproduce the issue home and it was a little bit trickier, it happens less often, but running site generation in a while
loop does the trick. So here is what I was able to catch with strace
, it’s stuck with repeating FUTEX_WAIT_PRIVATE
[...]
newfstatat(AT_FDCWD, "/public/", {st_mode=S_IFDIR|0755, st_size=104, ...}, 0) = 0
futex(0x3134988, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x3134988, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x3134988, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xc000058548, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x3134988, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x3134988, FUTEX_WAIT_PRIVATE, 0, NULL^Cstrace: Process 101 detached
I’m running hugo
with the following flags to test :
hugo --debug --noChmod --noTimes -d ../public
Also, the site is bound to the container from a local directory
I’m not sure what other parts of strace would be relevant.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 4
- Comments: 24 (10 by maintainers)
Commits related to this issue
- Fix "stuck on build" in error situations in content processing Updates #8166 — committed to bep/hugo by bep 3 years ago
- commands: Run static copy and build in sequence As in, not in parallel. Closes #8166 — committed to bep/hugo by bep 3 years ago
- Make sure we always create the /public folder This is related to #8166 – if the /public folder did not exist, you had no /static files and had static files in /content root, then you would get a "no ... — committed to bep/hugo by bep 3 years ago
- Make sure we always create the /public folder This is related to #8166 – if the /public folder did not exist, you had no /static files and had static files in /content root, then you would get a "no ... — committed to bep/hugo by bep 3 years ago
- Make sure we always create the /public folder * Before this commit, when you had static files in the root of /content and no /public folder, that folder would not be created unless the /static syncer... — committed to bep/hugo by bep 3 years ago
- Fix "stuck on build" in error situations in content processing Updates #8166 — committed to gohugoio/hugo by bep 3 years ago
@jmooring I have found the stupid culprits (2) … Will create a PR soon.
@SMUsamaShah From what I can see, the image in content dir is causing the problem. Try it yourself:
The build hangs.
Now move the image and try again.
The build completes.
Note that a workaround for the above would be to always make sure that
/public
exists before you start the build.