Bug 53009

Summary: "ndc restart" segfaults when named is not running
Product: Base System Reporter: Piotr Koper <koper>
Component: binAssignee: Doug Barton <dougb>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description Piotr Koper 2003-06-07 10:40:06 UTC

How-To-Repeat: 8:34 :: root :: ~ $ uname -a
FreeBSD core.freebsd-lovers.home 5.1-BETA FreeBSD 5.1-BETA #2: Mon May 26 19:26:
31 CEST 2003     root@core.freebsd-lovers.home:/usr/src/sys/i386/compile/CORE  i
386
8:34 :: root :: ~ $ /usr/sbin/named -u bind -g bind
8:34 :: root :: ~ $ ps auxww | grep named
bind   539  0.0  3.4  2456 1972  ??  Ss    8:34AM   0:00.01 /usr/sbin/named -u b
ind -g bind
8:34 :: root :: ~ $ ndc stop
8:34 :: root :: ~ $ ps auxww | grep named
root   544  0.0  0.3   296  184  v7  R+    8:34AM   0:00.00 grep named
8:34 :: root :: ~ $ ndc restart
ndc: error: ctl_client: evConnect(fd 3): Connection refused
ndc: error: cannot connect to command channel (/var/run/ndc)
ndc: error: ctl_client: evConnect(fd 3): Connection refused
ndc: error: cannot connect to command channel (/var/run/ndc)
Segmentation fault (core dumped)
8:35 :: root :: ~ $ gdb ndc ndc.core
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
(no debugging symbols found)...
Core was generated by `ndc'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...
done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0  0x08049e3b in getsockname ()
(gdb) bt
#0  0x08049e3b in getsockname ()
#1  0xbfbffbd8 in ?? ()
#2  0x0804a00b in getsockname ()
#3  0x080494c6 in getsockname ()
#4  0x08049145 in getsockname ()
(gdb)
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2003-06-07 12:12:30 UTC
Responsible Changed
From-To: gnats-admin->freebsd-bugs

Reassign misfiled PR.
Comment 2 Maxim Konovalov 2003-06-09 07:10:46 UTC
Hello,

The bug is already fixed in bind 8.4.1-REL and bind 8.3.6-REL.

-- 
Maxim Konovalov, maxim@macomnet.ru, maxim@FreeBSD.org
Comment 3 Doug Barton freebsd_committer freebsd_triage 2003-06-09 21:32:43 UTC
State Changed
From-To: open->closed


I've upgraded the ports to ISC's bug-fix versions, and 
tested ndc locally. This should fix your problem, if it 
doesn't, just reply to this bug report and I'll take 
another look. 


Comment 4 Doug Barton freebsd_committer freebsd_triage 2003-06-09 21:32:43 UTC
Responsible Changed
From-To: freebsd-bugs->dougb


I'm the bind8/bind84 maintainer.