[Home]

Summary:ASTERISK-13245: [patch] app_chanspy crashed so-as "chanspy_ds.lock" has random values
Reporter:Yuri (ys)Labels:
Date Opened:2008-12-19 05:32:17.000-0600Date Closed:2008-12-19 09:08:55.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/app_chanspy
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_chanspy.c.diff
Description:Hi.

Inside function common_exec() declared struct chanspy_ds chanspy_ds, that contain "ast_mutex_t lock".

This lock is not initialized and contain random values from stack heap.
This may cause random crash in call to:
ast_mutex_init(&chanspy_ds.lock);
or
ast_mutex_lock(&chanspy_ds.lock);

In my BSD box with DEBUG_THREADS options enabled, this application crashed permanently on exit in ast_mutex_lock(&chanspy_ds.lock); point.







****** ADDITIONAL INFORMATION ******

Basically the bug is shown, when the DEBUG_THREADS options is set.

Also affected trunk and 1.6 version.
Comments:By: Digium Subversion (svnbot) 2008-12-19 09:02:58.000-0600

Repository: asterisk
Revision: 165889

U   branches/1.4/apps/app_chanspy.c

------------------------------------------------------------------------
r165889 | russell | 2008-12-19 09:02:57 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

(closes issue ASTERISK-13245)
Reported by: ys
Patches:
     app_chanspy.c.diff uploaded by ys (license 281)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165889

By: Digium Subversion (svnbot) 2008-12-19 09:05:05.000-0600

Repository: asterisk
Revision: 165890

_U  trunk/
U   trunk/apps/app_chanspy.c

------------------------------------------------------------------------
r165890 | russell | 2008-12-19 09:05:05 -0600 (Fri, 19 Dec 2008) | 17 lines

Merged revisions 165889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165889 | russell | 2008-12-19 09:03:02 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

(closes issue ASTERISK-13245)
Reported by: ys
Patches:
     app_chanspy.c.diff uploaded by ys (license 281)

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165890

By: Digium Subversion (svnbot) 2008-12-19 09:07:56.000-0600

Repository: asterisk
Revision: 165891

_U  branches/1.6.0/
U   branches/1.6.0/apps/app_chanspy.c

------------------------------------------------------------------------
r165891 | russell | 2008-12-19 09:07:55 -0600 (Fri, 19 Dec 2008) | 25 lines

Merged revisions 165890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r165890 | russell | 2008-12-19 09:05:09 -0600 (Fri, 19 Dec 2008) | 17 lines

Merged revisions 165889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165889 | russell | 2008-12-19 09:03:02 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

(closes issue ASTERISK-13245)
Reported by: ys
Patches:
     app_chanspy.c.diff uploaded by ys (license 281)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165891

By: Digium Subversion (svnbot) 2008-12-19 09:08:54.000-0600

Repository: asterisk
Revision: 165892

_U  branches/1.6.1/
U   branches/1.6.1/apps/app_chanspy.c

------------------------------------------------------------------------
r165892 | russell | 2008-12-19 09:08:54 -0600 (Fri, 19 Dec 2008) | 25 lines

Merged revisions 165890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r165890 | russell | 2008-12-19 09:05:09 -0600 (Fri, 19 Dec 2008) | 17 lines

Merged revisions 165889 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165889 | russell | 2008-12-19 09:03:02 -0600 (Fri, 19 Dec 2008) | 9 lines

Ensure that the chanspy datastore is fully initialized.

This patch resolved some random crash issues observed by a user on a BSD system

(closes issue ASTERISK-13245)
Reported by: ys
Patches:
     app_chanspy.c.diff uploaded by ys (license 281)

........

................

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=165892