[Bug 151] New: syslog-ng opens /dev/ log device on every HUP without closing it first
https://bugzilla.balabit.com/show_bug.cgi?id=151 Summary: syslog-ng opens /dev/log device on every HUP without closing it first Product: syslog-ng Version: 3.3.x Platform: Other OS/Version: Solaris Status: NEW Severity: major Priority: unspecified Component: syslog-ng AssignedTo: bazsi@balabit.hu ReportedBy: michael.hocke@nyu.edu Type of the Report: bug Estimated Hours: 0.0 On Solaris 10 the /dev/log device can be held open concurrently for up to only 16 instances. syslog-ng opens a new instance of /dev/log after HUPing the process, i.e. after the 16th HUP syslog-ng quits because the new configuration fails and so does the previous configuration. This has been working fine in 3.0. I cannot test if this started to happen in 3.1, 3.2, or if this is new for 3.3. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |irwin@princeton.edu --- Comment #1 from Gergely Nagy <algernon@balabit.hu> 2012-09-28 09:28:18 --- *** Bug 199 has been marked as a duplicate of this bug. *** -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.3.7 CC| |algernon@balabit.hu AssignedTo|bazsi@balabit.hu |algernon@balabit.hu -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 --- Comment #2 from Michael Hocke <michael.hocke@nyu.edu> 2012-09-28 17:04:51 --- When I filed the bug report I also worked on a quick and dirty work around to make sure that the log device is closed. The hack can be found in the mailing list under http://marc.info/?l=syslog-ng&m=132268458631308&w=2. Balasz replied a bit later with some more ideas for me to try and look into but I haven't had the time to do so since the work-around worked just fine for me. Here is a link to his reply: http://marc.info/?l=syslog-ng&m=132447651126992&w=2. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 --- Comment #3 from Irwin Tillman <irwin@princeton.edu> 2012-10-03 17:00:38 --- I've verified that this doesn't happen in version 3.2.5 on Solaris 10 (where it does in versios 3.3.6, 3.3.6.90). -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 --- Comment #4 from Gergely Nagy <algernon@balabit.hu> 2012-10-07 20:44:35 --- Well, I believe this is a pretty embarassing bug. Thing is, we open /dev/log, build a reader on it, then proceed with opening the door. We revoke and close the door properly, and we deinit the reader, but the fd under the reader stays open, which leads to our problem. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 --- Comment #5 from Gergely Nagy <algernon@balabit.hu> 2012-10-07 21:05:27 --- The easy fix is to unref self->reader and set it to NULL after at deinit time (similarly how it's done in affile), but that's not done in 3.2 either, so I'm not quite sure why things work there. I'll put this on a branch for now, and ask Bazsi for a review. The proposed fix is available on the hotfix/3.3/afstreams-fd-leak branch of my repo at github: https://github.com/algernon/syslog-ng/tree/hotfix/3.3/afstreams-fd-leak -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugzilla.balabit.com/show_bug.cgi?id=151 Gergely Nagy <algernon@balabit.hu> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution| |FIXED Status|ASSIGNED |RESOLVED --- Comment #6 from Gergely Nagy <algernon@balabit.hu> 2012-10-08 11:11:00 --- I've spent a few hours pondering about the risks of unrefing the reader at deinit, but since that is done in pretty much every other source driver, and my tests show that the patch works correctly, I'm merging this to master, and marking this issue fixed. -- Configure bugmail: https://bugzilla.balabit.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla@bugzilla.balabit.com