MyDNS Segfaults

Discussion in 'General' started by crypted, Jul 8, 2010.

  1. crypted

    crypted Member

    So, my server stops responding to hostnames. Finally looked in the log, here's a snippet. Any thoughts?

    Code:
    Jul  8 09:46:14 my kernel: [1957128.249175] mydns[31597]: segfault at 0 ip 40e87d sp 7fffffffd490 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957667.599821] mydns[3709]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.288273] mydns[3710]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.312274] mydns[3711]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.324277] mydns[3712]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.328930] mydns[3713]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.390657] mydns[3714]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.400529] mydns[3715]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.405663] mydns[3716]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.500529] mydns[3717]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:41 my kernel: [1957668.566591] mydns[3718]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:53 my kernel: [1957681.320283] __ratelimit: 5 messages suppressed
    Jul  8 09:54:53 my kernel: [1957681.320290] mydns[3724]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:53 my kernel: [1957681.342731] mydns[3726]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:54:59 my kernel: [1957688.760196] __ratelimit: 22 messages suppressed
    Jul  8 09:54:59 my kernel: [1957688.760196] mydns[3752]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:55:11 my kernel: [1957701.883140] mydns[3754]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:55:11 my kernel: [1957701.894715] mydns[3767]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:55:11 my kernel: [1957701.902294] mydns[3768]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:55:14 my pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Jul  8 09:55:14 my pure-ftpd: ([email protected]) [INFO] Logout.
    Jul  8 09:55:24 my kernel: [1957714.417575] __ratelimit: 46 messages suppressed 
    Jul  8 09:55:24 my kernel: [1957714.417575] mydns[3817]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:56:20 my kernel: [1957774.895848] mydns[3828]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:57:29 my kernel: [1957849.633692] mydns[3883]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    .................
    Jul  8 09:58:42 my kernel: [1957927.055896] mydns[4994]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:42 my kernel: [1957927.097923] mydns[4995]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:44 my kernel: [1957929.030362] mydns[4996]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:44 my kernel: [1957929.043844] mydns[4997]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:44 my kernel: [1957929.049654] mydns[4998]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:44 my kernel: [1957929.055844] mydns[4999]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:44 my kernel: [1957929.414219] __ratelimit: 33 messages suppressed
    Jul  8 09:58:44 my kernel: [1957929.414219] mydns[5033]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:49 my kernel: [1957934.819720] __ratelimit: 4 messages suppressed
    Jul  8 09:58:49 my kernel: [1957934.819727] mydns[5040]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Jul  8 09:58:56 my kernel: [1957941.326794] __ratelimit: 497 messages suppressed
    Jul  8 09:58:56 my kernel: [1957941.326800] mydns[5539]: segfault at 0 ip 404638 sp 7fffffffd430 error 4 in mydns[400000+32000]
    Debian Lenny x64, used the Perfect Setup guide. All apt-get updates were installed. dual 2ghz, 2gb ram, 300gb hdd

     
    Last edited: Jul 8, 2010
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. crypted

    crypted Member

    Yep, did that. Will see what happens. Might wanna get falko to update the package link in the perfect setup guides...
     
  4. crypted

    crypted Member

    MyDNS has segfaulted once again. What happens is NO DOMAIN will resolve, but the machine is accessible via IP. The Shared-IP page will load for those IPs as well.

    I setup a cronjob that will restart via the init.d script every three hours because downtime can be over a day as I'm not always available to restart it myself.

    I upgrade to the latest MyDNS as discussed above. Still not working out right.

    How can I get MyDNS to create a logfile to help pinpoint the matter?

    I did everything as instructed in the Perfect Setup guide for Debian Lenny.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you contacted the mydns developers in their mailinglist? They might be able to help you more in detail with this segfault.
     
  6. crypted

    crypted Member

    Will do. Just thought I'd turn to you guys as a first resource.
     
  7. crypted

    crypted Member

    Apparently, the consensus so far is that there were problems when ISPCONFIG wrote the zonefiles to the database.

    Till, i don't know the tables used for DNS and what not, what are they?

    Also, is there any way to have them rewritten or to have the system check for consistency errors?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    The table nemes names are the same then the protocol:

    dns_*

    Records in a database are always consistent, this is handled by mysql as every record is written at once into the databse with one sql insert or update statement. A application should never fail with a segfault. Maybe they should add code to handle database connection problems better.
     
    Last edited: Jul 22, 2010
  9. crypted

    crypted Member

    Any clue of a way to run mydns so that it outputs all data and creates a log?

    I think there was something like gdb on FreeBSD for that but no clue.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

  11. crypted

    crypted Member

    Yeah, what I did to start logging:

    Code:
    touch /var/log/mydns
    nano /etc/mydns.conf
    
    look for the ETC area, where it says log, change to this:
    log = /var/log/mydns
    
    /etc/init.d/mydns restart
    
    It appears to be logging now. One line written showing that it started. Hopefully, it will give some output as to the crashing.
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    According to the link that I posted in, you can make logging more verbose by adding the -v option to the mydqns command. I guess you will have to add it somewhere in the start script.
     
  13. crypted

    crypted Member

    this way is pretty simple, too. and its an easy way to control where it logs. keeps it from mixing in with the flood of messages in my /var/log/messages as i mentioned in another post a few minutes ago.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    You misunderstood me. I'am not talking about the log facility, I'am talking about log verbosity! As you have not increased the log verbosity, the error might not get logged or you will not be able to see the cause of the error in the log.
     
  15. crypted

    crypted Member

    I did misunderstand, now -v is used. Damn this is nuts. It's flooding the logfile.

    Code:
    mydns[31663]: mydns: mydns 1.2.8.27 started Thu Jul 22 16:28:09 2010 (listening on 12 addresses)
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263021 #26 22569 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG N QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263194 #27 10202 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263234 #28 17133 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263271 #29 23499 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263307 #30 59605 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+263406 #31 37000 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+409154 #32 51675 UDP 93.184.209.51 IN A ns1.derekgordon.com. NOERROR - 1 1 2 1 LOG N QUER$
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+409264 #64 38137 UDP 93.184.209.51 IN A ns3.derekgordon.com. NOERROR - 1 1 2 2 LOG N QUER$
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+528919 #65 6698 UDP 93.184.209.51 IN A irc.newnet.net. NOERROR - 1 7 2 2 LOG N QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550525 #66 51992 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY "" 
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550621 #78 26312 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550660 #79 27893 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550697 #90 8945 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550734 #91 64523 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+550769 #96 39558 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+641764 #97 42905 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+641860 #125 48654 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+641900 #128 15762 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+641937 #138 57571 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+641973 #139 45288 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+642021 #153 16437 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+689888 #154 13023 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+689995 #160 28485 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+690036 #165 25121 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+690072 #176 23067 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+690109 #177 47199 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+690145 #192 2230 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY "" 
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720445 #193 25769 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720549 #194 10989 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720591 #215 17182 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720627 #224 9994 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY "" 
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720664 #256 37349 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+720700 #288 12516 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911428 #289 40075 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911533 #312 23858 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911574 #313 29025 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911645 #320 20446 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911684 #352 27752 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    mydns[31665]: mydns: 22-Jul-2010 16:28:09+911732 #359 39668 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY ""
    .......................
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+084720 #12807 27632 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+084756 #12808 1489 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY $
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+168990 #12809 1093 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY $
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+169079 #12810 44118 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+169119 #12811 45081 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+169157 #12812 7789 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY $
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+169195 #12813 54331 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+169231 #12814 4907 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY $
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277174 #12815 44445 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277295 #12816 37650 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277336 #12817 10402 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277374 #12818 59240 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277448 #12819 14324 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+277486 #12820 54930 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343023 #12821 39876 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343132 #12822 34760 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343172 #12823 29957 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343211 #12824 39880 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343259 #12825 51480 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    mydns[31665]: mydns: 22-Jul-2010 16:28:53+343297 #12826 59782 UDP 204.188.249.62 IN NS . REFUSED Zone_not_found 1 0 0 0 LOG Y QUERY$
    
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats verbose logging and if you want to find the reason for the segfaults on your system, this is the way to find it.

    If you think that it only happens when you insert or update dns records, then you should now create or update dns records to see if you can create a segfault.
     
  17. crypted

    crypted Member

    Yeah, no clue about that. ISPCONFIG is not being touched when it happens. Usually, it's at random hours of the day when I'm out on the down, meaning no-one is using SSH or ISPCONFIG.

    So, it would be related to general queries I think.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Then the theory that you posted about the reasons for the segfaults can not be the case. If you are not logged into ispconfig, nothing gets changed or altered in the tables used by mydns. You should tell the guys in the mydns mailinglist that the segfaults happen when no data gets altered or added in the database.
     
  19. crypted

    crypted Member

    They want evidence... So this seems to be the only way to get something to show?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    You can try without verbosity first. But if it does not show enough info then, you might have to try again with verbose logging.
     

Share This Page