Summary:ASTERISK-09406: asterisk 1.2 from svn ... lock on shutdown
Reporter:Cesc Santasusana (cescsanta)Labels:
Date Opened:2007-05-08 17:03:27Date Closed:2007-08-06 11:47:34
Versions:Frequency of
Description:This is a copy of Issue 0009686, which I uncorrectly assigned to chan_agent

I have downloaded (yesterday) the 1.2 branch from svn ...
When running: asterisk -vvvvc
loaded modules:

load => pbx_functions.so
load => pbx_config.so
load => codec_a_mu.so
load => format_pcm_alaw.so
load => codec_ulaw.so
load => codec_alaw.so
load => format_pcm.so
load => func_uri.so
      ;required by app_dial and chan_sip
load => res_features.so
load => app_dial.so

      ;playback and echo apps ...
load => app_playback.so
load => app_echo.so
load => codec_gsm.so
load => format_gsm.so
load => format_wav_gsm.so

load => chan_h323.so
load => chan_sip.so

load => chan_local.so

When I do: > stop now
asterisk hangs up, but locks:
*CLI> stop now
Beginning asterisk shutdown....
Executing last minute cleanups
Asterisk cleanly ending (0).

I attached gdb to the locked process:

0xb725af28 in std::_Rb_tree_increment () from /usr/lib/libstdc++.so.6
(gdb) bt
#0 0xb725af28 in std::_Rb_tree_increment () from /usr/lib/libstdc++.so.6
#1 0xb793f304 in std::_Rb_tree_iterator<std::pair<PString const,
PFactory<OpalMediaFormat, PString>::WorkerBase*> >::operator++ ()
 from /usr/lib/libh323_linux_x86_r.so.1.17.3
#2 0xb79881a0 in
std::__distance<std::_Rb_tree_iterator<std::pair<PString const,
PFactory<OpalMediaFormat, PString>::WorkerBase*> > > ()
 from /usr/lib/libh323_linux_x86_r.so.1.17.3
#3 0xb79881cb in
std::distance<std::_Rb_tree_iterator<std::pair<PString const,
PFactory<OpalMediaFormat, PString>::WorkerBase*> > > ()
 from /usr/lib/libh323_linux_x86_r.so.1.17.3
#4 0xb7989ee6 in std::_Rb_tree<PString, std::pair<PString const,
PFactory<OpalMediaFormat, PString>::WorkerBase*>,
std::_Select1st<std::pair<PString const, PFactory<OpalMediaFormat,
PString>::WorkerBase*> >, std::less<PString>,
std::allocator<std::pair<PString const, PFactory<OpalMediaFormat,
PString>::WorkerBase*> > >::erase () from
ASTERISK-1 0xb7989f20 in std::map<PString, PFactory<OpalMediaFormat,
PString>::WorkerBase*, std::less<PString>,
std::allocator<std::pair<PString const, PFactory<OpalMediaFormat,
PString>::WorkerBase*> > >::erase () from
ASTERISK-2 0xb7989f5a in PFactory<OpalMediaFormat,
PString>::Unregister_Internal () from
ASTERISK-3 0xb7989f9d in PFactory<OpalMediaFormat, PString>::Unregister ()
from /usr/lib/libh323_linux_x86_r.so.1.17.3
ASTERISK-4 0xb7989fc9 in OpalPluginMediaFormat::~OpalPluginMediaFormat ()
from /usr/lib/libh323_linux_x86_r.so.1.17.3
ASTERISK-5 0xb748bea1 in PAbstractList::RemoveAt () from
ASTERISK-6 0xb74892e1 in PCollection::RemoveAll () from
ASTERISK-7 0xb7489e25 in PAbstractList::DestroyContents () from
ASTERISK-8 0xb7490152 in PContainer::Destruct () from
ASTERISK-9 0xb791ca57 in PAbstractList::~PAbstractList () from
ASTERISK-10 0xb79755c9 in PList<OpalMediaFormat>::~PList () from
ASTERISK-11 0xb79828e7 in H323PluginCodecManager::~H323PluginCodecManager ()
from /usr/lib/libh323_linux_x86_r.so.1.17.3
ASTERISK-12 0xb7e0d4f0 in exit () from /lib/tls/libc.so.6
ASTERISK-13 0x080bddd7 in quit_handler (num=135324439, nice=3, safeshutdown=1,
restart=0) at asterisk.c:945
ASTERISK-14 0x080be019 in handle_shutdown_now (fd=1, argc=2, argv=0xbffff830)
at asterisk.c:1104
ASTERISK-15 0x0809811b in ast_cli_command (fd=1, s=0x8151900 "\001") at cli.c:1364
ASTERISK-16 0x080c0d93 in main (argc=2, argv=0xbffffd84) at asterisk.c:1019


Comments:By: Paul Cadach (pcadach) 2007-05-09 12:08:55

Move to Asterisk 1.4 with heavily updated chan_h323, and everything should be much better. There are huge changes from 1.2, so we cannot backport them from 1.4.

By: Cesc Santasusana (cescsanta) 2007-05-09 14:40:29

Well, for many reasons I am not allowed to jump to 1.4.
And as previous versions of 1.2 seem to work fine when hanging up, the bug could be traced and solved. 1.2 is still being released ... or am I wrong?
Anyway, you guys decide ...

By the way, I am not trying to port anything from 1.4 to 1.2 .. somethings have been improved in the latest version of 1.2 and I want to use them, but a bug has been introduced. If you wannt leave it there ... fine.

By: Joshua C. Colp (jcolp) 2007-08-06 11:47:34

1.2 is now in a security fixes only state, thus this bug will not be fixed there.