Bug 287 - Unbound dies when removing nonexistent local-data with unbound-control
Unbound dies when removing nonexistent local-data with unbound-control
Product: unbound
Classification: Unclassified
Component: server
i386 Linux
: P2 normal
Assigned To: unbound team
Depends on:
  Show dependency treegraph
Reported: 2009-12-04 23:27 CET by Tom Hendrikx
Modified: 2009-12-15 12:35 CET (History)
1 user (show)

See Also:

unbound-control stdout/stderr output (11.25 KB, text/plain)
2009-12-04 23:27 CET, Tom Hendrikx
unbound syslog output (1.23 KB, text/plain)
2009-12-04 23:28 CET, Tom Hendrikx

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hendrikx 2009-12-04 23:27:10 CET
Created attachment 127 [details]
unbound-control stdout/stderr output

Setup: unbound 1.4.0, ldns 1.6.2, no threads, no libevent, and no python support, running under gentoo linux, x86. I tested this with a default config, only adding a transparent local-zone 'tomhendrikx.nl' to the server, without any local-data in it.

When issuing "unbound-control local_data_remove test.tomhendrikx.nl", unbound crashes while trying to remove the nonexistent local-data. I can reliably reproduce the crash every time, directly after restarting unbound.

In attachments the output from unbound and unbound-control with debug enabled.
Comment 1 Tom Hendrikx 2009-12-04 23:28:03 CET
Created attachment 128 [details]
unbound syslog output
Comment 2 Wouter Wijngaards 2009-12-07 11:22:06 CET
Hi Tom, Thanks for the report, I reproduced and fixed the bug in svn r1926.

Thanks for the debug output.  Note well that the malloc-debugging you enabled there likely slows down unbound a lot and so it probably not suitable for a production environment.

Best regards, Wouter
Comment 3 Tom Hendrikx 2009-12-08 22:01:09 CET

I'm not if this is the same issue (bug and commit message don't much about the actual issue), but I found another trivial typo in the 'unbound-control local_data' command, tested against trunk (r1930). The following command also crashes unbound:

unbound-control local_data IN PTR .tomhendrikx.nl

I can add some debug output again when needed, but this one is also easily reproduced here.
Comment 4 Wouter Wijngaards 2009-12-09 10:09:09 CET
Hi Tom,

This one turns out to be an error in ldns.  Fixed it there, (updated tarball inside the unbound svn repo), and it now gives syntax error for starting a domain name with a dot.

Please report more of these errors if you can generate them :-)
Comment 5 Wouter Wijngaards 2009-12-15 12:35:23 CET
Closing bug, thanks for filing it.