[Home]

Summary:ASTERISK-14375: [patch] segfault in action_coreshowchannels() at manager.c
Reporter:caspy (caspy)Labels:
Date Opened:2009-06-25 08:32:35Date Closed:2009-08-06 16:48:15
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/ManagerInterface
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20090714__issue15397.diff.txt
( 1) bt_20090625_1337.txt
( 2) bt_20090702_1008.txt
Description:asterisk died in action_coreshowchannels() at manager.c

an issue seems to be slightly similar to my previous issues: 0014783, 0015192 - where one thread kills structures too early.
Comments:By: caspy (caspy) 2009-07-02 05:15:44

one more backtrace

By: caspy (caspy) 2009-07-14 23:44:57

thanks!
patch installed.
lets wait for some significant time to check. i'll report results.

By: Leif Madsen (lmadsen) 2009-07-15 10:19:32

This has been assigned to me, but I have no idea how this issue happened or how to recreate it in order to test.

By: Leif Madsen (lmadsen) 2009-07-15 10:20:22

Hmmm.... maybe I misread the title. I'm presuming there is an AMI command to show channels, and it crashes when you use it?

By: caspy (caspy) 2009-07-15 10:30:14

yes.
crash issued by AMI show channels command

By: Leif Madsen (lmadsen) 2009-07-20 13:34:03

Is there any specific thing you are doing to cause this to happen? I can't seem to get this to crash on latest 1.6.0...

Action: CoreShowChannels

Response: Success
Eventlist: start
Message: Channels will follow

Channel: DAHDI/pseudo-180928356
UniqueID: 1248114704.3
Context: default
Extension: s
Priority: 1
ChannelState: 1
ChannelStateDesc: Rsrvd
Application:
ApplicationData:
CallerIDnum:
Duration: 00:00:16
AccountCode:
BridgedChannel:
BridgedUniqueID:

Channel: Local/14588@from-devices-3502;2
UniqueID: 1248114704.2
Context: from-devices
Extension: 14588
Priority: 1
ChannelState: 6
ChannelStateDesc: Up
Application: MeetMe
ApplicationData: 7070,dMi
CallerIDnum: 00085D193AB5
Duration: 00:00:16
AccountCode:
BridgedChannel:
BridgedUniqueID:

Channel: Local/14588@from-devices-3502;1
UniqueID: 1248114704.1
Context: from-devices
Extension:
Priority: 1
ChannelState: 6
ChannelStateDesc: Up
Application: AppDial
ApplicationData: (Outgoing Line)
CallerIDnum: 145882
Duration: 00:00:16
AccountCode:
BridgedChannel: SIP/00085D193AB5-020faf80
BridgedUniqueID: 1248114704.0

Channel: SIP/00085D193AB5-020faf80
UniqueID: 1248114704.0
Context: from-devices
Extension: 145882
Priority: 1
ChannelState: 6
ChannelStateDesc: Up
Application: Dial
ApplicationData: Local/14588@from-devices/n
CallerIDnum: 00085D193AB5
Duration: 00:00:16
AccountCode:
BridgedChannel: Local/14588@from-devices-3502;1
BridgedUniqueID: 1248114704.1

Event: CoreShowChannelsComplete
EventList: Complete
ListItems: 4

By: caspy (caspy) 2009-07-27 01:08:24

Nothing specific.
Only medium loaded asterisk with periodic 'CoreShowChannels' action execution (every few seconds). But crash happens 1-2 times per week only.

By: caspy (caspy) 2009-07-27 01:09:30

I don't know too how to reproduce this. Only waiting for.

By: Leif Madsen (lmadsen) 2009-08-05 12:16:26

Ya, I don't think I have the right amount of callers/load to reproduce this issue either.

There is a patch attached to this issue though. Can you test it? Looks like it just adds a channel lock around some functionality, which I presume is to keep Asterisk from freeing memory that shouldn't be freed.

Please let me know once you're testing the patch. If you don't get any crashes for a week, then we can presume it to have solved the issue.

Thanks!

By: caspy (caspy) 2009-08-05 13:04:30

