Hugo crashing on "hugo server", getting "fatal error: pipe failed" (Mac)

Hi all – I’m experiencing the issue brought up in this thread. I am currently on version 0.79.0 extended. Also tested on version 0.75.1 extended with the same error. I am currently on Mac OS 10.15.7 (Catalina).

Basically when running hugo server in my project directory, I get the following error message:

                   | EN  | DE   
  Pages            | 391 |   6  
  Paginator pages  |  16 |   0  
  Non-page files   |   0 |   0  
  Static files     | 655 | 655  
  Processed images |   0 |   0  
  Aliases          |  26 |   0  
  Sitemaps         |   2 |   1  
  Cleaned          |   0 |   0  

Built in 118629 ms
Watching for changes in /site/{archetypes,assets,content,data,i18n,layouts,node_modules,package.json,static}
Watching for config changes in /site/config.toml
fatal error: pipe failed

goroutine 1 [running]:
runtime.throw(0x5c684bc, 0xb)
        /usr/local/go/src/runtime/panic.go:1116 +0x72 fp=0xc03d747860 sp=0xc03d747830 pc=0x4038f12
        /usr/local/go/src/runtime/os_darwin.go:98 +0xc5 fp=0xc03d747888 sp=0xc03d747860 pc=0x4035c65
        /usr/local/go/src/runtime/sigqueue.go:198 +0xa5 fp=0xc03d7478a8 sp=0xc03d747888 pc=0x406d7e5
        /usr/local/go/src/os/signal/signal.go:144 +0x88 fp=0xc03d7478c8 sp=0xc03d7478a8 pc=0x55ae2e8
os/signal.Notify(0xc0410b0540, 0xc03d747ae0, 0x2, 0x2)
        /usr/local/go/src/os/signal/signal.go:164 +0x162 fp=0xc03d747940 sp=0xc03d7478c8 pc=0x55add02*commandeer).serve(0xc0007fbe10, 0xc00012be80, 0xb9, 0x100)
        /root/project/hugo/commands/server.go:480 +0x625 fp=0xc03d747b60 sp=0xc03d747940 pc=0x55e69c5*serverCmd).server(0xc00012be80, 0xc000338b00, 0x6d3e5d8, 0x0, 0x0, 0x0, 0x0)
        /root/project/hugo/commands/server.go:274 +0x2b6 fp=0xc03d747ca8 sp=0xc03d747b60 pc=0x55e5196*serverCmd).server-fm(0xc000338b00, 0x6d3e5d8, 0x0, 0x0, 0x0, 0x0)
        /root/project/hugo/commands/server.go:131 +0x52 fp=0xc03d747cf0 sp=0xc03d747ca8 pc=0x55f5372*Command).execute(0xc000338b00, 0x6d3e5d8, 0x0, 0x0, 0xc000338b00, 0x6d3e5d8)
        /go/pkg/mod/ +0x47c fp=0xc03d747dc0 sp=0xc03d747cf0 pc=0x41f643c*Command).ExecuteC(0xc0004522c0, 0xc0006738a0, 0x8, 0xc000533a00)
        /go/pkg/mod/ +0x336 fp=0xc03d747e98 sp=0xc03d747dc0 pc=0x41f6f76, 0x1, 0x1, 0x40087e5, 0xc000190058, 0x0, 0x0)
        /root/project/hugo/commands/hugo.go:90 +0xb9 fp=0xc03d747f28 sp=0xc03d747e98 pc=0x55d2039
        /root/project/hugo/main.go:23 +0x76 fp=0xc03d747f88 sp=0xc03d747f28 pc=0x55f6ab6
        /usr/local/go/src/runtime/proc.go:204 +0x209 fp=0xc03d747fe0 sp=0xc03d747f88 pc=0x403b6e9
        /usr/local/go/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc03d747fe8 sp=0xc03d747fe0 pc=0x4071581

