PDA

View Full Version : DNS segfault in control panel



Swift-AU
06-17-2004, 06:15 PM
Just today when attempting to modify the DNS for the main (admin) domain name on my DA box, I was presenting with a segmentation fault error message. The error.log shows the following:

2004:06:18-11:08:40: *** Segmentation fault *** getlock(/etc/namedb/somehost.net.au.db) : finished : User: admin : 211.xx.xxx.109 : /CMD_DNS_ADMIN : domain=somehost.net.au : (null)

Modifying the DNS for any other domain on the box is not a problem. I've checked the permissions on /etc/namedb/somehost.net.au.db and they are the same as for all the other domains. I've also verified the contents of the file, and everything appears in tact.

I haven't yet tried to remove the file and re-create it, because I'd like to get to the bottom of the problem first, in case it happens again.

If it helps any, I had added and then removed a sub domain on somehost.net.au, prior to accessing the DNS management. Possibly removing the sub domain has done something to the DNS file that DA doesn't like (although I can't gaurantee it was working prior to this, as I didn't try it.)

O/S is FBSD 4.9 running latest DA release.

Thanks,
Swift

nobaloney
06-17-2004, 07:15 PM
Take a look at the file, and it's rights and ownership, for both the domain with the problems and another domain, trying to find unexplained differences.

Jeff

Swift-AU
06-17-2004, 10:11 PM
The problem .db file has exactly the same ownership and permissions as the working ones, those being:

-rw-r--r-- 1 root wheel

Cheers...
Swift

nobaloney
06-18-2004, 08:18 AM
Well, there's got to be a difference somewhere.

Have you tried posting to any of the FreeBSD lists or to the bind-users list or bind newsgroup?

Jeff

Swift-AU
06-18-2004, 05:25 PM
I don't think the issue is with bind, as bind reads the .db file correctly, produces no error messages, and ns lookups on the domain work fine. It's only DA that for whatever reason can't read this particular .db file.

ProWebUK
06-18-2004, 07:51 PM
Can you modify other domains ok, or is the problem with all of them?

Chris

Swift-AU
06-18-2004, 07:57 PM
Only the one domain has the problem.

ProWebUK
06-18-2004, 08:01 PM
check /var/named to see if theres any lock files there.

also, you could try:

fuser -v /var/named/domain.com.db (it may just go straight back to command line)

Chris

Swift-AU
06-18-2004, 08:20 PM
On FreeBSD, there is no /var/named, but elsewhere I can't find any locks for named.

FreeBSD (4.9) also doesn't have the fuser command, but as I've restarted the server, I doubt any processes have the file open. And it's definately not under an exclusive lock, as I can both read and write to the problem .db file.

Swift-AU
06-18-2004, 08:37 PM
I tried removing the extra blank lines that DA inserts at the end of each .db file, and lo and behold I was able to view the DNS records in DA. However, after adding another record (of any type), DA would again throw up a seg fault error, and once again I was unable to go back in and make further changes. The record I added had however been inserted into the .db file in the correct spot, and the extra blank lines at the end where also added. So it seems that DA is for some reason updating the .db file in it's usual manner, but is then unable to read it in again.

wombat
06-19-2004, 08:14 PM
I have exactly same problem. Also running FBSD 4.9

wombat
06-19-2004, 08:20 PM
Yep, I have just tried Swift's fix to remove the extra blank lines, and it works. But then I have other domains and the db files also have identical number of blank lines and there is no problem !?!? :confused:

DirectAdmin Support
06-20-2004, 12:45 PM
Hello,

That's a bug. We found it a few days ago... It's been there since the very beginng of DA, but it's never shown up before. We fixed it pretty quickly, but have to make the release to get it out to you guys.

http://www.directadmin.com/features.php?id=406

John

Swift-AU
06-20-2004, 03:56 PM
That's excellent news John. Until wombat replied, I was beginning to think it was just me :)

Cheers...
Swift