unbound crashed when running "unbound-control log_reopen"

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 6
  • unbound-1.4.20-23.el6.3

Issue

Command unbound crashes when running unbound-control log_reopen by logrotate.

With following logrotate config:

/var/log/unbound.log
{
        daily
        rotate 30
        ifempty
        missingok
        compress
        create 640 unbound unbound
        sharedscripts
        postrotate
                /usr/sbin/unbound-control log_reopen
        endscript
}

we see

Process /usr/sbin/unbound was killed by signal 11 (SIGSEGV)

in logs.

Resolution

Update to unbound-1.4.20-26.el6_10.1 shipped with Advisory RHBA-2019:0412 or newer.

Root Cause

Previously, rotating the unbound.log file and executing the log_reopen command in the unbound-control utility led to a race condition in the logging subsystem of the unbound resolver. Consequently, the unbound service terminated unexpectedly. With this update, the race condition has been fixed, and the unbound service no longer crashes in the described scenario.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.