goroutine 21 [select]:*worker).start(0xc00067c050)
        /go/pkg/mod/ +0x105
created by
        /go/pkg/mod/ +0x57

goroutine 747 [syscall]:
syscall.syscall6(0x4236220, 0x10, 0x0, 0x0, 0xc00019ae88, 0xa, 0x6d3e890, 0x0, 0x0, 0x0)
        /usr/local/go/src/runtime/sys_darwin.go:85 +0x2e, 0x0, 0x0, 0xc00019ae88, 0xa, 0x6d3e890, 0x0, 0x0, 0x0)
        /go/pkg/mod/ +0xa6, 0x0, 0x0, 0x0, 0xc00019ae88, 0xa, 0xa, 0x6d3e890, 0x0, 0x0, ...)
        /go/pkg/mod/ +0x71, 0xc00019ae88, 0xa, 0xa, 0x6d3e890, 0xc00019ae88, 0x0, 0xa, 0x0, 0x0)
        /go/pkg/mod/ +0x6e*Watcher).readEvents(0xc049600120)
        /go/pkg/mod/ +0x831
created by
        /go/pkg/mod/ +0x199

goroutine 756 [select]:*hub).run(0x6cff140)
        /root/project/hugo/livereload/hub.go:39 +0x1e9
created by
        /root/project/hugo/livereload/livereload.go:98 +0x45

goroutine 662 [IO wait]:
internal/poll.runtime_pollWait(0xaf666b0, 0x72, 0x60fa860)
        /usr/local/go/src/runtime/netpoll.go:220 +0x55
internal/poll.(*pollDesc).wait(0xc024948d98, 0x72, 0xc033c56600, 0x12fa, 0x12fa)
        /usr/local/go/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*FD).Read(0xc024948d80, 0xc033c56600, 0x12fa, 0x12fa, 0x0, 0x0, 0x0)
        /usr/local/go/src/internal/poll/fd_unix.go:159 +0x1b1
net.(*netFD).Read(0xc024948d80, 0xc033c56600, 0x12fa, 0x12fa, 0x203009, 0x42fe01b, 0xc01ac56860)
        /usr/local/go/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0350a50c8, 0xc033c56600, 0x12fa, 0x12fa, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/net.go:182 +0x8e
crypto/tls.(*atLeastReader).Read(0xc026acd340, 0xc033c56600, 0x12fa, 0x12fa, 0x22, 0xb88, 0xc000c81730)
        /usr/local/go/src/crypto/tls/conn.go:779 +0x62
bytes.(*Buffer).ReadFrom(0xc01ac56980, 0x60f53e0, 0xc026acd340, 0x400db45, 0x59af280, 0x5bc3f60)
        /usr/local/go/src/bytes/buffer.go:204 +0xb1
crypto/tls.(*Conn).readFromUntil(0xc01ac56700, 0x342c1930, 0xc0350a50c8, 0x5, 0xc0350a50c8, 0x11)
        /usr/local/go/src/crypto/tls/conn.go:801 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc01ac56700, 0x0, 0x0, 0x11)
        /usr/local/go/src/crypto/tls/conn.go:608 +0x115
