Announcement

Collapse
No announcement yet.

Looking for input on a possible sysklogd bug

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Looking for input on a possible sysklogd bug

    I'm Looking for some input on a possible syslog bug on feisty. I'd like to know whether this suspected 'bug' affects other users as well as my machine.

    /etc/cron.daily/sysklogd script causes syslogging to halt when it's run (The script is run as a daily cron job to rotate logs)

    In the end, the script should restart the syslog daemon, but it fails to do so, effectively killing logging.

    I was able to 'quick-fix' it by editing the script:
    /etc/init.d/sysklogd reload-or-restart > /dev/null
    to
    /etc/init.d/sysklogd restart > /dev/null
    (forcing a restart instead of reloading)

    Before I dive deeper into it, I'd like to know whether the 'bug' affects all machines or is there just something wrong on my system

    Thanks

    (P.S. I noticed there was an old similar dapper bug report on launchpad)



    #2
    Re: Looking for input on a possible sysklogd bug

    Hi kubicle,

    On my system I don't see any trouble, my feisty is started from 13 days and it has 7 occurences of /var/log/syslog.*
    syslog is running.
    How do you see this trouble and from when ?

    Cheers

    Comment


      #3
      Re: Looking for input on a possible sysklogd bug

      Originally posted by sky
      Hi kubicle,

      On my system I don't see any trouble, my feisty is started from 13 days and it has 7 occurences of /var/log/syslog.*
      syslog is running.
      How do you see this trouble and from when ?

      Cheers
      Thanks for the info

      There are basically two things I've modified on my system that may affect it. firstly I've set syslog to listen to remote log messages from my router/firewall, and secondly I've set log outputs to be shown on VT5 (router/firewall) and VT6 (systemlog).

      Bug symptoms:
      I noticed yesterday that the logs had fallen silent and that the last messages were from cron daily jobs. And after manual troubleshooting I noticed that after running the sysklog cron job the /var/log/syslog (the active log file) was recreated as an empty file and no further messages are logged into it (stays as an 0kb file)

      As I mentioned, editing the script fixes it on my system, but I'll debug further when I find the inspiration (my primary canditate is the 'reload' part of /etc/init.d/sysklogd init-script, especially the HUP signal sent by it, but that's just a gut feeling...I'll probably edit the script to run more verbosely to see where the culprit lies)



      Comment


        #4
        Re: Looking for input on a possible sysklogd bug

        I think I've narrowed it down to the 'reload' case of /etc/init.d/sysklogd

        here's the relevant section:
        case "$1" in
        start)
        log_begin_msg "Starting system log daemon..."
        create_xconsole
        start-stop-daemon --start --quiet --pidfile $pidfile --name syslogd --startas $binpath -- $SYSLOGD
        log_end_msg $?
        ;;
        stop)
        log_begin_msg "Stopping system log daemon..."
        start-stop-daemon --stop --quiet --pidfile $pidfile --name syslogd
        log_end_msg $?
        ;;
        reload|force-reload)
        log_begin_msg "Reloading system log daemon..."
        start-stop-daemon --stop --quiet --signal 1 --pidfile $pidfile --name syslogd
        log_end_msg $?
        ;;

        restart)
        log_begin_msg "Restarting system log daemon..."
        start-stop-daemon --stop --retry 5 --quiet --pidfile $pidfile --name syslogd
        start-stop-daemon --start --quiet --pidfile $pidfile --name syslogd --startas $binpath -- $SYSLOGD
        log_end_msg $?
        ;;
        reload-or-restart)
        if running
        then
        $0 reload
        else
        $0 start
        fi
        ;;
        *)
        log_success_msg "Usage: /etc/init.d/sysklogd {start|stop|reload|restart|force-reload|reload-or-restart}"
        exit 1
        esac
        Here's the same from the edgy script (6.10):

        restart|force-reload|reload-or-restart|reload)
        log_begin_msg "Restarting system log..."
        start-stop-daemon --stop --quiet --exec $binpath --pidfile $pidfile
        sleep 1
        start-stop-daemon --start --quiet --exec $binpath -- $SYSLOGD
        log_end_msg $?
        ;;
        Is the daemon supposed to wake up by itself after the SIGHUP signal, as the feisty reload case only invokes 'start-stop-daemon --stop' (as opposed to 'start-stop-daemon --stop' & 'start-stop-daemon --start') on edgy...or should the feisty script use stop-and-start as well?

        EDIT: Oh, thanks to Birdy for pointing out the differences in the edgy script

        Comment


          #5
          Re: Looking for input on a possible sysklogd bug

          Hi,

          It's really strange because my scripts are exactly the same as yours, and it's working... Sorry I can't help more.

          Good luck

          Comment


            #6
            Re: Looking for input on a possible sysklogd bug

            Originally posted by kubicle
            I think I've narrowed it down to the 'reload' case of /etc/init.d/sysklogd
            To that I agree on the grounds following:

            Originally posted by HAL ("06.10")
            ROOT@HAL # ps -u root | grep 'sys' -
            7213 ? 00:00:00 syslogd
            ROOT@HAL # /etc/init.d/sysklogd reload
            * Restarting system log... [ ok ]
            ROOT@HAL # ps -u root | grep 'sys' -
            7582 ? 00:00:00 syslogd
            Originally posted by KUB ("07.04")
            ROOT@KUB # ps -u root | grep 'sys' -
            4308 ? 00:00:00 syslogd
            ROOT@KUB # /etc/init.d/sysklogd reload
            * Restarting system log... [ ok ]
            ROOT@KUB # ps -u root | grep 'sys' -
            4308 ? 00:00:00 syslogd
            That one got me hooked (Kubicle, you must not feed an iguana ...).
            So I changed the relevant passage of the "new" sysklogd script to:

            Code:
            log_begin_msg "Reloading system log daemon..."
            start-stop-daemon --stop --quiet --pidfile $pidfile --name syslogd
            start-stop-daemon --start --quiet --exec $binpath -- $SYSLOGD
            log_end_msg $?
            Originally posted by KUB ("07.04")
            ROOT@KUB # ps -u root | grep 'sys' -
            5437 ? 00:00:00 syslogd
            ROOT@KUB # /etc/init.d/sysklogd reload
            * Restarting system log... [ ok ]
            ROOT@KUB # ps -u root | grep 'sys' -
            5638 ? 00:00:00 syslogd
            Go figure ...

            Comment

            Working...
            X