[syslog-ng]Lost of facility/level

Jerome Peducasse peducasse@echo.fr
Tue, 16 Apr 2002 12:50:31 +0200


--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

It seems, it occurs errors with long messages.
With this code:
KELOG_RELEASE(( LOG_ERR, \
                        "not enougth space to make result ouput! \n   varlen=%d len=%d max_len=%d \n   result is '%s'\n" WHERE,  \
                        varlen, len, max_len, result, \
                        HERE ));
messages come in user.notice instead of local0.err:

Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice] varlen=19 varlen=19 len=2048 max_len=2048 
Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice] result result is \'<SP TYPE=\'L\'> / 406 / Safrane / BMW série 5 145  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 80  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 13  145  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 155  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13  </SP><SP TYPE=\'W\'>165</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 175  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 185  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13  </SP><SP TYPE=\'W\'>165</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'> !
 </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>14<131>Apr 16 11:18:43 w3search[2495]: not enougth space to make result ouput! 
Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice] varlen=6 varlen=6 len=2048 max_len=2048 
Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice]  <131>Apr 16 11:18:43 w3search[2495]: SmartPreview failed for ip=159884415 in enum echo::keret echo::ThalieClient::getDoc(uint32 &, echo::ThalieDocument *, const echo::Query &, const echo::Answer *, const char (*)[255]):ThalieClient.cc:642 



Attached file contains result output of strace.

  
Thanks

On Thu, Apr 11, 2002 at 05:56:57PM +0100, Jerome Peducasse wrote:
> On Thu, Apr 11, 2002 at 04:39:44PM +0200, Balazs Scheidler wrote:
> > On Thu, Apr 11, 2002 at 04:31:03PM +0100, Jerome Peducasse wrote:
> > > Hi,
> > > 	
> > > 	I have applied your patch since one week and I already report some errors such as:
> > > Apr 11 14:49:32 w3search3/w3search3 in void echo::AtlasClient::onRead(void *):AtlasClient.cc:427 <130>Apr 11 14:49:32 frontatlas[9192]: read Context failed on socket=6 in void echo::AtlasClient::onRead(void *):AtlasClient.cc:434 
> > > 
> > > Both embedded messages come with facility user instead of local0 (on localhost and on loghost).
> > 
> > can you strace syslog-ng (with -s <high number> specified) or tcpdump the
> > syslog traffic to see whether syslog-ng or your device is at fault?
> I don't think it's a device fault because I have 2 destinations (local and loghost) and error appears on both.
> I launch strace on some computer and I wait ...
> 
> Thanks.
> 
> -- 
> Jerome Peducasse
> 
> _______________________________________________
> syslog-ng maillist  -  syslog-ng@lists.balabit.hu
> https://lists.balabit.hu/mailman/listinfo/syslog-ng

-- 
Jerome Peducasse
Wanadoo Portails - Sophia Antipolis

--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=strace_syslog-ng

