[ previous ] [ next ] [ threads ]
 To :  yate@v...
 From :  Maciek Kaminski <maciejka@t...>
 Subject :  Segmentation Fault when yate stopped, when client is connected toextmodule
 Date :  Tue, 21 Jun 2005 23:35:33 +0200
Aparently there is a bug in channel disconnection. Yate makes 
segmentation fault when stoped during connection with extmodule. See 
logs and stacktrace below:
Log
----------------------------------------------------------------------------------------
Message Sniffer  ALL 'engine.halt' time=1119389366513055 thread=(nil) 
data=(nil) retval='(null)'
 >>> ThreadPrivate::killall()
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 1
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 2
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 3
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 4
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 5
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Connection' [0x80507e0], attempt 6
RemoteModule     ALL PipeConnection::~PipeConnection() [0x8050750]
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 1
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 2
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 3
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 4
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 5
Yate Engine     INFO Trying to kill ThreadPrivate 'RemoteModule 
Listener' [0x8050ad8], attempt 6
YateEngine       ALL WaveSource [0x80555c8] end of data [0x8053630] [(null)]
YateEngine       ALL WaveSource [0x80555c8] cleanup, total=1089
Yate Engine     INFO Trying to kill ThreadPrivate 'IAX EndPoint' 
[0x8051a70], attempt 1
Yate Engine     INFO Trying to kill ThreadPrivate 'IAX EndPoint' 
[0x8051a70], attempt 2
YateEngine       ALL IAXEndPoint::~IAXEndPoint() [0x8051e98]
Yate Engine     INFO Trying to kill ThreadPrivate 'EnginePrivate' 
[0x80522b8], attempt 1
Yate Engine     INFO Trying to kill ThreadPrivate 'EnginePrivate' 
[0x80522b8], attempt 2
Yate Engine     INFO Trying to kill ThreadPrivate 'EnginePrivate' 
[0x80522b8], attempt 3
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 1
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 2
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 3
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 4
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 5
Yate Engine     INFO Trying to kill ThreadPrivate 'ExtModule' 
[0x8059670], attempt 6
Yate Engine     WARN Process 23213 has not exited on closing stdin - 
we'll kill it
Yate Engine     WARN Process 23213 has still not exited yet?
<<< ThreadPrivate::killall()
 >>> Plugin::~Plugin() [0xb7fe8bfc]
<<< Plugin::~Plugin()
 >>> Plugin::~Plugin() [0xb7fe2924]
<<< Plugin::~Plugin()
Unloading module ToneGen
 >>> Plugin::~Plugin() [0xb7d62580]
<<< Plugin::~Plugin()
 >>> Plugin::~Plugin() [0xb7d5b580]
<<< Plugin::~Plugin()
Unloading module MOH
 >>> Plugin::~Plugin() [0xb7d51588]
<<< Plugin::~Plugin()
Unloading module ExtModule
Yate Engine      ALL ExtModReceiver::~ExtModReceiver() [0x80595b0] pid=0
Yate Engine      ALL ExtModReceiver::die() pid=0 dead=no [0x80595b0]
Yate Engine     INFO CallEndpoint 'ExtModule' disconnecting peer 
0x8053500 from [0x8053630]
Yate Engine      ALL Endpoint at 0x8059568 type 'audio' peer 0x8059a48
Yate Engine     INFO DataEndpoint 'audio' disconnecting peer 0x8059a48 
from [0x8059568]
 >>> DataTranslator::detachChain(0x80555c8,0x8059a80)
Yate Engine     INFO DataSource [0x80555c8] detaching consumer [0x8059a80]
<<< DataTranslator::detachChain
YateEngine       ALL IAXConnection::disconnected() '(null)'
 >>> IAXConnection::~IAXConnection() [0x8053500]
YateEngine       ALL IAXAudioConsumer::~IAXAudioConsumer() [0x8059a80] 
total=1815
Yate Engine     INFO IAXAudioConsumer rate=339 b/s
YateEngine       ALL IAXSource::~IAXSource() [0x80599d0] total=8811
Yate Engine     INFO IAXSource rate=1646 b/s
YateEngine       ALL IAXConnection::hangup('(null)') [0x8053500]
<<< IAXConnection::~IAXConnection()
 >>> Channel::~Channel() 'iax/2' [0x8053500]
<<< Channel::~Channel()
Yate Engine      ALL Endpoint at 0x8059a48 type 'audio' refcount=1
Yate Engine     INFO DataEndpoint::~DataEndpoint() 'audio' 
call=0x8053500 [0x8059a48]
 >>> ExtModChan::disconnected() '(null)' [0x8053630]
<<< ExtModChan::disconnected()
 >>> ExtModChan::~ExtModChan() [0x8053630]
Segmentation fault (core dumped)
maciejka@maciejka:~/projekty/9/yate$        

Backtrace:
----------------------------------------------------------------------------------------
#0  0xb7f8daea in TelEngine::RefObject::deref (this=0x80555c8) at 
TelEngine.cpp:448
448             delete this;
(gdb) bt
#0  0xb7f8daea in TelEngine::RefObject::deref (this=0x80555c8) at 
TelEngine.cpp:448
#1  0xb7f9dc8b in TelEngine::DataEndpoint::setSource (this=0x8059568, 
source=0x0) at DataFormat.cpp:374
#2  0xb7fa070a in TelEngine::CallEndpoint::setSource (this=0x8053630, 
source=0x0, type=0xb7d49652 "audio")
    at Channel.cpp:140
#3  0xb7d45fb9 in ~ExtModChan (this=0x8053630) at extmodule.cpp:302
#4  0xb7f8daed in TelEngine::RefObject::deref (this=0x8053630) at 
TelEngine.cpp:448
#5  0xb7fa0513 in TelEngine::CallEndpoint::disconnect (this=0x8053630, 
final=false, reason=0x0) at Channel.cpp:103
#6  0xb7d46c83 in ExtModReceiver::die (this=0x80595b0, clearChan=true) 
at yatephone.h:816
#7  0xb7d46960 in ~ExtModReceiver (this=0x80595b0) at extmodule.cpp:380
#8  0xb7f8e3f5 in TelEngine::GenObject::destruct (this=0x0) at 
yateclass.h:488
#9  0xb7f8e2e8 in TelEngine::ObjList::remove (this=0xb7fc9d94, 
delobj=true) at ObjList.cpp:208
#10 0xb7f8e3d0 in TelEngine::ObjList::clear (this=0xb7d4a774) at 
ObjList.cpp:226
#11 0xb7d48ab4 in ~ExtModulePlugin (this=0xb7d4a788) at extmodule.cpp:878
#12 0xb7d48ff2 in __tcf_4 () at extmodule.cpp:912
#13 0xb7d91b2e in __cxa_finalize () from /lib/tls/i686/cmov/libc.so.6
#14 0xb7d44fc0 in __do_global_dtors_aux () from ./modules/extmodule.yate
#15 0xb7d49639 in _fini () from ./modules/extmodule.yate
#16 0xb7e68d81 in _dl_close () from /lib/tls/i686/cmov/libc.so.6
#17 0x00006590 in ?? ()
#18 0x00000006 in ?? ()
#19 0xb7fd05e0 in pthread_mutex_lock () from 
/lib/tls/i686/cmov/libpthread.so.0
Previous frame inner to this frame (corrupt stack?)
(gdb)