dongjw777 / idoubs

Automatically exported from code.google.com/p/idoubs
0 stars 0 forks source link

set transport=tcp in ios 8 deadlock #182

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. in ios 8 set transport to tcp
2. start sip service
3. deadlock

What is the expected output? What do you see instead?

app expected to connect via tcp, instead stack stops and locks thread

What version of the product or source code revision are you using? On what
operating system?

ios 8

in ios < 8 everything is ok

Please provide any additional information below.

2014-09-18 16:00:09.256 openhc[399:27799] NgnSipService///: Start()
2014-09-18 16:00:09.256 openhc[399:27799] NgnSipService///: Recycling the stack
*INFO: Stack already stopped
2014-09-18 16:00:09.257 openhc[399:27799] NgnSipService///: 
realm='10.20.30.81', impu='sip:802@10.20.30.81', impi='802'
*INFO: Calling 'tnet_dns_resolvconf_parse()' to load DNS servers
*INFO: Failed to open [/etc/resolv.conf]. But don't panic, we have detected 
that you are using Google Android/iOS Systems.
You should look at the Progammer's Guide for more information.
 If you are not using DNS functions, don't worry about this warning.
2014-09-18 16:00:09.261 openhc[399:27799] NgnSipService///: STUN=no
2014-09-18 16:00:09.262 openhc[399:27799] NgnSipService///: 
pcscf-host='10.20.30.81', pcscf-port='5060', transport='tcp', ipversion='ipv4'
2014-09-18 16:00:09.262 openhc[399:27799] NgnSipService///: srtpMode=0, 
srtpType=0
*INFO: Stack running in CLIENT mode
*INFO: tsk_timer_manager_start
*INFO: Timer manager run()::enter
*INFO: TIMER MANAGER -- START
*INFO: Proxy-CSCF=[10.20.30.81]:5060
*INFO: SIP STACK::run -- START
*INFO: Socket added
*INFO: Transport::run() - enter
*INFO: Starting [SIP transport] server with IP {172.20.3.56} on port {49848}...
**WARN: function: "tnet_sockfd_connectto()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1701" 
MSG: 
TNET_ERROR_WOULDBLOCK/TNET_ERROR_ISCONN/TNET_ERROR_INPROGRESS/TNET_ERROR_EAGAIN 
 ==> use tnet_sockfd_waitUntilWritable.
*INFO: __CFReadStreamClientCallBack --> Error=9, fd=14
*INFO: Socket added
*INFO: Socket removed
*INFO: Stream Peer closed - 14
*INFO: __CFReadStreamClientCallBack --> Error=9, fd=18
*INFO: CloseSocket(18)
*INFO: Socket removed
*INFO: SIP transport fd=18
*INFO: #1 peers in the 'SIP transport' transport
*INFO: Stream Peer closed - 18
*INFO: SIP socket closed
*INFO: #0 peers in the 'SIP transport' transport
*INFO: *** Stream Peer destroyed ***
*INFO: 1000 milliseconds elapsed and the socket is still not connected.
*INFO: SIP STACK -- START
2014-09-18 16:00:09.336 openhc[399:27923] NgnSipService///: Stack stopped
2014-09-18 16:00:09.338 openhc[399:27923] NgnSipService///: Stack started
2014-09-18 16:00:10.365 openhc[399:27799] NgnSipService///: register()
*INFO: State machine: tsip_dialog_register_Started_2_InProgress_X_oRegister
*INFO: State machine: tsip_transac_nict_Started_2_Trying_X_send
***ERROR: function: "tnet_get_ip_n_port()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1146" 
MSG: TNET_GET_SOCKADDR has failed with status code: -1
***ERROR: function: "tnet_get_ip_n_port()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1146" 
MSG: (SYSTEM)NETWORK ERROR ==>Bad file descriptor
***ERROR: function: "tsip_transport_msg_update_aor()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
ySIP/src/transports/tsip_transport.c" 
line: "241" 
MSG: Failed to get public IP
***ERROR: function: "tnet_get_ip_n_port()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1146" 
MSG: TNET_GET_SOCKADDR has failed with status code: -1
***ERROR: function: "tnet_get_ip_n_port()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1146" 
MSG: (SYSTEM)NETWORK ERROR ==>Bad file descriptor
*INFO: 

SEND: REGISTER sip:10.20.30.81 SIP/2.0

From: <sip:802@10.20.30.81>;tag=367629255