read(3, "<131>Apr 16 11:18:43 w3search[2495]: not enougth space to make result ouput! \n   varlen=19 len=2048 max_len=2048 \n   result is \'<SP TYPE=\'L\'> / 406 / Safrane / BMW s\351rie 5 145  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 80  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 13  145  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 155  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13  </SP><SP TYPE=\'W\'>165</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 175  <"..., 1024) = 1024
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
open("/var/log/ramasse-miettes.log", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = 14
chown("/var/log/ramasse-miettes.log", 0, 0) = 0
chmod("/var/log/ramasse-miettes.log", 0600) = 0
fcntl(14, F_GETFL)                      = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(14, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(14, F_SETFD, FD_CLOEXEC)          = 0
open("/var/log/ramasse-miettes/user.notice", O_WRONLY|O_NONBLOCK|O_APPEND|O_CREAT|O_NOCTTY, 0600) = 15
chown("/var/log/ramasse-miettes/user.notice", 0, 0) = 0
chmod("/var/log/ramasse-miettes/user.notice", 0600) = 0
fcntl(15, F_GETFL)                      = 0xc01 (flags O_WRONLY|O_NONBLOCK|O_APPEND)
fcntl(15, F_SETFL, O_WRONLY|O_NONBLOCK|O_APPEND) = 0
fcntl(15, F_SETFD, FD_CLOEXEC)          = 0
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
poll([{fd=15, events=POLLOUT, revents=POLLOUT}, {fd=14, events=POLLOUT, revents=POLLOUT}, {fd=13, events=0}, {fd=12, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=9, events=POLLOUT, revents=POLLOUT}, {fd=4, events=0}, {fd=2, events=0}, {fd=5, events=POLLOUT, revents=POLLOUT}, {fd=6, events=POLLOUT, revents=POLLOUT}, {fd=1, events=0}, {fd=0, events=0}, {fd=3, events=POLLIN, revents=POLLIN}], 14, 100) = 6
write(15, "Apr 16 11:18:43 w3search1.search.fr.ke.echo varlen=19 len=2048 max_len=2048 \n", 77) = 77
fsync(15)                               = 0
write(14, "Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice] varlen=19 varlen=19 len=2048 max_len=2048 \n", 101) = 101
fsync(14)                               = 0
write(9, "Apr 16 11:18:43 w3search1.search.fr.ke.echo w3search[2495]: not enougth space to make result ouput! \n", 101) = 101
write(5, "<13>Apr 16 11:18:43 w3search1.search.fr.ke.echo varlen=19 len=2048 max_len=2048 \n", 81) = 81
write(6, "<131>Apr 16 11:18:43 w3search1.search.fr.ke.echo w3search[2495]: not enougth space to make result ouput! \n", 106) = 106
read(3, "<131>Apr 16 11:18:43 w3search[2495]: not enougth space to make result ouput! \n   varlen=6 len=2048 max_len=2048 \n ", 114) = 114
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
brk(0x806e000)                          = 0x806e000
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
poll([{fd=15, events=POLLOUT, revents=POLLOUT}, {fd=14, events=POLLOUT, revents=POLLOUT}, {fd=13, events=0}, {fd=12, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=9, events=0}, {fd=4, events=0}, {fd=2, events=0}, {fd=5, events=POLLOUT, revents=POLLOUT}, {fd=6, events=0}, {fd=1, events=0}, {fd=0, events=0}, {fd=3, events=POLLIN, revents=POLLIN}], 14, 100) = 4
write(15, "Apr 16 11:18:43 w3search1.search.fr.ke.echo result is \'<SP TYPE=\'L\'> / 406 / Safrane / BMW s\351rie 5 145  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 80  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 13  145  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 155  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13  </SP><SP TYPE=\'W\'>165</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 175  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'"..., 1105) = 1105
fsync(15)                               = 0
write(14, "Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice] result result is \\\'<SP TYPE=\\\'L\\\'> / 406 / Safrane / BMW s\351rie 5 145  </SP><SP TYPE=\\\'W\\\'>x</SP><SP TYPE=\\\'L\\\'> 80  </SP><SP TYPE=\\\'W\\\'>x</SP><SP TYPE=\\\'L\\\'> 13  145  </SP><SP TYPE=\\\'W\\\'>X</SP><SP TYPE=\\\'L\\\'> 13 155  </SP><SP TYPE=\\\'W\\\'>X</SP><SP TYPE=\\\'L\\\'>  </SP><SP TYPE=\\\'W\\\'>70</SP><SP TYPE=\\\'L\\\'>  </SP><SP TYPE=\\\'W\\\'>X</SP><SP TYPE=\\\'L\\\'> 13  </SP><SP TYPE=\\\'W\\\'>165</SP><SP TYPE=\\\'L\\\'>  </SP><SP TYPE=\\\'W\\\'>X</SP><SP TYPE=\\\'L\\\'>  </SP><SP TYPE=\\\'W\\\'>70</SP><SP TYPE=\\\'L\\\'>  </SP><SP TYPE=\\\'W\\\'>X</SP><SP TYPE=\\\'L\\\'> 13 175  </SP><SP T"..., 1234) = 1234
fsync(14)                               = 0
write(5, "<13>Apr 16 11:18:43 w3search1.search.fr.ke.echo result is \'<SP TYPE=\'L\'> / 406 / Safrane / BMW s\351rie 5 145  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 80  </SP><SP TYPE=\'W\'>x</SP><SP TYPE=\'L\'> 13  145  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 155  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13  </SP><SP TYPE=\'W\'>165</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'> 13 175  </SP><SP TYPE=\'W\'>X</SP><SP TYPE=\'L\'>  </SP><SP TYPE=\'W\'>70</SP><SP TY"..., 1113) = 1113
read(3, "<131>Apr 16 11:18:43 w3search[2495]: SmartPreview failed for ip=159884415 in enum echo::keret echo::ThalieClient::getDoc(uint32 &, echo::ThalieDocument *, const echo::Query &, const echo::Answer *, const char (*)[255]):ThalieClient.cc:642 ", 1023) = 239
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
time(NULL)                              = 1018948723
poll([{fd=15, events=POLLOUT, revents=POLLOUT}, {fd=14, events=POLLOUT, revents=POLLOUT}, {fd=13, events=0}, {fd=12, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=9, events=0}, {fd=4, events=0}, {fd=2, events=0}, {fd=5, events=POLLOUT, revents=POLLOUT}, {fd=6, events=0}, {fd=1, events=0}, {fd=0, events=0}, {fd=3, events=POLLIN}], 14, 100) = 3
write(15, "Apr 16 11:18:43 w3search1.search.fr.ke.echo <131>Apr 16 11:18:43 w3search[2495]: SmartPreview failed for ip=159884415 in enum echo::keret echo::ThalieClient::getDoc(uint32 &, echo::ThalieDocument *, const echo::Query &, const echo::Answer *, const char (*)[255]):ThalieClient.cc:642 \n", 284) = 284
fsync(15)                               = 0
write(14, "Apr 16 11:18:43 w3search1.search.fr.ke.echo [user.notice]  <131>Apr 16 11:18:43 w3search[2495]: SmartPreview failed for ip=159884415 in enum echo::keret echo::ThalieClient::getDoc(uint32 &, echo::ThalieDocument *, const echo::Query &, const echo::Answer *, const char (*)[255]):ThalieClient.cc:642 \n", 299) = 299
fsync(14)                               = 0
write(5, "<13>Apr 16 11:18:43 w3search1.search.fr.ke.echo <131>Apr 16 11:18:43 w3search[2495]: SmartPreview failed for ip=159884415 in enum echo::keret echo::ThalieClient::getDoc(uint32 &, echo::ThalieDocument *, const echo::Query &, const echo::Answer *, const char (*)[255]):ThalieClient.cc:642 \n", 288) = 288
time(NULL)                              = 1018948723
poll([{fd=15, events=0}, {fd=14, events=0}, {fd=13, events=0}, {fd=12, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=9, events=0}, {fd=4, events=0}, {fd=2, events=0}, {fd=5, events=0}, {fd=6, events=0}, {fd=1, events=0}, {fd=0, events=0}, {fd=3, events=POLLIN}], 14, 100) = 0
poll([{fd=15, events=0}, {fd=14, events=0}, {fd=13, events=0}, {fd=12, events=0}, {fd=11, events=0}, {fd=10, events=0}, {fd=9, events=0}, {fd=4, events=0}, {fd=2, events=0}, {fd=5, events=0}, {fd=6, events=0}, {fd=1, events=0}, {fd=0, events=0}, {fd=3, events=POLLIN, revents=POLLIN}], 14, 27000) = 1

--envbJBWh7q8WU6mo--