View Issue Details

IDProjectCategoryView StatusLast Update
0017457CentOS-7unboundpublic2020-06-15 19:57
Reporterdrawks 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
Product Version7.8-2003 
Target VersionFixed in Version 
Summary0017457: Unbound crashes on reload after changing "module-config"
DescriptionI'm am able to induce a segfault in unbound (unbound-1.6.6-4.el7_8.x86_64, current centos provided build) by reloading the daemon after changing the "module-config" parameter and subsequently making a stats call via unbound-control.
Steps To ReproduceI'm am to induce a segfault in unbound (unbound-1.6.6-4.el7_8.x86_64, current centos provided build) by reloading the daemon after changing the "module-config" parameter and subsequently making a stats call via unbound-control.

Steps to reproduce:
1. run unbound with config like so (derived from default centos-7 config)
```
server:
        verbosity: 1
        statistics-interval: 0
        statistics-cumulative: no
        extended-statistics: yes
        num-threads: 4
        interface-automatic: no
        so-reuseport: yes
        ip-transparent: yes
        chroot: ""
        username: "unbound"
        directory: "/etc/unbound"
        log-time-ascii: yes
        pidfile: "/var/run/unbound/unbound.pid"
        harden-glue: yes
        harden-dnssec-stripped: yes
        harden-below-nxdomain: yes
        harden-referral-path: yes
        unwanted-reply-threshold: 10000000
        prefetch: yes
        prefetch-key: yes
        rrset-roundrobin: yes
        minimal-responses: yes
        # module-config: "iterator"
        trust-anchor-signaling: yes
        trusted-keys-file: /etc/unbound/keys.d/*.key
        auto-trust-anchor-file: "/var/lib/unbound/root.key"
        val-clean-additional: yes
        val-permissive-mode: no
        val-log-level: 1
        include: /etc/unbound/local.d/*.conf
        ipsecmod-enabled: no
        ipsecmod-hook: "/usr/libexec/ipsec/_unbound-hook"
remote-control:
        control-enable: yes
        server-key-file: "/etc/unbound/unbound_server.key"
        server-cert-file: "/etc/unbound/unbound_server.pem"
        control-key-file: "/etc/unbound/unbound_control.key"
        control-cert-file: "/etc/unbound/unbound_control.pem"
```
2. Once unbound is confirmed to be running and resolving as expected; uncomment the following line from the config `# module-config: "iterator", to explicitly force only the iterator module.
3. reload unbound via `unbound-control reload`
4. confirm unbound is running
6. issues a stats call via `unbound-control stats`
5. observe unbound immediately dies with a segfault
```
Jun 15 19:15:53 localhost.localdomain systemd[1]: unbound.service: main process exited, code=killed, status=11/SEGV
Jun 15 19:15:53 localhost.localdomain systemd[1]: Unit unbound.service entered failed state.
Jun 15 19:15:53 localhost.localdomain systemd[1]: unbound.service failed.
```


Additionally it appears that prior to the crash while unbound appears to be nominally functioning as expected that querying dnssec signed zones causes some log spew:
```
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1082 could not pthread_mutex_lock(&neg->lock): Invalid argument
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1111 could not pthread_mutex_unlock(&neg->lock): Invalid argument
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1082 could not pthread_mutex_lock(&neg->lock): Invalid argument
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1111 could not pthread_mutex_unlock(&neg->lock): Invalid argument
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1082 could not pthread_mutex_lock(&neg->lock): Invalid argument
Jun 15 19:12:51 localhost.localdomain unbound[21155]: [21155:3] error: validator/val_neg.c at 1111 could not pthread_mutex_unlock(&neg->lock): Invalid argument
Jun 15 19:15:04 localhost.localdomain unbound[21155]: [21155:1] error: validator/val_neg.c at 1082 could not pthread_mutex_lock(&neg->lock): Invalid argument
Jun 15 19:15:04 localhost.localdomain unbound[21155]: [21155:1] error: validator/val_neg.c at 1111 could not pthread_mutex_unlock(&neg->lock): Invalid argument
```
Additional InformationI attempted to reproduce this crash using a build of the current upstream release version of unbound (1.10.1) and could not reproduce.
Tagssegfault
abrt_hash
URL

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-06-15 19:54 drawks New Issue
2020-06-15 19:54 drawks Tag Attached: segfault