Num98801 / imsdroid

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

intermittent socket failures #166

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. w/ latest IMSDroid code, I toggle registration off & on
2. intermittently I get socket errors, see debug trace below

What is the expected output? 

No socket errors

What do you see instead?

Just toggling registration, no changes in cellular or WLAN data coverage (WiFi, 
3G or HSPA+). The problem can occur both on WiFi or cellular data. Then 
inexplicably register/deregister will start working again.

What version of the product are you using? On what operating system?

Latest version IMSDroid, latest version of Doubango compiled with NEON=yes (I 
am using my own build of Doubango stack, will go back and try the public 
version checked into SVN)

Please provide any additional information below.

Here are 2 traces, I am happy to provide my tinyWrap.so build, if that would 
help isolate. It seems like the network connectivity state is related.

01-25 12:01:18.676: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_get_ip_n_port()" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): file: "src/tnet_utils.c" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): line: "920" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): MSG: TNET_GET_SOCKADDR has failed 
with status code: -1
01-25 12:01:18.676: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_transport_sendto()" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): file: "src/tnet_transport_poll.c" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): line: "241" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): MSG: sendto have failed.
01-25 12:01:18.676: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_transport_sendto()" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): file: "src/tnet_transport_poll.c" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): line: "241" 
01-25 12:01:18.676: ERROR/tinyWRAP(5327): MSG: (SYSTEM)NETWORK ERROR ==>Socket 
operation on non-socket
01-25 12:01:18.725: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_get_ip_n_port()" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): file: "src/tnet_utils.c" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): line: "920" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): MSG: TNET_GET_SOCKADDR has failed 
with status code: -1
01-25 12:01:18.725: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_transport_sendto()" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): file: "src/tnet_transport_poll.c" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): line: "241" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): MSG: sendto have failed.
01-25 12:01:18.725: ERROR/tinyWRAP(5327): ***ERROR: function: 
"tnet_transport_sendto()" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): file: "src/tnet_transport_poll.c" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): line: "241" 
01-25 12:01:18.725: ERROR/tinyWRAP(5327): MSG: (SYSTEM)NETWORK ERROR ==>Socket 
operation on non-socket

I did add some more trace to get the value of socket file descriptor. Here is 
what the trace outputs now:

02-04 02:09:01.478: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_get_ip_n_port()" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): file: "src/tnet_utils.c" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): line: "924" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): MSG: TNET_GET_SOCKADDR has failed 
with status code: -1, fd = 45
02-04 02:09:01.478: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_transport_sendto()" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): file: "src/tnet_transport_poll.c" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): line: "241" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): MSG: sendto have failed.
02-04 02:09:01.478: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_transport_sendto()" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): file: "src/tnet_transport_poll.c" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): line: "241" 
02-04 02:09:01.478: ERROR/tinyWRAP(3084): MSG: (SYSTEM)NETWORK ERROR ==>Bad 
file number
02-04 02:09:01.521: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_get_ip_n_port()" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): file: "src/tnet_utils.c" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): line: "924" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): MSG: TNET_GET_SOCKADDR has failed 
with status code: -1, fd = 45
02-04 02:09:01.521: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_transport_sendto()" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): file: "src/tnet_transport_poll.c" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): line: "241" 
02-04 02:09:01.521: ERROR/tinyWRAP(3084): MSG: sendto have failed.
02-04 02:09:01.523: ERROR/tinyWRAP(3084): ***ERROR: function: 
"tnet_transport_sendto()" 
02-04 02:09:01.523: ERROR/tinyWRAP(3084): file: "src/tnet_transport_poll.c" 
02-04 02:09:01.523: ERROR/tinyWRAP(3084): line: "241" 
02-04 02:09:01.523: ERROR/tinyWRAP(3084): MSG: (SYSTEM)NETWORK ERROR ==>Bad 
file number

Original issue reported on code.google.com by rich.ho...@gmail.com on 4 Feb 2011 at 7:27

GoogleCodeExporter commented 9 years ago
I should point out a couple other testing scenarios I tried prior to reporting:

1. I tested on Samsung Galaxy S (GT-I9000T) running Eclair 2.1 update 1, occurs 
equally on WiFi and 3G

2. I tested on MyTouch 4G (HTC Glacier) running Froyo 2.2, occurs less 
frequently on 3G and difficult to reproduce borken sockets on WiFi

Original comment by rich.ho...@gmail.com on 4 Feb 2011 at 7:35