[syslog-ng] [Bug 142] --worker-threads=0 support

bugzilla at bugzilla.balabit.com bugzilla at bugzilla.balabit.com
Sat Nov 12 14:04:55 CET 2011


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


Arkadiusz Miśkiewicz <arekm at maven.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|INVALID                     |
             Status|RESOLVED                    |REOPENED




--- Comment #7 from Arkadiusz Miśkiewicz <arekm at maven.pl>  2011-11-12 14:04:54 ---
Test program below uses two threads, one writting to local disk, other writting
to nfs server that's blocked on firewall (emulating D-state; the same as I was testing
syslog-ng).

It writes to local disk all the time without any problem even when /mnt/test/cron
is blocked. This is the same setup where I tested syslog-ng.

So looks like D-state doesn't apply to whole process.

#!/usr/bin/python

import time
import threading
import os

def log():
    # on local disk
    f = open('/var/log/user', 'a')
    while 1:
        f.write("%d: user: %s\n" % (os.getpid(), time.ctime()))
        f.flush()
        time.sleep(1)
    f.close()

def log_stuck():
    # /mnt/test is on NFS which is blocked on firewall
    f = open('/mnt/test/cron', 'a')
    while 1:
        f.write("%d: cron: %s\n" % (os.getpid(), time.ctime()))
        f.flush()
        time.sleep(1)
    f.close()

t1 = threading.Thread(target=log)
t2 = threading.Thread(target=log_stuck)

t1.start()
t2.start()

t1.join()
t2.join()


-- 
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