Error it prevents libuv:uv_udp_open() from adding the socket to the io_watcher on Solaris
(Reported by @sjm in #3280 (comment 360962).)
Solaris 11.4.55.138.3 ships with BIND 9.18.11. This unexpected error is being observed at startup of named.
Using truss shows that the PF_ROUTE socket is being called with setsockopt(3C) option SO_REUSEPORT.
1898/2@2: 58.191046 -> libisc-9.18.11:isc__nm_socket(0x18, 0x4, 0x0, 0x7fd1243f86e4, 0x1, 0x0)
1898/2: 58.193281 so_socket(PF_ROUTE, SOCK_RAW, 0, NULL, SOV_XPG4_2) = 12
1898/2@2: 58.193669 <- libisc-9.18.11:isc__nm_socket() = 0
1898/2@2: 58.193828 -> libisc-9.18.11:isc__nm_get_netievent_routeconnect(0xe73ee1580, 0xe74052050, 0xe74052b10, 0x0, 0x4, 0x0)
1898/2@2: 58.195128 -> libisc-9.18.11:isc__nm_get_netievent(0xe73ee1580, 0x5, 0xe74052b10, 0x0, 0x4, 0x0)
1898/2@2: 58.196419 -> libisc-9.18.11:isc__mem_get(0xe73ed4640, 0x270, 0x0, 0x0, 0x4, 0x0)
1898/2@2: 58.196620 <- libisc-9.18.11:isc__mem_get() = 0xe740535d0
1898/2@2: 58.196813 <- libisc-9.18.11:isc__nm_get_netievent() = 0xe740535d0
1898/2@2: 58.197004 -> libisc-9.18.11:isc___nmsocket_attach(0xe74052050, 0xe740535e8, 0xe740535d0, 0x0, 0x1, 0x0)
1898/2@2: 58.198297 <- libisc-9.18.11:isc___nmsocket_attach() = 0xe74052050
1898/2@2: 58.198490 <- libisc-9.18.11:isc__nm_get_netievent_routeconnect() = 0xe740535d0
1898/2@2: 58.198687 -> libisc-9.18.11:isc__nm_in_netthread(0xe74052050, 0xe740535e8, 0xe740535d0, 0x0, 0x1, 0x0)
1898/2@2: 58.199981 <- libisc-9.18.11:isc__nm_in_netthread() = 1
1898/2@2: 58.200174 -> libisc-9.18.11:isc_nm_tid(0x7fd126396018, 0xe740535e8, 0xe74052050, 0x0, 0x1, 0x0)
1898/2@2: 58.201463 <- libisc-9.18.11:isc_nm_tid() = 0
1898/2@2: 58.201693 -> libisc-9.18.11:isc__nm_async_routeconnect(0xe73ee16b0, 0xe740535d0, 0x20, 0x0, 0x1, 0x0)
1898/2@2: 58.203025 -> libisc-9.18.11:isc_nm_tid(0xe73ee16b0, 0xe740535d0, 0x20, 0xe74052b10, 0x1, 0x0)
1898/2@2: 58.204315 <- libisc-9.18.11:isc_nm_tid() = 0
1898/2@2: 58.204508 -> libisc-9.18.11:isc__nm_in_netthread(0x7fd126396018, 0xe740535d0, 0x20, 0xe74052b10, 0x1, 0x0)
1898/2@2: 58.205797 <- libisc-9.18.11:isc__nm_in_netthread() = 1
1898/2@2: 58.205990 -> libisc-9.18.11:isc_nm_tid(0x7fd126396018, 0xe740535d0, 0x20, 0xe74052b10, 0x1, 0x0)
1898/2@2: 58.207279 <- libisc-9.18.11:isc_nm_tid() = 0
1898/2@2: 58.207470 -> libisc-9.18.11:isc_nm_tid(0x7fd126396018, 0xe740535d0, 0x20, 0xe74052b10, 0x1, 0x0)
1898/2@2: 58.208760 <- libisc-9.18.11:isc_nm_tid() = 0
1898/2@2: 58.208959 -> libuv:uv_udp_init(0xe73ee16c0, 0xe740527a8, 0x0, 0xe74052b10, 0x1, 0x0)
1898/2@2: 58.210443 <- libuv:uv_udp_init() = 0
1898/2@2: 58.210642 -> libuv:uv_handle_set_data(0xe740527a8, 0xe74052050, 0xe74052870, 0xe74052828, 0x1, 0x0)
1898/2@2: 58.211903 <- libuv:uv_handle_set_data() = 0xe740527a8
1898/2@2: 58.212075 -> libuv:uv_timer_init(0xe73ee16c0, 0xe740525a0, 0xe74052050, 0xe74052828, 0x1, 0x0)
1898/2@2: 58.213367 <- libuv:uv_timer_init() = 0
1898/2@2: 58.213559 -> libuv:uv_handle_set_data(0xe740525a0, 0xe74052050, 0xe740525c0, 0xe74052828, 0x1, 0x0)
1898/2@2: 58.214848 <- libuv:uv_handle_set_data() = 0xe740525a0
1898/2@2: 58.215051 -> libisc-9.18.11:isc__nm_closing(0xe74052050, 0xe74052050, 0xe74052050, 0xe74052828, 0x1, 0x0)
1898/2@2: 58.216341 <- libisc-9.18.11:isc__nm_closing() = 0
1898/2@2: 58.216538 -> libuv:uv_udp_open(0xe740527a8, 0xc, 0xe74052050, 0xe74052828, 0x1, 0x0)
1898/2: 58.217831 fcntl(12, F_GETFL) = 2
1898/2: 58.217934 fcntl(12, F_SETFL, FWRITE|FNONBLOCK) = 0
1898/2: 58.217998 setsockopt(12, SOL_SOCKET, SO_REUSEPORT, 0x7FD1243F863C, 4, SOV_DEFAULT) Err#99 ENOPROTOOPT
1898/2@2: 58.218056 <- libuv:uv_udp_open() = 0xffffff9d
1898/2@2: 58.218209 -> libisc-9.18.11:isc___nm_uverr2result(0xffffff9d, 0x1, 0x7fd126241ef0, 0x121, 0x7fd126231990, 0x1)
1898/2@2: 58.219506 -> libuv:uv_strerror(0xffffff9d, 0x1, 0x7fd1262319f0, 0x121, 0x7fd126231990, 0x1)
1898/2@2: 58.220797 <- libuv:uv_strerror() = 0x7fd124814c15
1898/2@2: 58.220994 -> libisc-9.18.11:isc_error_unexpected(0x7fd126241f76, 0x5f, 0x7fd126231c50, 0x7fd126241ef0, 0x121, 0x7fd12\
62371b0)
1898/2@2: 58.222253 -> libisc-9.18.11:isc_log_write(0xe73edec50, 0x7fd126397fb0, 0x7fd12738acc0, 0xfffffffc, 0x7fd12722a300, \
0x7fd126241f76)
1898/2@2: 58.224365 -> libisc-9.18.11:isc_log_doit(0xe73edec50, 0x7fd126397fb0, 0x7fd12738acc0, 0xfffffffc, 0x0, 0x7fd12722\
a300)
1898/2@2: 58.224567 -> libisc-9.18.11:isc_log_wouldlog(0xe73edec50, 0xfffffffc, 0x34, 0xfffffffc, 0x0, 0x7fd12722a300)
1898/2@2: 58.224767 <- libisc-9.18.11:isc_log_wouldlog() = 1
1898/2@2: 58.224959 -> libisc-9.18.11:isc_rwlock_lock(0xe73edec80, 0x1, 0x20, 0xfffffffc, 0x0, 0x7fd12722a300)
1898/2@2: 58.225157 <- libisc-9.18.11:isc_rwlock_lock() = 0
1898/2@2: 58.225351 -> libisc-9.18.11:isc_time_now(0x7fd1243f8350, 0x1, 0xfffffffc, 0x0, 0x1, 0x0)
1898/2@2: 58.225551 <- libisc-9.18.11:isc_time_now() = 0
1898/2@2: 58.225743 -> libisc-9.18.11:isc_time_formattimestamp(0x7fd1243f8350, 0x7fd1243f8210, 0x40, 0x20b97837, 0x4c3548\
5c2115, 0x641c7c97)
1898/2@2: 58.225987 <- libisc-9.18.11:isc_time_formattimestamp() = 4
1898/2@2: 58.226183 -> libisc-9.18.11:isc_time_formatISO8601ms(0x7fd1243f8350, 0x7fd1243f8250, 0x40, 0x7fd1243f7f58, 0x3,\
0x7fd1243f824f)
1898/2@2: 58.226389 <- libisc-9.18.11:isc_time_formatISO8601ms() = 5
1898/2@2: 58.226582 -> libisc-9.18.11:isc_time_formatISO8601Lms(0x7fd1243f8350, 0x7fd1243f8290, 0x40, 0x7fd1243f7f58, 0x1\
, 0x7fd1243f828f)
1898/2@2: 58.226787 <- libisc-9.18.11:isc_time_formatISO8601Lms() = 4
1898/2: 58.227010 write(2, 0x7FD1243F8210, 24) = 24
1898/2: 2 3 - M a r - 2 0 2 3 1 6 : 2 1 : 4 3 . 5 4 9
1898/2: 58.227445 write(2, " ", 1) = 1
1898/2: 58.227731 write(2, 0xE73EDECE8, 68) = 68
1898/2: n e t m g r / u v e r r 2 r e s u l t . c : 9 5 : i s c _ _ _ n
1898/2: m _ u v e r r 2 r e s u l t ( ) : u n e x p e c t e d e r r
1898/2: o r :
1898/2: 58.228027 write(2, "\n", 1) = 1
While the error message does not cause ns_interfacemgr_create()
to return an error it prevents libuv:uv_udp_open()
from adding the socket to the io_watcher
.