[asterisk-bugs] [Asterisk 0015474]: [patch] Race condition in cdr_syslog.c (SVN Revision 205561)
Asterisk Bug Tracker
noreply at bugs.digium.com
Mon Dec 20 08:03:14 UTC 2010
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=15474
======================================================================
Reported By: praise
Assigned To: seanbright
======================================================================
Project: Asterisk
Issue ID: 15474
Category: CDR/NewFeature
Reproducibility: sometimes
Severity: minor
Priority: normal
Status: assigned
Asterisk Version: SVN
JIRA:
Regression: No
Reviewboard Link:
SVN Branch (only for SVN checkouts, not tarball releases): trunk
SVN Revision (number only!): 205561
Request Review:
======================================================================
Date Submitted: 2009-07-09 06:28 CDT
Last Modified: 2010-12-20 02:03 CST
======================================================================
Summary: [patch] Race condition in cdr_syslog.c (SVN Revision
205561)
Description:
There is a race condition in these lines of code:
openlog(sink->ident, LOG_CONS, sink->facility);
syslog(sink->priority, "%s", ast_str_buffer(str));
closelog();
openlog interferes with all syslog calls in the process. Since asterisk
is multithreaded, some other syslog message may be sent with syslog
ident/facility, or some other call to openlog might interfere with this
module's
syslog call.
This is not going to happen very often, but nevertheless it is an issue.
I have resolved here piping to a different process which routes all
messages
to syslog with correct values,but implementation of a global syslog
manager could be a more elegant solution.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2010-12-20 02:03 tilghman Summary Race condition in
cdr_syslog.c (SVN Revision 205561) => [patch] Race condition in cdr_syslog.c
(SVN Revision 205561)
======================================================================
More information about the asterisk-bugs
mailing list