Bug#342555: Hang on connecting

Koos Vriezen k.vriezen at vgelder.com
Thu Dec 8 15:17:20 UTC 2005


Package: kphone
Version: 4.2-3

Using an asterisk server and kphone as client, kphone hangs when
connecting to another SIP client on the same internal network. This only
seem to happen when having extensions written like:
  exten => 110,1, Dial(SIP/kv,30)
in asterisk's extensions.conf and not when written as
  exten => 110,1, Dial(SIP/kv,30,t)

I've tracked down the bug in kphone and kphone opens the input twice
and then hangs in QThread::Start() in pthread_cond_wait (done when this
method is called while already running)

#0  CallAudio::audioIn (this=0x824cf28) at callaudio.cpp:199
#1  0x08092c17 in CallAudio::memberStatusUpdated (this=0x824cf28,
    member=0x828a968) at callaudio.cpp:663
#2  0x08093739 in CallAudio::qt_invoke (this=0x824cf28, _id=2, _o=0xbfd127dc)
    at callaudio.moc.cpp:103
#3  0xb78271f9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#4  0x080ca60a in SipCallMember::statusUpdated (this=0x828a968, t0=0x828a968)
    at sipcall.moc.cpp:103
#5  0x080c22d0 in SipCallMember::acceptInvite (this=0x828a968,
    body=@0xbfd128c8, bodytype=@0xbfd128b8) at sipcall.cpp:572
#6  0x08092a7c in CallAudio::memberStatusUpdated (this=0x824cf28,
    member=0x828a968) at callaudio.cpp:655
#7  0x08093739 in CallAudio::qt_invoke (this=0x824cf28, _id=2, _o=0xbfd1297c)
    at callaudio.moc.cpp:103
#8  0xb78271f9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0x080ca60a in SipCallMember::statusUpdated (this=0x828a968, t0=0x828a968)
    at sipcall.moc.cpp:103
#10 0x080c2d3f in SipCallMember::incomingTransaction (this=0x828a968,
    newtrans=0x82e36b8) at sipcall.cpp:663
#11 0x080c849c in SipCall::incomingRequest (this=0x8240670, message=0x82d8180)
    at sipcall.cpp:994
#12 0x080c8b75 in SipCall::incomingMessage (this=0x8240670, message=0x82d8180)
    at sipcall.cpp:862
#13 0x080d3884 in SipClient::parseMessage (this=0x821c8b0,
    fullmessage=@0xbfd151e0) at sipclient.cpp:653
#14 0x080d5ba4 in SipClient::incomingMessage (this=0x821c8b0, socketfd=8)
    at sipclient.cpp:484
#15 0x080d5d83 in SipClient::doSelect (this=0x821c8b0, block=false)
    at sipclient.cpp:283
#16 0x0805a476 in KPhone::timerTick (this=0x820f0d8) at kphone.cpp:145
#17 0x08061364 in KPhone::qt_invoke (this=0x820f0d8, _id=64, _o=0xbfd153d8)
    at kphone.moc.cpp:122

#0  CallAudio::audioIn (this=0x824cf28) at callaudio.cpp:199
#1  0x08092c17 in CallAudio::memberStatusUpdated (this=0x824cf28,
    member=0x828a968) at callaudio.cpp:663
#2  0x08093739 in CallAudio::qt_invoke (this=0x824cf28, _id=2, _o=0xbfd1297c)
    at callaudio.moc.cpp:103
#3  0xb78271f9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#4  0x080ca60a in SipCallMember::statusUpdated (this=0x828a968, t0=0x828a968)
    at sipcall.moc.cpp:103
#5  0x080c2d3f in SipCallMember::incomingTransaction (this=0x828a968,
    newtrans=0x82e36b8) at sipcall.cpp:663
#6  0x080c849c in SipCall::incomingRequest (this=0x8240670, message=0x82d8180)
    at sipcall.cpp:994
#7  0x080c8b75 in SipCall::incomingMessage (this=0x8240670, message=0x82d8180)
    at sipcall.cpp:862
#8  0x080d3884 in SipClient::parseMessage (this=0x821c8b0,
    fullmessage=@0xbfd151e0) at sipclient.cpp:653
#9  0x080d5ba4 in SipClient::incomingMessage (this=0x821c8b0, socketfd=8)
    at sipclient.cpp:484
#10 0x080d5d83 in SipClient::doSelect (this=0x821c8b0, block=false)
    at sipclient.cpp:283
#11 0x0805a476 in KPhone::timerTick (this=0x820f0d8) at kphone.cpp:145
#12 0x08061364 in KPhone::qt_invoke (this=0x820f0d8, _id=64, _o=0xbfd153d8)
    at kphone.moc.cpp:122

This patch fixes it for me (and I believe it's either right or there is 
a memory leak in kphone :-)

--- kphone/callaudio.cpp-old    2005-12-08 16:11:02.000000000 +0100
+++ kphone/callaudio.cpp        2005-12-08 16:11:09.000000000 +0100
@@ -635,9 +635,12 @@
                        if( !sdpm.isOnHold() ) {
                                if( output ) {
                                        output->setCodec( getRtpCodec(), getRtpCodecNum() );
-                                       audioIn();
-                                       output->start();
-                                       input->start();
+                                       if (!input)
+                                           audioIn();
+                                       if (!input->running ()) {
+                                           output->start();
+                                           input->start();
+                                       }
                                } else if( jack_audioout ) {

 //                                     jack_audioout->setCodec( getRtpCodec(), getRtpCodecNum() );


Thanks,

Koos Vriezen

***************DISCLAIMER***************
Bewijs van Afstand:
Dit emailbericht is slechts bestemd voor de personen aan wie het is gericht
en kan informatie bevatten die persoonlijk of vertrouwelijk is en niet
openbaar mag worden gemaakt zonder goedkeuring van de auteur.
Indien u dit bericht per vergissing heeft ontvangen, verzoeken wij u ons op
de hoogte te stellen en het bericht te vernietigen zonder het te kopiëren of
te distribueren.
Ons bedrijf staat niet in voor juiste en volledige overbrenging van de inhoud
van een verzonden bericht, noch voor de tijdige ontvangst daarvan.
Disclaimer:
This E-mail is for use of the intended recipient(s) only and can contain
information that is personal or confidential. It is prohibited to distribute
the content of this message without the author's prior permission.
If you have received it in error, please notify the sender and immediately
delete this message without distributing or retaining copies hereof.
Our company is not responsible for the comprehensiveness of this message nor
it's time of delivery.
*********************************************




More information about the Pkg-voip-maintainers mailing list