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 0.83.1 macOS has a panic for an unknown reason. #8594

Closed
jasikpark opened this issue May 29, 2021 · 4 comments
Closed

Hugo 0.83.1 macOS has a panic for an unknown reason. #8594

jasikpark opened this issue May 29, 2021 · 4 comments

Comments

@jasikpark
Copy link

jasikpark commented May 29, 2021

This site built the other day, but today it will not build? I'm not quite sure. The repo in question is https://github.com/jasikpark/jasik-xyz

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

$ hugo version
hugo v0.83.1+extended darwin/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

yes, this is the latest release built from Homebrew.

Hugo Output:

hugo --log serve
Start building sites …

                   | EN
-------------------+------
  Pages            | 131
  Paginator pages  |   0
  Non-page files   |  39
  Static files     |  41
  Processed images | 170
  Aliases          |   0
  Sitemaps         |   1
  Cleaned          |   0

Built in 1828 ms
Watching for changes in /Users/calebjasik/Desktop/Github/jasik-xyz/{archetypes,assets,content,layouts,package.json,static}
Watching for config changes in /Users/calebjasik/Desktop/Github/jasik-xyz/config.toml, /Users/calebjasik/Desktop/Github/jasik-xyz/config/development
fatal error: pipe failed

goroutine 1 [running]:
runtime.throw(0x5b2ab88, 0xb)
	runtime/panic.go:1117 +0x72 fp=0xc000b0f890 sp=0xc000b0f860 pc=0x403aad2
runtime.sigNoteSetup(0x6b7d180)
	runtime/os_darwin.go:98 +0xc5 fp=0xc000b0f8b8 sp=0xc000b0f890 pc=0x4036fc5
os/signal.signal_enable(0xc1fb7af500000002)
	runtime/sigqueue.go:228 +0xa5 fp=0xc000b0f8d8 sp=0xc000b0f8b8 pc=0x4070e65
os/signal.enableSignal(...)
	os/signal/signal_unix.go:49
os/signal.Notify.func1(0x2)
	os/signal/signal.go:145 +0x88 fp=0xc000b0f8f8 sp=0xc000b0f8d8 pc=0x549ff68
os/signal.Notify(0xc00398d1a0, 0xc000b0fb38, 0x2, 0x2)
	os/signal/signal.go:165 +0x185 fp=0xc000b0f970 sp=0xc000b0f8f8 pc=0x549f985
github.com/gohugoio/hugo/commands.(*commandeer).serve(0xc0004f2e00, 0xc0000a0900, 0x40, 0x40)
	github.com/gohugoio/hugo/commands/server.go:494 +0x629 fp=0xc000b0fb68 sp=0xc000b0f970 pc=0x54d3ca9
github.com/gohugoio/hugo/commands.(*serverCmd).server(0xc0000a0900, 0xc000124780, 0xc0003f12f0, 0x0, 0x1, 0x0, 0x0)
	github.com/gohugoio/hugo/commands/server.go:272 +0x2c5 fp=0xc000b0fcb0 sp=0xc000b0fb68 pc=0x54d2465
github.com/gohugoio/hugo/commands.(*serverCmd).server-fm(0xc000124780, 0xc0003f12f0, 0x0, 0x1, 0x0, 0x0)
	github.com/gohugoio/hugo/commands/server.go:131 +0x5b fp=0xc000b0fcf8 sp=0xc000b0fcb0 pc=0x54e071b
github.com/spf13/cobra.(*Command).execute(0xc000124780, 0xc0003f12c0, 0x1, 0x1, 0xc000124780, 0xc0003f12c0)
	github.com/spf13/cobra@v1.1.3/command.go:852 +0x472 fp=0xc000b0fdb8 sp=0xc000b0fcf8 pc=0x41d5712
github.com/spf13/cobra.(*Command).ExecuteC(0xc00040f180, 0xc0003f0f20, 0x5, 0x6)
	github.com/spf13/cobra@v1.1.3/command.go:960 +0x375 fp=0xc000b0fe98 sp=0xc000b0fdb8 pc=0x41d6295
github.com/gohugoio/hugo/commands.Execute(0xc00003c0d0, 0x2, 0x2, 0x4009265, 0xc000100058, 0x54e4630, 0x0)
	github.com/gohugoio/hugo/commands/hugo.go:87 +0xb9 fp=0xc000b0ff28 sp=0xc000b0fe98 pc=0x54bee79
main.main()
	github.com/gohugoio/hugo/main.go:23 +0x76 fp=0xc000b0ff88 sp=0xc000b0ff28 pc=0x54e4016
