Bug 244931 - sysutils/packer: Crash on 12.1-RELEASE-p2: fatal error: runtime: netpoll: break fd ready for something unexpected
Summary: sysutils/packer: Crash on 12.1-RELEASE-p2: fatal error: runtime: netpoll: bre...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Some People
Assignee: Kubilay Kocak
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2020-03-20 09:01 UTC by mk+freebsd
Modified: 2021-07-31 01:21 UTC (History)
4 users (show)

See Also:


Attachments
patch against Makefile and files/ (12.39 KB, patch)
2020-04-09 23:06 UTC, Tomoyuki Sakurai
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mk+freebsd 2020-03-20 09:01:18 UTC
Hi,

packer-1.5.1 ports from quarterly crashes on FreeBSD-12.1-RELEASE with a runtime error:

runtime: netpoll: break fd ready for -2
fatal error: runtime: netpoll: break fd ready for something unexpected

runtime stack:
runtime.throw(0x3efc1bf, 0x39)
        /usr/local/go/src/runtime/panic.go:1112 +0x72
runtime.netpoll(0xb19cba34, 0xc000063001)
        /usr/local/go/src/runtime/netpoll_kqueue.go:140 +0x30a
runtime.findrunnable(0xc000065800, 0x0)
        /usr/local/go/src/runtime/proc.go:2323 +0x72b
runtime.schedule()
        /usr/local/go/src/runtime/proc.go:2520 +0x2fc
runtime.park_m(0xc000000f00)
        /usr/local/go/src/runtime/proc.go:2690 +0x9d
runtime.mcall(0x200000)
        /usr/local/go/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [runnable, locked to thread]:
runtime.doInit(0x6904ae0)
        /usr/local/go/src/runtime/proc.go:5398 +0xd8
runtime.doInit(0x69183e0)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.doInit(0x6934020)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.doInit(0x691cd20)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.main()
        /usr/local/go/src/runtime/proc.go:190 +0x1ce
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1373 +0x1

goroutine 34 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc000109220)
        /wrkdirs/usr/ports/sysutils/packer/work/packer-1.5.1/vendor/go.opencensus.io/stats/view/worker.go:154 +0x100
created by go.opencensus.io/stats/view.init.0
        /wrkdirs/usr/ports/sysutils/packer/work/packer-1.5.1/vendor/go.opencensus.io/stats/view/worker.go:32 +0x57

Same issue when this software is build from source:

git clone https://github.com/hashicorp/packer.git
cd packer.git
go get
go build -o packer.out
./packer.out
fatal error: runtime: netpoll: break fd ready for something unexpected

runtime stack:
runtime.throw(0x401e867, 0x39)
        /usr/local/go/src/runtime/panic.go:1112 +0x72
runtime.netpoll(0xffffffffffffffff, 0x1)
        /usr/local/go/src/runtime/netpoll_kqueue.go:140 +0x30a
runtime.findrunnable(0xc000063000, 0x0)
        /usr/local/go/src/runtime/proc.go:2323 +0x72b
runtime.schedule()
        /usr/local/go/src/runtime/proc.go:2520 +0x2fc
runtime.goexit0(0xc0000aaa80)
        /usr/local/go/src/runtime/proc.go:2849 +0x1d6
runtime.mcall(0x200000)
        /usr/local/go/src/runtime/asm_amd64.s:318 +0x5b

goroutine 1 [runnable, locked to thread]:
runtime.doInit(0x6a9ad00)
        /usr/local/go/src/runtime/proc.go:5398 +0xd8
runtime.doInit(0x6aaee40)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.doInit(0x6acb080)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.doInit(0x6ab39a0)
        /usr/local/go/src/runtime/proc.go:5409 +0x57
runtime.main()
        /usr/local/go/src/runtime/proc.go:190 +0x1ce
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1373 +0x1

goroutine 23 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc0000bdb80)
        /home/user/go/pkg/mod/go.opencensus.io@v0.22.2/stats/view/worker.go:154 +0x100
created by go.opencensus.io/stats/view.init.0
        /home/user/go/pkg/mod/go.opencensus.io@v0.22.2/stats/view/worker.go:32 +0x57
Comment 1 Tomoyuki Sakurai 2020-04-09 00:19:06 UTC
the issue is related with recent change in go. here is the issue in upstream.

https://github.com/hashicorp/packer/issues/9032
Comment 2 Tomoyuki Sakurai 2020-04-09 23:06:49 UTC
Created attachment 213236 [details]
patch against Makefile and files/

my proposed patch from https://github.com/hashicorp/packer/pull/9037
Comment 3 Tomoyuki Sakurai 2020-04-25 13:59:12 UTC
updated version (1.5.5) with the patch is available at:

https://github.com/trombik/freebsd-ports-packer
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2021-05-04 16:14:56 UTC
Maintainer reset.
Comment 5 Brad Ackerman 2021-07-29 04:52:46 UTC
This appears to be resolved upstream - can you confirm?
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-31 01:16:57 UTC
(In reply to Brad Ackerman from comment #5)

Do we know what version this was released in, to compare it against the port version?
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-31 01:21:50 UTC
Looks like it was 1.5.6:

  core: Fix crash in wrapperreadline helper when calling os.NewFile on unknown   
  file descriptor [GH-9037]

Port is currently at 1.7.4

Closing OBE