[syslog-ng] [Bug 133] New: syslog-ng-3.3. 0beta2 stops to receive messages from systemd activated /dev/log

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Wed Sep 21 12:54:19 CEST 2011


https://bugzilla.balabit.com/show_bug.cgi?id=133

           Summary: syslog-ng-3.3.0beta2 stops to receive messages from
                    systemd activated /dev/log
           Product: syslog-ng
           Version: 3.2.x
          Platform: PC
               URL: https://bugzilla.novell.com/show_bug.cgi?id=719102
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: unspecified
         Component: syslog-ng
        AssignedTo: bazsi at balabit.hu
        ReportedBy: mt at suse.com
Type of the Report: ---
   Estimated Hours: 0.0


Even all looks fine and syslog-ng-3.3.0beta2 starts to work correctly:

> systemctl status syslog.service
syslog.service - System Logging Service
          Loaded: loaded (/lib/systemd/system/syslog.service; enabled)
          Active: active (running) since Tue, 20 Sep 2011 14:08:31 +0200; 19h
ago
         Process: 2317 ExecReload=/sbin/killproc -p /var/run/syslog-ng.pid -HUP
/sbin/syslog-ng (code=exited, status=0/SUCCESS)
         Process: 740 ExecStart=/sbin/syslog-ng (code=exited, status=0/SUCCESS)
         Process: 738 ExecStartPre=/var/run/syslog-ng/addsockets (code=exited,
status=0/SUCCESS)
         Process: 735 ExecStartPre=/bin/systemctl stop
systemd-kmsg-syslogd.service (code=exited, status=0/SUCCESS)
        Main PID: 763 (syslog-ng)
          CGroup: name=systemd:/system/syslog.service
                  ├ 762 supervising syslog-ng
                  └ 763 /sbin/syslog-ng

> lsof | grep /dev/log
systemd       1             root   25u     unix 0xffff8802211690c0        0t0  
    4225 /dev/log
syslog-ng   762             root    3u     unix 0xffff8802211690c0        0t0  
    4225 /dev/log
syslog-ng   763             root    3u     unix 0xffff8802211690c0        0t0  
    4225 /dev/log

> ps ax | grep syslog
  762 ?        S      0:00 supervising syslog-ng
  763 ?        Ss     0:00 /sbin/syslog-ng

> ls -l /proc/763/fd/
total 0
lr-x------ 1 root root 64 Sep 20 14:10 0 -> /dev/null
l-wx------ 1 root root 64 Sep 20 14:10 1 -> /dev/null
lrwx------ 1 root root 64 Sep 20 14:10 10 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Sep 20 14:10 11 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Sep 20 14:10 12 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Sep 20 14:10 13 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Sep 20 14:10 19 -> /dev/xconsole
l-wx------ 1 root root 64 Sep 20 14:10 2 -> /dev/null
lrwx------ 1 root root 64 Sep 20 14:10 3 -> socket:[4225]
lrwx------ 1 root root 64 Sep 20 14:10 4 -> anon_inode:[eventpoll]
l-wx------ 1 root root 64 Sep 20 14:10 5 -> pipe:[8583]
lrwx------ 1 root root 64 Sep 20 14:10 6 -> socket:[8602]
lrwx------ 1 root root 64 Sep 20 14:10 7 -> anon_inode:[eventfd]
lrwx------ 1 root root 64 Sep 20 14:10 8 ->
/var/lib/syslog-ng/syslog-ng.persist
lr-x------ 1 root root 64 Sep 20 14:10 9 -> /proc/kmsg

it stops receiving at the socket after some time (hours) and tries
to send something to /dev/log gets blocked:

> strace logger ===========================================
...
socket(PF_FILE, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 1
connect(1, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
sendto(1, "<13>Sep 21 09:26:30 logger: ===="..., 71, MSG_NOSIGNAL, NULL, 0
--- blocks ---

Syslog-ng shows no reaction on the data send to the systemd
/dev/log socket, it just waits in epoll:

> strace -f -s128 -p 763
Process 763 attached - interrupt to quit
clock_gettime(CLOCK_MONOTONIC_RAW, {69938, 341467128}) = 0
epoll_wait(4, {}, 9, 21975)             = 0
clock_gettime(CLOCK_MONOTONIC_RAW, {69960, 335242759}) = 0
epoll_wait(4, ^C

and logs its statistics and -- MARK -- messages from time to
time to /var/log/messages.

After a "systemctl restart syslog.service", it starts reading
messages from /dev/log again -- still the using the same socket
node 4225 from systemd.

I don't think some of our patches are responsible for this problem as
all are from git and IMO unrelated. See also our bug reference in Url.


-- 
Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.


More information about the syslog-ng mailing list