# kernel 4.12.5 socket connections freezeup?

## eccerr0r

I had a weird occurrence when using a gentoo-sources kernel 4.12.5.

After about a day and half after running it, I could not make any socket connections out on udp port 53.  No matter what I do, I could not  get any DNS requests going.

I run a nameserver on this machine (a QEMU VM) and normally set resolv.conf to point to localhost.  DNS lookups spontaneously started failing.  I couldn't get my nameserver working again as even my LAN machines that depend on this machine's DNS server stopped working.  As the machine runs a mailserver I had to be able to resolve, so I pointed my resolv.conf to external hosts.  

They too failed to operate.

Eventually I restored everything to what it was before and found that rebooting the virtual machine restored operation...  THIS IS NOT NORMAL!

Anyone had something like this happen?  Just wondering if someone ran across this before debugging this further.  As far as I can tell this is a kernel issue of some sort (unless I somehow screwed up my iptables but I don't see how; the iptables have been working fine for more than a month before this, with a 4.9.16 kernel (with big stack protector patch).)

------------

Happened again after just about 2 days.  Reverting to kernel 4.9.16.

I think it may be a kernel bug but unsure yet, I'd suggest people avoiding 4.12.5.

----------

## kamil1

I had *exactly* the same thing happen to me last week, twice. 4.12.5 kernel running under KVM (a VPS setup), running its own name server and mail server. I came here looking for somebody else with a similar problem and I found your post.

As I recently upgraded both the kernel (from 4.9.34 to 4.12.5) and bind (from 9.11.1_p1 to 9.11.1_p3), I rolled back both. But I agree with you that this looks more likely like some weird kernel problem, as replacing 127.0.0.1 with google name servers in /etc/resolv.conf did not fix it for me but a reboot did.

I'm hoping that rolling back the kernel and bind will stabilize things as I'll be backpacking in wilderness for 10 days starting this weekend and if my server stops receiving mail again, I don't think I'll be able to fix it from up there...

----------

## CaptainBlood

Here there is an out of the tree wifi hardware driver which works fine (almost) in 4.9xxx.

Actually it disconnects and reconnects once in a while, but this has nothing to do with the kernel itself.

with stable 4.12.5 it always ends up by self rebooting within a couple of hours.

It has been like this for any kernel > 4.9.34.

I'm staying away from those, despite testing each new kernel to check for any improvement.

Thks 4 ur attention, interest & support.

----------

## eccerr0r

Thanks, looks like I'm not the only one, now I wonder if a physical machine has this same issue or not.

Ouch.  This is going to be tough to replicate and track down if it takes 2 days to fail.   May need to take out gentoo-patches and see if it works on vanilla or see if a newer release of the kernel has the same issue or not.  Also need to see if it's specific to VMs, perhaps it's a KVM thing.  Hmm.

----------

## kamil1

Well, I've been running 4.12 kernels for some time on two laptops without any issues, but of course they are running very different workloads than a server.

And it's clearly not all socket connections that freeze up. It may just be UDP. TCP connections like SSH and HTTP(S) worked just fine.

----------

## kamil1

FYI, I've been running the 4.12.12 kernel for over two weeks on my VPS now without any issues.  So it looks like the problems we've been experiencing were limited to the 4.12.5 kernel.

----------

## eccerr0r

Thanks, I guess I'll have to see what happens if I move to 4.12.12.

----------

