[syslog-ng]syslog-ng hanging bringing machine in trouble

Achim Gsell achim@cybercity.ch
Wed, 12 Feb 2003 14:34:28 +0100


On Wednesday 12 February 2003 13:29, Roberto Nibali wrote:

> I've not observed this behavior with glibc-2.1.3 yet (that's what I'm using
> for my distribution). Might it be that newer glibc's have this problem?

glibc-2.1.3 has this problem but glibc-2.2.5 and glibc-2.3.1 not:

glibc-2.1.3/misc/syslog.c in function vsyslog():

       if (!connected || __send(LogFile, buf, bufsize, 0) < 0)
         {
            closelog_internal ();       /* attempt re-open next time */
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            /*
             * Output the message to the console; don't worry about blocking,
             * if console blocks everything will.  Make sure the error reported
             * is the one from the syslogd failure.
             */
            if (LogStat & LOG_CONS &&
                (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0)
              {
                dprintf (fd, "%s\r\n", buf + msgoff);
                (void)__close(fd);
              }
          }

If __send() fails and the LOG_CONS flag is set in LogStat, the message will
only be written to the system console. 

Best regards,

Achim Gsell