> Please let me know once you're testing the patch. If you don't get any crashes for a week, then we can presume it to have solved the issue.

Oops, sorry. Due to my holidays, i forgot to report a results.
As i said early, patch was installed on Jul 14. There is no more crashes since it was installed. So, we can consider this patch working.

Thanks!

By: Digium Subversion (svnbot) 2009-08-06 16:45:20

Repository: asterisk
Revision: 210913

U   branches/1.4/main/channel.c

------------------------------------------------------------------------
r210913 | tilghman | 2009-08-06 16:45:20 -0500 (Thu, 06 Aug 2009) | 7 lines

Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
(closes issue ASTERISK-14375)
Reported by: caspy
Patches:
      20090714__issue15397.diff.txt uploaded by tilghman (license 14)
Tested by: caspy

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

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

By: Digium Subversion (svnbot) 2009-08-06 16:46:19

Repository: asterisk
Revision: 210914

_U  trunk/
U   trunk/main/channel.c

------------------------------------------------------------------------
r210914 | tilghman | 2009-08-06 16:46:19 -0500 (Thu, 06 Aug 2009) | 14 lines

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

........
 r210913 | tilghman | 2009-08-06 16:45:01 -0500 (Thu, 06 Aug 2009) | 7 lines
 
 Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
 (closes issue ASTERISK-14375)
  Reported by: caspy
  Patches:
        20090714__issue15397.diff.txt uploaded by tilghman (license 14)
  Tested by: caspy
........

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

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

By: Digium Subversion (svnbot) 2009-08-06 16:47:00

Repository: asterisk
Revision: 210915

_U  branches/1.6.0/
U   branches/1.6.0/main/channel.c

------------------------------------------------------------------------
r210915 | tilghman | 2009-08-06 16:46:59 -0500 (Thu, 06 Aug 2009) | 21 lines

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

................
 r210914 | tilghman | 2009-08-06 16:46:01 -0500 (Thu, 06 Aug 2009) | 14 lines
 
 Merged revisions 210913 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r210913 | tilghman | 2009-08-06 16:45:01 -0500 (Thu, 06 Aug 2009) | 7 lines
   
   Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
   (closes issue ASTERISK-14375)
    Reported by: caspy
    Patches:
          20090714__issue15397.diff.txt uploaded by tilghman (license 14)
    Tested by: caspy
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-08-06 16:47:36

Repository: asterisk
Revision: 210916

_U  branches/1.6.1/
U   branches/1.6.1/main/channel.c

------------------------------------------------------------------------
r210916 | tilghman | 2009-08-06 16:47:36 -0500 (Thu, 06 Aug 2009) | 21 lines

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

................
 r210914 | tilghman | 2009-08-06 16:46:01 -0500 (Thu, 06 Aug 2009) | 14 lines
 
 Merged revisions 210913 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r210913 | tilghman | 2009-08-06 16:45:01 -0500 (Thu, 06 Aug 2009) | 7 lines
   
   Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
   (closes issue ASTERISK-14375)
    Reported by: caspy
    Patches:
          20090714__issue15397.diff.txt uploaded by tilghman (license 14)
    Tested by: caspy
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-08-06 16:48:14

Repository: asterisk
Revision: 210917

_U  branches/1.6.2/
U   branches/1.6.2/main/channel.c

------------------------------------------------------------------------
r210917 | tilghman | 2009-08-06 16:48:14 -0500 (Thu, 06 Aug 2009) | 21 lines

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

................
 r210914 | tilghman | 2009-08-06 16:46:01 -0500 (Thu, 06 Aug 2009) | 14 lines
 
 Merged revisions 210913 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r210913 | tilghman | 2009-08-06 16:45:01 -0500 (Thu, 06 Aug 2009) | 7 lines
   
   Because channel information can be accessed outside of the channel thread, we must lock the channel prior to modifying it.
   (closes issue ASTERISK-14375)
    Reported by: caspy
    Patches:
          20090714__issue15397.diff.txt uploaded by tilghman (license 14)
    Tested by: caspy
 ........
................

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

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