# rclone error with kqueue on FreeBSD 13.0



## Vick Khera (May 10, 2021)

I recently updated two servers to FreeBSD 13.0 from 12. I updated all the packages as well. Everything is functional except for rclone. No matter what I do it fails with the error shown below, even without any parameters.

I run a customized kernel, so I checked for any options that are in GENERIC that I might need to add to my config, but I find nothing obvious.

I upgrade my systems using freebsd-update and the packages using binary packages with pkg.

I feel like rclone being broken in FreeBSD 13 would have a lot hits on google, but it doesn't.  What could I possibly be doing wrong?


```
% rclone
runtime: kevent failed with 78
fatal error: runtime: kevent failed

goroutine 1 [running, locked to thread]:
runtime.throw(0x1c38759, 0x16)
    /usr/local/go/src/runtime/panic.go:1117 +0x72 fp=0xc000206e68 sp=0xc000206e38 pc=0x43a2b2
runtime.netpollinit()
    /usr/local/go/src/runtime/netpoll_kqueue.go:44 +0x13e fp=0xc000206ef0 sp=0xc000206e68 pc=0x43591e
runtime.netpollGenericInit()
    /usr/local/go/src/runtime/netpoll.go:123 +0x67 fp=0xc000206f08 sp=0xc000206ef0 pc=0x434fa7
internal/poll.runtime_pollServerInit()
    /usr/local/go/src/runtime/netpoll.go:115 +0x25 fp=0xc000206f18 sp=0xc000206f08 pc=0x46d925
sync.(*Once).doSlow(0x2aa40c8, 0x1ce4f10)
    /usr/local/go/src/sync/once.go:68 +0xec fp=0xc000206f68 sp=0xc000206f18 pc=0x47ea6c
sync.(*Once).Do(...)
    /usr/local/go/src/sync/once.go:59
internal/poll.(*pollDesc).init(0xc0000c0118, 0xc0000c0100, 0x0, 0x0)
    /usr/local/go/src/internal/poll/fd_poll_runtime.go:38 +0x133 fp=0xc000206fa0 sp=0xc000206f68 pc=0x4ec1d3
internal/poll.(*FD).Init(0xc0000c0100, 0x1c1da5f, 0x8, 0x1, 0x0, 0x8)
    /usr/local/go/src/internal/poll/fd_unix.go:62 +0x5f fp=0xc000206fd0 sp=0xc000206fa0 pc=0x4ecf1f
net.(*netFD).connect(0xc0000c0100, 0x1f44548, 0xc000188010, 0x0, 0x0, 0x1f173c0, 0xc0000c0180, 0x0, 0x0, 0x0, ...)
    /usr/local/go/src/net/fd_unix.go:67 +0x98f fp=0xc000207150 sp=0xc000206fd0 pc=0x532e8f
net.(*netFD).dial(0xc0000c0100, 0x1f44548, 0xc000188010, 0x0, 0x0, 0x1f50ed8, 0xc0000b6100, 0x0, 0xc0000e0110, 0x100000000000101)
    /usr/local/go/src/net/sock_posix.go:149 +0x10b fp=0xc000207238 sp=0xc000207150 pc=0x54a9ab
net.socket(0x1f44548, 0xc000188010, 0x1c1da5f, 0x8, 0x1, 0x2, 0x0, 0x1886e00, 0x0, 0x0, ...)
    /usr/local/go/src/net/sock_posix.go:70 +0x1c5 fp=0xc0002072d8 sp=0xc000207238 pc=0x54a4c5
net.unixSocket(0x1f44548, 0xc000188010, 0x1c1da5f, 0x8, 0x1f50ed8, 0x0, 0x1f50ed8, 0xc0000b6100, 0x1c175e0, 0x4, ...)
    /usr/local/go/src/net/unixsock_posix.go:45 +0x13f fp=0xc000207390 sp=0xc0002072d8 pc=0x55691f
net.(*sysDialer).dialUnix(0xc0000c0080, 0x1f44548, 0xc000188010, 0x0, 0xc0000b6100, 0x8, 0x82a311888, 0x10)
    /usr/local/go/src/net/unixsock_posix.go:154 +0xa5 fp=0xc000207418 sp=0xc000207390 pc=0x557a45
net.(*sysDialer).dialSingle(0xc0000c0080, 0x1f44548, 0xc000188010, 0x1f2c6b8, 0xc0000b6100, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/dial.go:589 +0x167 fp=0xc0002074d0 sp=0xc000207418 pc=0x5274e7
net.(*sysDialer).dialSerial(0xc0000c0080, 0x1f44548, 0xc000188010, 0xc0000b4410, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
    /usr/local/go/src/net/dial.go:548 +0x15e fp=0xc0002075f0 sp=0xc0002074d0 pc=0x526d1e
net.(*Dialer).DialContext(0xc000207760, 0x1f44548, 0xc000188010, 0x1c1da5f, 0x8, 0x1c1c627, 0x8, 0x0, 0x0, 0x0, ...)
    /usr/local/go/src/net/dial.go:425 +0x6e5 fp=0xc000207708 sp=0xc0002075f0 pc=0x5260a5
net.(*Dialer).Dial(...)
    /usr/local/go/src/net/dial.go:348
net.Dial(0x1c1da5f, 0x8, 0x1c1c627, 0x8, 0x18, 0x8, 0x0, 0x2a75980)
    /usr/local/go/src/net/dial.go:319 +0xad fp=0xc0002077d0 sp=0xc000207708 pc=0x52578d
log/syslog.unixSyslog(0x60, 0x60, 0x802e425b8, 0x60)
    /usr/local/go/src/log/syslog/syslog_unix.go:22 +0x12f fp=0xc0002078b0 sp=0xc0002077d0 pc=0x99258f
log/syslog.(*Writer).connect(0xc0000aa180, 0xc0000aa180, 0x0)
    /usr/local/go/src/log/syslog/syslog.go:156 +0x50 fp=0xc000207930 sp=0xc0002078b0 pc=0x991150
log/syslog.Dial(0x0, 0x0, 0x0, 0x0, 0xc, 0x7fffffffecd0, 0x6, 0x0, 0x0, 0x0)
    /usr/local/go/src/log/syslog/syslog.go:139 +0x1a7 fp=0xc000207998 sp=0xc000207930 pc=0x990f67
log/syslog.New(...)
    /usr/local/go/src/log/syslog/syslog.go:108
log/syslog.NewLogger(0xc, 0x3, 0x12, 0x1cb0732, 0x386)
    /usr/local/go/src/log/syslog/syslog.go:313 +0x45 fp=0xc000207a00 sp=0xc000207998 pc=0x992385
github.com/Azure/azure-pipeline-go/pipeline.glob..func1(...)
    /wrkdirs/usr/ports/net/rclone/work/rclone-1.54.1/vendor/github.com/Azure/azure-pipeline-go/pipeline/defaultlog_syslog.go:31
github.com/Azure/azure-pipeline-go/pipeline.init()
    /wrkdirs/usr/ports/net/rclone/work/rclone-1.54.1/vendor/github.com/Azure/azure-pipeline-go/pipeline/defaultlog_syslog.go:33 +0x165 fp=0xc000207a48 sp=0xc000207a00 pc=0x9958a5
runtime.doInit(0x29d5360)
    /usr/local/go/src/runtime/proc.go:6265 +0xec fp=0xc000207b98 sp=0xc000207a48 pc=0x44a70c
runtime.doInit(0x29de820)
    /usr/local/go/src/runtime/proc.go:6242 +0x72 fp=0xc000207ce8 sp=0xc000207b98 pc=0x44a692
runtime.doInit(0x29e14e0)
    /usr/local/go/src/runtime/proc.go:6242 +0x72 fp=0xc000207e38 sp=0xc000207ce8 pc=0x44a692
runtime.doInit(0x29c7960)
    /usr/local/go/src/runtime/proc.go:6242 +0x72 fp=0xc000207f88 sp=0xc000207e38 pc=0x44a692
runtime.main()
    /usr/local/go/src/runtime/proc.go:208 +0x205 fp=0xc000207fe0 sp=0xc000207f88 pc=0x43caa5
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:1371 +0x1 fp=0xc000207fe8 sp=0xc000207fe0 pc=0x473821
```


----------



## SirDice (May 11, 2021)

Hardening bsd.
					

Thanks, I'll take a look at openntpd. Why sshd on workstations?  Because this is at home, one is a "work" system, the other is my "home" system, I don't have a KVM to keep switching monitors/keyboards/etc and sometimes I just need to pop in and check something out.  So running a local firewall...




					forums.FreeBSD.org


----------



## Vick Khera (May 11, 2021)

For posterity and anyone else landing here, the solution right now is to enable COMPAT_FREEBSD11 in the kernel.


----------



## SirDice (May 11, 2021)

Vick Khera said:


> For posterity and anyone else landing here, the solution right now is to enable COMPAT_FREEBSD11 in the kernel.


On FreeBSD 13.0 this also needs to include COMPAT_FREEBSD12 then. COMPAT_FREEBSD11 is for 11 compatibility on a 12 machine, COMPAT_FREEBSD12 is for 12 compatibility on 13. So by including COMPAT_FREEBSD11 you also need to include COMPAT_FREEBSD12. Those COMPAT_* options stack on top of each other.


----------

