Technical article 110882

My named is core dumping with "evSelectFD(fd ##): Invalid argument" on the console and in /var/adm/syslog on SCO OpenServer 5.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5

Written · Last revised

Problem

My named is repeatedly core dumping with the following error on the console and in /var/adm/syslog:

evSelectFD(fd 150): Invalid argument
core dump

I don't know what is causing this to happen.

Cause

Although it appears that the program is causing a core dump unintentionally, it is an intentional act by the bind programmers. Inside their code, they have:

ns_panic(int category, int dump_core, const char *format, ...) {
        va_list args;
        if (!log_ctx_valid)
                return;
        va_start(args, format);
        log_vwrite(log_ctx, category, log_critical, format, args);
        va_end(args);
        va_start(args, format);
        log_vwrite(log_ctx, ns_log_panic, log_critical, format, args);
        va_end(args);
        if (dump_core)
                abort(); /* This causes the core dump */
        else
                exit(1);
}

So, if they ever encounter a "panic" situation, they will dump core.

NOTE: The term "panic" here has nothing to do with the usual context in which the term is used, namely, the halting of the _operating system_ due to an unrecoverable condition.

One of their criteria for a panic and dumping core is if the number of open file descriptors is greater than a certain predefined maximum. This can be caused by the following situation:

By default, named binds to every interface on the machine, virtual or otherwise. As you approach 256 ifconfig aliases, named runs out of file descriptors, at which point the named will enter a mode of panic and dump core.

Solution

Fortunately, named 8.X (which ships with SCO OpenServer 5.0.5) allows you to specify which interfaces it binds to. You only need it listening on the actual IP address of the machine and loopback address. Therefore, add:

listen-on { X.X.X.X; 127.0.0.1; };

where "X.X.X.X" is the primary IP address of your ethernet interface, to your /etc/named.conf file.

Note that this is not a bug, but part of the implementation.

See also

Manual page: named(ADMN)
O'Reilly's book "DNS and BIND"

From the Xinuos technical article database, record 110882. Reproduced with permission. The original is at www.sco.com/ta/110882, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.