syscall recvmsg() seems to hang periodically

General support questions
sauteeed
Posts: 2
Joined: 2017/02/16 02:41:34

syscall recvmsg() seems to hang periodically

Postby sauteeed » 2017/02/16 03:03:12

I was running a BIND9 DNS server on CentOS 6. I found that sometimes the number of queries per second of the server suddenly became 0, and then this lasts a few seconds, usually over 10 seconds. However, the number of incoming DNS query requests never drops below 500 per second.

I added some debug logs to BIND9 source code, rebuilt and ran again, then I noticed the thread would wait for a few seconds before recvmsg() returns, periodically. While it hangs, the Recv-Q becomes full because new packets keep coming. The version is BIND-9.9.6, but unfortunately when I switch to BIND- 9.9.9-P4, the problem is still there.

I then tried another DNS server written in Golang, I noticed that the problem never came. The query rate keeps stable as it should be.

I think the ReadFromUDP() function of Golang that server used just wraps the syscall recvfrom(), and the recvfrom() there wouldn't block, either. But ReadFromUDP() seems to keep trying recvfrom(), while BIND9 is using epoll. When data's successfully read, ReadFromUDP() will then return. I'm not sure whether there is actually any difference between those two cases.

I'm using CentOS 6.4, and the kernel version is 2.6.32-358-el6.x86_64.

Has anyone ever encountered such kind of problem?

User avatar
TrevorH
Forum Moderator
Posts: 18144
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: syscall recvmsg() seems to hang periodically

Postby TrevorH » 2017/02/16 03:08:59

6.4 is nearly 4 years old. You need to yum update to 6.8 and the latest kernel 2.6.32-642.6.1.el6 along with all the other 2000 packages that were updated in the last 4 years.

We only ship bind 9.8.2
CentOS 5 dies in March 2017 - migrate soon!
Full time Geek, part time moderator. Use the FAQ Luke

sauteeed
Posts: 2
Joined: 2017/02/16 02:41:34

Re: syscall recvmsg() seems to hang periodically

Postby sauteeed » 2017/02/16 03:50:04

Thank you, TrevorH.

I'm going to try the latest CentOS. By the way, is there any known bug corresponding the problem I posted?

User avatar
TrevorH
Forum Moderator
Posts: 18144
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: syscall recvmsg() seems to hang periodically

Postby TrevorH » 2017/02/16 13:29:20

No idea but rpm -q --changelog kernel-2.6.32-642.13.1.el6.x86_64 has the changes for 2.6.32-358 starting on line 23832 so that means there've been around 23,000 changes to the kernel since the one you're running.
CentOS 5 dies in March 2017 - migrate soon!
Full time Geek, part time moderator. Use the FAQ Luke


Return to “CentOS 6 - General Support”

Who is online

Users browsing this forum: No registered users and 7 guests