Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 637
    • Issues 637
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 92
    • Merge requests 92
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Issues
  • #2137
Closed
Open
Issue created Sep 09, 2020 by Michael McNally@McNally

SO_REUSEPORT doesn't distribute queries to multiple netmgr workers on MacOS

Jinmei informs us, via Support #17085:

I've recently noticed that, on MacOS 10.15.6, only one netmgr 
worker handles incoming queries even if multiple workers are 
configured on multiple threads on multiple CPU cores.  That's the 
case even if I send queries from different addresses or from different
ports to the same listen-on port.  It looks like lib/isc/netmgr/udp.c
assumes that SO_REUSEPORT (when available) reasonably distributes
incoming packets to the multiple sockets bound to the same port
with this socket option, but it doesn't work that way at least on
MacOS 10.15 (it's not surprising based on the very original purpose
of SO_REUSEPORT). 

I've tested it on MacOS 10.15.6, but I guess it can be common for
other BSD variants that don't have SO_REUSEPORT_LB or other non-Linux,
non-BSD OSes.

He'd like to know whether this is accidental or intended and provides a suggested patch diff if it is not. udp.c.diff

Ondrej: (I've edited the issue to remove "UDP" as the tcp and tcpdns layers have been rewritten to use SO_REUSEPORT_LB too.)

Edited Dec 02, 2020 by Ondřej Surý
Assignee
Assign to
Time tracking