Hi, I've encountered a strange problem. I'm using syslog-ng 2.0.4 with a fairly basic setup, and syslog-ng hangs when it is reading from /proc/kmsg, but only right after boot and only on one of my machines, which is a RHEL AS3 machine. It is reproducible, the host hangs on every boot as every process which tries to write to /dev/log gets blocked. Has anyone seen such behaviour? I've ran syslog-ng under strace, so I can send debug data in private. Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
Hi,
I've encountered a strange problem. I'm using syslog-ng 2.0.4 with a fairly basic setup, and syslog-ng hangs when it is reading from /proc/kmsg, but only right after boot and only on one of my machines, which is a RHEL AS3 machine.
It is reproducible, the host hangs on every boot as every process which tries to write to /dev/log gets blocked.
Has anyone seen such behaviour?
Replying to myself: adding log_fetch_limit(1) for the /proc/kmsg source solved the issue. Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
Any idea why I am getting this error ..When I run make & make install /usr/bin/ld: cannot find -lnet collect2: ld returned 1 exit status make[2]: *** [syslog-ng] Error 1 make[2]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4' make: *** [all] Error 2
I am sorry , the e-mail didn`t include the error message When I run make & make install , I get the following error /usr/bin/ld: cannot find -lnet collect2: ld returned 1 exit status make[2]: *** [syslog-ng] Error 1 make[2]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4' make: *** [all] Error 2
On Tue, 2007-07-17 at 10:25 -0400, Tamer Tayea wrote:
When I run make & make install , I get the following error /usr/bin/ld: cannot find -lnet collect2: ld returned 1 exit status make[2]: *** [syslog-ng] Error 1 make[2]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4' make: *** [all] Error 2
You're probably missing the libnet1 development libraries. On Ubuntu you can install them with: sudo apt-get install libnet1-dev For other distros, check your repositories, they should have something similar. -- Daniel Bartholomew
I ran the following commands in sequence
rpm -ivh libnet-1.0.2a-2.i386.rpm
rpm -Uvh libnet-1.1.2.1-3.i386.rpm libnet-devel-1.1.2.1-3.i386.rpm
I didn`t get any errors from previous rpm commands..I am still getting same error .. any ideas? -----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Daniel Bartholomew Sent: Tuesday, July 17, 2007 10:29 AM To: Syslog-ng users' and developers' mailing list Subject: RE: [syslog-ng] Compilation error On Tue, 2007-07-17 at 10:25 -0400, Tamer Tayea wrote:
When I run make & make install , I get the following error /usr/bin/ld: cannot find -lnet collect2: ld returned 1 exit status make[2]: *** [syslog-ng] Error 1 make[2]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/Desktop/slng/syslog-ng-2.0.4' make: *** [all] Error 2
You're probably missing the libnet1 development libraries. On Ubuntu you can install them with: sudo apt-get install libnet1-dev For other distros, check your repositories, they should have something similar. -- Daniel Bartholomew
On Tue, 2007-07-17 at 15:20 +0100, Geller, Sandor (IT) wrote:
Hi,
I've encountered a strange problem. I'm using syslog-ng 2.0.4 with a fairly basic setup, and syslog-ng hangs when it is reading from /proc/kmsg, but only right after boot and only on one of my machines, which is a RHEL AS3 machine.
It is reproducible, the host hangs on every boot as every process which tries to write to /dev/log gets blocked.
Has anyone seen such behaviour?
Replying to myself: adding log_fetch_limit(1) for the /proc/kmsg source solved the issue.
Hmm... this should not be happening, the file() source does not use fetch_limit(), it basically forces the use of a single read system call. (by using the LR_NOMREAD flag) This was implemented before 1.9.11, so it's been a long time, since this is integrated. Are you sure this was the cause? Can you check if syslog-ng actually issues multiple read() system calls without checking for readability? -- Bazsi
Hi,
On Tue, 2007-07-17 at 15:20 +0100, Geller, Sandor (IT) wrote:
Hi,
I've encountered a strange problem. I'm using syslog-ng 2.0.4 with a fairly basic setup, and syslog-ng hangs when it is reading from /proc/kmsg, but only right after boot and only on one of my machines, which is a RHEL AS3 machine.
It is reproducible, the host hangs on every boot as every process which tries to write to /dev/log gets blocked.
Has anyone seen such behaviour?
Replying to myself: adding log_fetch_limit(1) for the /proc/kmsg source solved the issue.
Hmm... this should not be happening, the file() source does not use fetch_limit(), it basically forces the use of a single read system call. (by using the LR_NOMREAD flag)
This was implemented before 1.9.11, so it's been a long time, since this is integrated.
Are you sure this was the cause? Can you check if syslog-ng actually issues multiple read() system calls without checking for readability?
The output of strace showed that a read was called without a prior poll. I've sent the configuration and the strace outputs in a private mail. Regards, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
On Wed, 2007-07-18 at 13:09 +0100, Geller, Sandor (IT) wrote:
Hi,
On Tue, 2007-07-17 at 15:20 +0100, Geller, Sandor (IT) wrote:
Hi,
I've encountered a strange problem. I'm using syslog-ng 2.0.4 with a fairly basic setup, and syslog-ng hangs when it is reading from /proc/kmsg, but only right after boot and only on one of my machines, which is a RHEL AS3 machine.
It is reproducible, the host hangs on every boot as every process which tries to write to /dev/log gets blocked.
Has anyone seen such behaviour?
Replying to myself: adding log_fetch_limit(1) for the /proc/kmsg source solved the issue.
Hmm... this should not be happening, the file() source does not use fetch_limit(), it basically forces the use of a single read system call. (by using the LR_NOMREAD flag)
This was implemented before 1.9.11, so it's been a long time, since this is integrated.
Are you sure this was the cause? Can you check if syslog-ng actually issues multiple read() system calls without checking for readability?
The output of strace showed that a read was called without a prior poll. I've sent the configuration and the strace outputs in a private mail.
Here's the fix, that I've commited now. Can you check if it indeed fixes the problem? Thanks. diff --git a/src/logreader.c b/src/logreader.c index e797223..c7ddf83 100644 --- a/src/logreader.c +++ b/src/logreader.c @@ -323,8 +323,10 @@ log_reader_fetch_log(LogReader *self, FDRead *fd) { log_reader_iterate_buf(self, NULL, FALSE, &msg_count); - /* we still have something */ - if (self->ofs != 0) + /* we still have something that could not be emptied, or multiread is + * disabled and we did not check readability when we came here. + */ + if (self->ofs != 0 || (self->flags & LR_NOMREAD)) return TRUE; } -- Bazsi
Hi,
Here's the fix, that I've commited now. Can you check if it indeed fixes the problem? Thanks.
diff --git a/src/logreader.c b/src/logreader.c index e797223..c7ddf83 100644 --- a/src/logreader.c +++ b/src/logreader.c @@ -323,8 +323,10 @@ log_reader_fetch_log(LogReader *self, FDRead *fd) { log_reader_iterate_buf(self, NULL, FALSE, &msg_count);
- /* we still have something */ - if (self->ofs != 0) + /* we still have something that could not be emptied, or multiread is + * disabled and we did not check readability when we came here. + */ + if (self->ofs != 0 || (self->flags & LR_NOMREAD)) return TRUE; }
Confirmed, this patch indeed fixed the problem. Thanks, Sandor -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.
participants (4)
-
Balazs Scheidler
-
Daniel Bartholomew
-
Geller, Sandor (IT)
-
Tamer Tayea