zdns icon indicating copy to clipboard operation
zdns copied to clipboard

Excess FD errors

Open chris-wood opened this issue 4 years ago • 3 comments
trafficstars

Running from a fresh build of tip of master on macOS, I'm seeing the following:

$ echo "google.com" | ./zdns A
{"data":{"protocol":"udp","resolver":"[2001:558:feed::2]:53"},"error":"write udp 10.0.0.184:59008-\u003e[2001:558:feed::2]:53: address 2001:558:feed::2: non-IPv4 address","name":"google.com","status":"ERROR","timestamp":"2021-09-05T20:38:25-07:00"}
FATA[0000] unable to create socketlisten udp 10.0.0.184:0: socket: too many open files 

I assume this isn't expected, so I'm wondering if this is a regression. I could of course be using it wrong, too! Happy to provide any additional information if it would be helpful.

chris-wood avatar Sep 06 '21 15:09 chris-wood

I don't think this is a regression. ZDNS does preemptively open thr FDs at the start now. You either need to decrease the number of workers or increase the number of the FDs you can open.

On Mon, Sep 6, 2021 at 8:06 AM Christopher Wood @.***> wrote:

Running from a fresh build of tip of master on macOS, I'm seeing the following:

$ echo "google.com" | ./zdns A {"data":{"protocol":"udp","resolver":"[2001:558:feed::2]:53"},"error":"write udp 10.0.0.184:59008-\u003e[2001:558:feed::2]:53: address 2001:558:feed::2: non-IPv4 address","name":"google.com","status":"ERROR","timestamp":"2021-09-05T20:38:25-07:00"} FATA[0000] unable to create socketlisten udp 10.0.0.184:0: socket: too many open files

I assume this isn't expected, so I'm wondering if this is a regression. I could of course be using it wrong, too! Happy to provide any additional information if it would be helpful.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zmap/zdns/issues/250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABREUCXI5HIYOGZJENRRKTUATKIDANCNFSM5DQUMCPA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

zakird avatar Sep 06 '21 15:09 zakird

Capping the number of worker threads did the trick. Maybe bumping the default down to something smaller would be useful? The fix wasn't obvious to me 🤷 If not, we can close.

chris-wood avatar Sep 06 '21 19:09 chris-wood

At the very least we should output a useful error so that the user knows what's going on and how to fix

zakird avatar Nov 04 '23 08:11 zakird