[syslog-ng] No output to file with 2.1.1

Balazs Scheidler bazsi at balabit.hu
Wed Sep 3 12:38:47 CEST 2008


On Tue, 2008-09-02 at 18:33 -0400, Joe Shaw wrote:
> Hi,
> 
> I just tried updating to 2.1.1 on my test instance and none of the
> incoming data is being written out to disk.  It worked for me with
> 2.0.9.
> 
> The problem is with the log_iw_size() parameter in my tcp source.
> Without it, the data is being logged to disk.
> 
> My configuration file is below.  Anything obviously amiss?
> 
> Thanks,
> Joe
> 
> --
> 
> # General Options
> 
> options {
>     sync(0);
>     time_reopen(10);
>     log_fifo_size(131072);
>     long_hostnames(off);
>     use_dns(yes);
>     dns_cache(yes);
>     use_fqdn(no);
>     keep_hostname(yes);
>     use_time_recvd(no);
>     #log_msg_size(65536);
>     log_msg_size(16384);
>     stats_freq(180);
>     #time_sleep(20);
> };
> 
> # Remote source
> source s_tcp {
>     tcp(port(2000) log_iw_size(131072) log_fetch_limit(1024)
> max_connections(128));
> };

hmm... if SQL is not being used syslog-ng is compiled in non-threaded
mode, in which case the counter used for the window size is 16 bits,
cutting the high order bits, thus resulting in a zero window size. This
obviously will not work really well.

I've pushed a patch to make this a 32 bit value, in the 3.0 branch I
already made the same change, albeit for performance reasons.

commit ab7b55509881f0bfb76ba76a2e8d5fe762b92b96
Author: Balazs Scheidler <bazsi at balabit.hu>
Date:   Wed Sep 3 12:36:40 2008 +0200

    changed GAtomicCounter type to gint instead of guint16 to allow window sizes larger than 65536
    
        This also synces syslog-ng with the 3.0 branch, where this is already gint instead of guint16.

diff --git a/src/atomic.h b/src/atomic.h
index b97c81d..5f9ee06 100644
--- a/src/atomic.h
+++ b/src/atomic.h
@@ -63,7 +63,7 @@ g_atomic_counter_set(GAtomicCounter *c, gint value)
 }
 
 #else
-typedef guint16 GAtomicCounter;
+typedef gint GAtomicCounter;
 
 static inline void
 g_atomic_counter_inc(GAtomicCounter *c)



-- 
Bazsi



More information about the syslog-ng mailing list