crypto/tls.(*Conn).Read(0xc01ac56700, 0xc02fbaf000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
        /usr/local/go/src/crypto/tls/conn.go:1252 +0x15f
bufio.(*Reader).Read(0xc02fb90d80, 0xc02f89b538, 0x9, 0x9, 0x0, 0xc000c81d20, 0x43ffb94)
        /usr/local/go/src/bufio/bufio.go:227 +0x222
io.ReadAtLeast(0x60f51c0, 0xc02fb90d80, 0xc02f89b538, 0x9, 0x9, 0x9, 0xc033a8ce80, 0xc02fbae000, 0x11)
        /usr/local/go/src/io/io.go:314 +0x87
net/http.http2readFrameHeader(0xc02f89b538, 0x9, 0x9, 0x60f51c0, 0xc02fb90d80, 0x0, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/h2_bundle.go:1477 +0x89
net/http.(*http2Framer).ReadFrame(0xc02f89b500, 0xc0379bcd20, 0x0, 0x0, 0x0)
        /usr/local/go/src/net/http/h2_bundle.go:1735 +0xa5
net/http.(*http2clientConnReadLoop).run(0xc000c81fa8, 0xc0001a0fa8, 0x40087e5)
        /usr/local/go/src/net/http/h2_bundle.go:8240 +0x8d
        /usr/local/go/src/net/http/h2_bundle.go:8168 +0x6f
created by net/http.(*http2Transport).newClientConn
        /usr/local/go/src/net/http/h2_bundle.go:7173 +0x66e

goroutine 721 [select]:*Batcher).run(0xc046aa6ac0)
        /root/project/hugo/watcher/batcher.go:53 +0x174
created by
        /root/project/hugo/watcher/batcher.go:42 +0x125

goroutine 802 [select]:*commandeer).newWatcher.func1(0xc046aa6ac0, 0xc0007fbe10, 0xc047fde6f0, 0xc046a2fa10)
        /root/project/hugo/commands/hugo.go:873 +0xe5
created by*commandeer).newWatcher
        /root/project/hugo/commands/hugo.go:871 +0x2ac

The solution in the thread above was to run hugo server --watch=false, which does allow me to run the site. However, this command is very inconvenient to my workflow as I have to continually rebuild the site when making changes.

I am wondering if there is any known fix for the issue above that does not include using the --watch=false flag? This thread also had a similar issue but it doesn’t seem that there was any additional solution provided. Any help is much appreciated!

hugo server --watch-=false < the minus before the = is that in your original CLI command? because it’s wrong. I also see in your error dump some lines referring to live reload starting, watcher starting.

Run hugo with the following parameters added, they might help to bring new info to light:

--debug --path-warnings --verbose

Just updated the post – the minus sign in the command was a typo, I have been running hugo server --watch=false, thanks for catching.

I ran the command you suggested (hugo server --debug --path-warnings --verbose) and got a very similar error message as I did above – the only difference was there was a log for each page render, then I got this chunk:

                   | EN  | DE   
  Pages            | 391 |   6  
  Paginator pages  |  16 |   0  
  Non-page files   |   0 |   0  
  Static files     | 655 | 655  
  Processed images |   0 |   0  
  Aliases          |  26 |   0  
  Sitemaps         |   2 |   1  
  Cleaned          |   0 |   0  

Built in 132809 ms
Watching for changes in /Users/satchelsmidt/Desktop/Work_Projects/jbm-marketing-site/{archetypes,assets,content,data,i18n,layouts,node_modules,package.json,static}
Watching for config changes in /Users/satchelsmidt/Desktop/Work_Projects/jbm-marketing-site/config.toml
fatal error: pipe failed

goroutine 1 [running]:
runtime.throw(0x5d23466, 0xb)
        runtime/panic.go:1116 +0x72 fp=0xc020033858 sp=0xc020033828 pc=0x403a552
        runtime/os_darwin.go:98 +0xc5 fp=0xc020033880 sp=0xc020033858 pc=0x40371a5
        runtime/sigqueue.go:198 +0xa5 fp=0xc0200338a0 sp=0xc020033880 pc=0x406f0e5
        os/signal/signal.go:144 +0x88 fp=0xc0200338c0 sp=0xc0200338a0 pc=0x562cfc8