runtime.main()
	runtime/proc.go:225 +0x256 fp=0xc000b0ffe0 sp=0xc000b0ff88 pc=0x403d2f6
runtime.goexit()
	runtime/asm_amd64.s:1371 +0x1 fp=0xc000b0ffe8 sp=0xc000b0ffe0 pc=0x4074c21

goroutine 6 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0000a6380)
	go.opencensus.io@v0.23.0/stats/view/worker.go:276 +0xcd
created by go.opencensus.io/stats/view.init.0
	go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0x68

goroutine 263 [syscall]:
syscall.syscall6(0x424f820, 0x8, 0x0, 0x0, 0xc000586688, 0xa, 0x6b7cc40, 0x0, 0x0, 0x0)
	runtime/sys_darwin.go:41 +0x2e
golang.org/x/sys/unix.kevent(0x8, 0x0, 0x0, 0xc000586688, 0xa, 0x6b7cc40, 0x5c24ff0, 0xc0001f0988, 0x5c25030)
	golang.org/x/sys@v0.0.0-20210412220455-f1c623a9e750/unix/zsyscall_darwin_amd64.go:276 +0xa5
golang.org/x/sys/unix.Kevent(0x8, 0x0, 0x0, 0x0, 0xc000586688, 0xa, 0xa, 0x6b7cc40, 0x0, 0x0, ...)
	golang.org/x/sys@v0.0.0-20210412220455-f1c623a9e750/unix/syscall_bsd.go:429 +0x71
github.com/fsnotify/fsnotify.read(0x8, 0xc000586688, 0xa, 0xa, 0x6b7cc40, 0x0, 0x0, 0x0, 0x0, 0xc0005865d8)
	github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:511 +0x6e
github.com/fsnotify/fsnotify.(*Watcher).readEvents(0xc00398c000)
	github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:274 +0x81b
created by github.com/fsnotify/fsnotify.NewWatcher
	github.com/fsnotify/fsnotify@v1.4.9/kqueue.go:62 +0x199

goroutine 264 [select]:
github.com/gohugoio/hugo/watcher.(*Batcher).run(0xc008635fa0)
	github.com/gohugoio/hugo/watcher/batcher.go:53 +0x129
created by github.com/gohugoio/hugo/watcher.New
	github.com/gohugoio/hugo/watcher/batcher.go:42 +0x13b

goroutine 265 [select]:
github.com/gohugoio/hugo/commands.(*commandeer).newWatcher.func1(0xc008635fa0, 0xc0004f2e00, 0xc000455be8, 0xc00398b0b0)
	github.com/gohugoio/hugo/commands/hugo.go:853 +0xc5
created by github.com/gohugoio/hugo/commands.(*commandeer).newWatcher
	github.com/gohugoio/hugo/commands/hugo.go:851 +0x2ce

goroutine 267 [select]:
github.com/gohugoio/hugo/livereload.(*hub).run(0x6b3cd40)
	github.com/gohugoio/hugo/livereload/hub.go:39 +0xfd
created by github.com/gohugoio/hugo/livereload.Initialize
	github.com/gohugoio/hugo/livereload/livereload.go:99 +0x45
@jasikpark jasikpark changed the title Hugo has a panic for an unknown reason. Hugo 0.83.1 macOS has a panic for an unknown reason. May 29, 2021
@jmooring
Copy link
Member

Same issue, possible solution:
https://discourse.gohugo.io/t/on-upgrade-to-v0-76-5-fatal-error-pipe-failed/28912/6

@drush
Copy link

drush commented Jun 1, 2021

Experienced the same issue. @jmooring link addressed it. Possible suggestion to add some open handle stats to the end of the build output before/after the watch phase is launched.

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

@github-actions github-actions bot added the Stale label Jun 2, 2022
satotake added a commit to satotake/hugo that referenced this issue Jul 17, 2022
On macOS, `fsnotify` uses `kqueue` internally.
This causes some long-lasting issues (gohugoio#8594, gohugoio#6109)
though we have the workaround for them.

This PR tries to resolve these issues by using `FSEvents` instead of `kqueue`.

After appling it, we can use `--enableFSEvents` flag like so

```
hugo server --enableFSEvents
```

There are some considerations.

- `fsnotify/fsevents` might not be stable yet
- we have to enable CGO if we would apply this as @nathany and @bep pointed.
- Related tests look passed but we have to wait for a while just before adding targets to watch.
    - Otherwise, delayed past events are sent.

ref https://discourse.gohugo.io/t/fsevents-for-watching-on-macos/39053/4
@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 Aug 19, 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

3 participants