[asterisk-bugs] [Asterisk 0015123]: out of bounds crash and core dump
Asterisk Bug Tracker
noreply at bugs.digium.com
Thu Jun 18 10:40:22 CDT 2009
A NOTE has been added to this issue.
======================================================================
https://issues.asterisk.org/view.php?id=15123
======================================================================
Reported By: axisinternet
Assigned To: russell
======================================================================
Project: Asterisk
Issue ID: 15123
Category: Resources/res_musiconhold
Reproducibility: N/A
Severity: crash
Priority: normal
Status: feedback
Asterisk Version: 1.4.22
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-05-15 16:02 CDT
Last Modified: 2009-06-18 10:40 CDT
======================================================================
Summary: out of bounds crash and core dump
Description:
Crash and core dump - will attach backtrace from the core dump.
======================================================================
Relationships ID Summary
----------------------------------------------------------------------
has duplicate 0015195 double free or corruption (!prev) in mo...
related to 0015109 Abort by memory allocator, possibly in ...
======================================================================
----------------------------------------------------------------------
(0106651) svnbot (reporter) - 2009-06-18 10:40
https://issues.asterisk.org/view.php?id=15123#c106651
----------------------------------------------------------------------
Repository: asterisk
Revision: 201614
_U branches/1.6.2/
U branches/1.6.2/res/res_musiconhold.c
------------------------------------------------------------------------
r201614 | russell | 2009-06-18 10:40:16 -0500 (Thu, 18 Jun 2009) | 43
lines
Merged revisions 201610 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
................
r201610 | russell | 2009-06-18 10:27:10 -0500 (Thu, 18 Jun 2009) | 36
lines
Merged revisions 201600 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r201600 | russell | 2009-06-18 10:24:31 -0500 (Thu, 18 Jun 2009) | 29
lines
Fix memory corruption and leakage related reloads of non files mode
MoH classes.
For Music on Hold classes that are not files mode, meaning that we are
executing
an application that will feed us audio data, we use a thread to
monitor the
external application and read audio from it. This thread also makes
use of the
MoH class object. In the MoH class destructor, we used
pthread_cancel() to ask
the thread to exit. Unfortunately, the code did not wait to ensure
that the
thread actually went away. What needed to be done is a pthread_join()
to ensure
that the thread fully cleans up before we proceed. By adding this one
line, we
resolve two significant problems:
1) Since the thread was never joined, it never fully goes away. So,
on every
reload of non-files mode MoH, an unused thread was sticking
around.
2) There was a race condition here where the application monitoring
thread
could still try to access the MoH class, even though the thread
executing
the MoH reload has already destroyed it.
(issue https://issues.asterisk.org/view.php?id=15109)
Reported by: jvandal
(issue https://issues.asterisk.org/view.php?id=15123)
Reported by: axisinternet
(issue https://issues.asterisk.org/view.php?id=15195)
Reported by: amorsen
(issue AST-208)
........
................
------------------------------------------------------------------------
http://svn.digium.com/view/asterisk?view=rev&revision=201614
Issue History
Date Modified Username Field Change
======================================================================
2009-06-18 10:40 svnbot Checkin
2009-06-18 10:40 svnbot Note Added: 0106651
======================================================================
More information about the asterisk-bugs
mailing list