How can I debug why Hugo is hanging?

Typing hugo gives me…

Start building sites … 
hugo v0.91.2+extended darwin/amd64 BuildDate=unknown

…and it just hangs. CPU is 0%, so it’s not doing anything really.

Elsewhere here, I’ve found

hugo --debug --path-warnings --templateMetrics --templateMetricsHints --verboseLog > debug.log

…but this doesn’t create a debug.log and otherwise hangs.

How can I find out what’s going wrong?

How do you want us to answer your “question”? No info on what you have in terms of configuration, layouts and content…

Please share your repo or a minimal example.

I would assume the log is created at the end of the build, if it hangs it hangs. I have a similar problem in server mode. Even with verbose on, nothing gets printed.

That makes me think your problem will be hard to debug, but if you share a repo, you might at least help you identify the problem and potentially make sure Hugo write something about it in the next version rather than just hang.

The only thing I can think of, based on the information available, is that it’s the file locking that was introduced in 0.89, which would suggest that there’s another copy of hugo running from the same directory, possibly backgrounded.

It turns out that while I can’t help with debugging it, it does work again if I reboot. I couldn’t see another copy of Hugo running, however.

If it happens again, and ps -ef | grep hugo doesn’t show another copy running, please run sw_vers and sysctl -n machdep.cpu.brand_string and report the results. Given the state of Apple’s QA, it wouldn’t surprise me if they’d managed to break file locking in some combination of OS release and architecture. :frowning_face:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.