To: <sip:802@10.20.30.81>

Contact: 
<sip:802@127.0.0.1:5060>;expires=3200;+g.oma.sip-im;language="en,fr";+g.3gpp.sms
ip;+g.oma.sip-im.large-message;audio;+g.3gpp.icsi-ref="urn%3Aurn-7%3A3gpp-applic
ation.ims.iari.gsma-vs";+g.3gpp.cs-voice

Call-ID: e57166b6-4232-b98a-1123-38c989562761

CSeq: 105050364 REGISTER

Content-Length: 0

Max-Forwards: 70

Allow: INVITE, ACK, CANCEL, BYE, MESSAGE, OPTIONS, NOTIFY, PRACK, UPDATE, REFER

Privacy: none

P-Access-Network-Info: ADSL;utran-cell-id-3gpp=00000000

User-Agent: IM-client/OMA1.0 ios-ngn-stack/v00 (doubango r000)

P-Preferred-Identity: <sip:802@10.20.30.81>

Supported: path

*INFO: Cannot find peer with remote IP/Port=10.20.30.81/5060, connecting to the 
destination...
**WARN: function: "tnet_sockfd_connectto()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
yNET/src/tnet_utils.c" 
line: "1701" 
MSG: 
TNET_ERROR_WOULDBLOCK/TNET_ERROR_ISCONN/TNET_ERROR_INPROGRESS/TNET_ERROR_EAGAIN 
 ==> use tnet_sockfd_waitUntilWritable.
*INFO: OnDialogEvent(Dialog connecting, 3)
*INFO: Socket added
*INFO: #1 peers in the 'SIP transport' transport
*INFO: Add call-id = 'e57166b6-4232-b98a-1123-38c989562761' to peer with local 
fd = 18
*INFO: Data send requested but peer not connected yet...saving data
*INFO: OnDialogEvent((un)REGISTER request successfully sent., 3)
*INFO: __CFReadStreamClientCallBack --> Error=9, fd=18
*INFO: Stream Peer closed - 18
*INFO: SIP socket closed
*INFO: State machine: tsip_dialog_register_Any_2_Terminated_X_transportError
*INFO: === REGISTER Dialog terminated ===
*INFO: #0 peers in the 'SIP transport' transport
**WARN: function: "tsip_dialog_layer_signal_peer_disconnected()" 
file: 
"/Users/aterite/Documents/projects/iOS/sipios/doubango/branches/2.0/doubango/tin
ySIP/src/dialogs/tsip_dialog_layer.c" 
line: "354" 
MSG: Stream peer holds call-id='e57166b6-4232-b98a-1123-38c989562761' but the 
dialog layer doesn't know it
*INFO: *** Stream Peer destroyed ***
*INFO: OnDialogEvent(Transport error., 3)
*INFO: OnDialogEvent(Dialog terminated, 3)
2014-09-18 16:00:10.377 openhc[399:27923] NgnSipService///: Stack stopped
*INFO: CloseSocket(18)
*INFO: Socket removed

Original issue reported on code.google.com by arma...@gmail.com on 18 Sep 2014 at 10:04

GoogleCodeExporter commented 9 years ago
Is there a solution for this as yet????

UDP works great but not TCP. Please advise.

Original comment by strictly...@gmail.com on 24 Sep 2014 at 1:55

GoogleCodeExporter commented 9 years ago
Try attached patch

Original comment by boss...@yahoo.fr on 26 Sep 2014 at 7:13

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
fixed

Original comment by arma...@gmail.com on 26 Sep 2014 at 9:32

GoogleCodeExporter commented 9 years ago
Fixed & greatly appreciated... 

Original comment by strictly...@gmail.com on 26 Sep 2014 at 2:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Patch not working for iOS8.1.
Which iOS 8 version is supported by patch as iOS 8.0.2 and iOS 8.1 versions are 
released after patch is published?
Does it support all versions?
Anybody else facing same problems as me, please help.

Original comment by nitishku...@gmail.com on 1 Nov 2014 at 10:09

GoogleCodeExporter commented 9 years ago
Issue 187 has been merged into this issue.

Original comment by boss...@yahoo.fr on 6 Nov 2014 at 2:37

GoogleCodeExporter commented 9 years ago
Tested on iOS 8.1 (12B411)

Original comment by boss...@yahoo.fr on 6 Nov 2014 at 2:51