os/signal.Notify(0xc03f412f00, 0xc020033ad8, 0x2, 0x2)
        os/signal/signal.go:164 +0x162 fp=0xc020033938 sp=0xc0200338c0 pc=0x562c9e2*commandeer).serve(0xc000460e00, 0xc0005a1180, 0xb9, 0x100) +0x625 fp=0xc020033b58 sp=0xc020033938 pc=0x5665ce5*serverCmd).server(0xc0005a1180, 0xc0002aa580, 0xc0002b9110, 0x0, 0x3, 0x0, 0x0) +0x2b6 fp=0xc020033ca0 sp=0xc020033b58 pc=0x56644b6*serverCmd).server-fm(0xc0002aa580, 0xc0002b9110, 0x0, 0x3, 0x0, 0x0) +0x52 fp=0xc020033ce8 sp=0xc020033ca0 pc=0x5674bb2*Command).execute(0xc0002aa580, 0xc0002b9080, 0x3, 0x3, 0xc0002aa580, 0xc0002b9080) +0x47c fp=0xc020033dc0 sp=0xc020033ce8 pc=0x41e07fc*Command).ExecuteC(0xc0004382c0, 0xc0004ed930, 0x8, 0xc0001ab800) +0x375 fp=0xc020033e98 sp=0xc020033dc0 pc=0x41e1375, 0x4, 0x4, 0x4009cc5, 0xc00009c058, 0x0, 0x0) +0xb9 fp=0xc020033f28 sp=0xc020033e98 pc=0x5650f39
main.main() +0x76 fp=0xc020033f88 sp=0xc020033f28 pc=0x56762f6
        runtime/proc.go:204 +0x209 fp=0xc020033fe0 sp=0xc020033f88 pc=0x403cd09
        runtime/asm_amd64.s:1374 +0x1 fp=0xc020033fe8 sp=0xc020033fe0 pc=0x4072e81

goroutine 8 [select]:*worker).start(0xc0006be050) +0x105
created by +0x57

goroutine 768 [select]:*Batcher).run(0xc043eddce0) +0x15f
created by +0x125

goroutine 767 [syscall]:
syscall.syscall6(0x423c600, 0x8, 0x0, 0x0, 0xc000503688, 0xa, 0x6e51a80, 0x0, 0x0, 0x0)
        runtime/sys_darwin.go:85 +0x2e, 0x0, 0x0, 0xc000503688, 0xa, 0x6e51a80, 0x0, 0x0, 0x0) +0xa6, 0x0, 0x0, 0x0, 0xc000503688, 0xa, 0xa, 0x6e51a80, 0x0, 0x0, ...) +0x71, 0xc000503688, 0xa, 0xa, 0x6e51a80, 0xc000503688, 0x0, 0xa, 0x0, 0x0) +0x6e*Watcher).readEvents(0xc043dc8cc0) +0x831
created by +0x199

goroutine 802 [select]:*hub).run(0x6e12880) +0x1e9
created by +0x45

goroutine 769 [select]:*commandeer).newWatcher.func1(0xc043eddce0, 0xc000460e00, 0xc043dec078, 0xc043ebbfb0) +0xd9
created by*commandeer).newWatcher +0x2cc

There are few in this forum who can read a Go stack trace.

But I do have a suggestion, have you tried setting a high timeout value for your project, like:
timeout = 60000

Also from the Docs:

timeout (10000)
Timeout for generating page contents, in milliseconds (defaults to 10 seconds). Note: this is used to bail out of recursive content generation, if your pages are slow to generate (e.g., because they require large image processing or depend on remote contents) you might need to raise this limit.

Good to know – I may see if there are any Go-specific forums that I can pose some of those goroutine errors to if there isn’t a solution here.

I tried setting the timeout value like you said, in my config.toml file, but still getting the same errors unfortunately.

I’d be interested in seeing a better workaround/fix for this as well, as I have a couple of users for my theme who have been unable to serve their sites (from MacOS) with the most recent versions of Hugo. One user couldn’t serve our example site, which is neither particularly big nor has a lot of images:

Is there an open Hugo issue?

See a Mac workaround from one of my theme’s users here that removes the error: fails with hugo extended · Issue #89 · google/docsy-example · GitHub

1 Like