Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
I dont understand why the same fix, as on RHEL7 and Fedora, does not work on RHEL8. It seems its kernel ignores :
setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1)
Where it works as expected on RHEL7 and Fedora. I rebuilt latest dnsmasq-2.84-1.el8.x86_64 on RHEL8, it still fails the test. But the same fix just does not work on RHEL8, at least on 1minutetip machines.
Fedora passes the test just fine sice 2.81 inclusive. I narrowed by testing to upstream commit [1], which is the one fixing this issue.
1. http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=1627d577af03cdf747285e79fa747b6aaae8033f
RHEL8 keeps spawning ENOBUFS error, even when it is requested to omit it. I think I found a reason for it, it would need change even in the latest upstream release.
Current netlink change observation algorithm ignores netlink broadcast information delivered. Instead, it just writes new address event into queue. I think when changes are fast enough, queue writing blocks netlink loop and is responsible for ENOBUFS error therefore.
Proposed fix is reducing queue writes. Because it does not use broadcasted information, but forces netlink re-reading repeated the same time as number of incoming events. Because it writes queue every time. Instead, it should just re-read once AFTER reading all asynchronous messages. Multiple events are not necessary and take not required CPU cycles. Instead of serving user requests it spends time reading netlink again and again.
Pushed multiple commits to github repo: https://github.com/InfrastructureServices/dnsmasq/tree/netlink-tests
After repeated testing of my changes, it seems it does not improve rhel8 results significantly.
Current state seems strange, like it stayed in enumerate_interfaces function, after netlink request was finished. According to strace, it continues reading after NLMSG_DONE is received.
Because iface_enumerate uses blocking reads, times start getting longer. I have no good theory how that happened and why.
My current attempts behave similar way on RHEL8 and worse way than vanilla upstream. I am missing some required fix still.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (Moderate: dnsmasq security and bug fix update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2021:4153
I dont understand why the same fix, as on RHEL7 and Fedora, does not work on RHEL8. It seems its kernel ignores : setsockopt(daemon->netlinkfd, SOL_NETLINK, NETLINK_NO_ENOBUFS, &opt, sizeof(opt)) == -1) Where it works as expected on RHEL7 and Fedora. I rebuilt latest dnsmasq-2.84-1.el8.x86_64 on RHEL8, it still fails the test. But the same fix just does not work on RHEL8, at least on 1minutetip machines. Fedora passes the test just fine sice 2.81 inclusive. I narrowed by testing to upstream commit [1], which is the one fixing this issue. 1. http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=1627d577af03cdf747285e79fa747b6aaae8033f