We have a web server that serves mobile clients, among them G1 running
Android. There's a communication
problem at the TCP level.

Using tcpdump I've been able to capture the traffic between Android
and the web server (actually
haproxy load balancer). Then loading it into Wireshark for analysis.

Looks like a client doesn't see a server's ACK, and the server doesn't
see a client's ACK.

This problem is not just for one client, but happens for many (Wifi
connection or not). We have other
mobile phones connecting, such as the iPhone, and the problem doesn't
happen there.

Any ideas what's going on here?

Example #1 -- client submits an HTTP GET request. server ACK's it, and
sends an HTTP reply with status 200.
client doesn't see the ACK, and resubmits the request, which the
server ACKs again. client never ACKs the
server, instead resubmits its request. since client never ACKs, the
server resubmits, which the client never
ACKs either.


"client" -- substituted for the client's IP address
"server" -- substituted for the server's IP address

TCP packet capture:

No.     Time        Source  Desti   Proto   Info
13991    137.948540  client  server  TCP    28272 > http [SYN] Seq=0
Win=5840 Len=0 MSS=1460 WS=2
13992    137.948560  server  client  TCP    http > 28272 [SYN, ACK]
Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 WS=7
13993    137.965352  client  server  TCP    28272 > http [ACK] Seq=1
Ack=1 Win=5840 Len=0
13994    137.965604  client  server  HTTP   GET /... HTTP/1.0 Seq=1
Len=408
13995    137.965612  server  client  TCP    http > 28272 [ACK] Seq=1
Ack=409 Win=6912 Len=0
14008    137.973216  server  client  HTTP   HTTP/1.1 200 OK  (text/
html)
14617    140.965638  client  server  HTTP   [TCP Retransmission]
GET /... HTTP/1.0 Seq=1 Len=408
14618    140.965647  server  client  TCP    [TCP Dup ACK 14008#1] http
> 28272 [ACK] Seq=2921 Ack=409 Win=6912 Len=0 SLE=1 SRE=409
14619    140.969611  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK  (text/html)
15317    146.964751  client  server  HTTP   [TCP Retransmission]
GET /... HTTP/1.0
15318    146.964764  server  client  TCP    [TCP Dup ACK 14619#1] http
> 28272 [ACK] Seq=2921 Ack=409 Win=6912 Len=0 SLE=1 SRE=409
15319    146.969953  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK  (text/html)
16943    158.964572  client  server  HTTP   [TCP Retransmission]
GET /... HTTP/1.0
16944    158.964609  server  client  TCP    [TCP Dup ACK 15319#1] http
> 28272 [ACK] Seq=2921 Ack=409 Win=6912 Len=0 SLE=1 SRE=409
16945    158.970635  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK  (text/html)
20280    182.965032  client  server  HTTP   [TCP Retransmission]
GET /... HTTP/1.0
20281    182.965075  server  client  TCP    [TCP Dup ACK 16945#1] http
> 28272 [ACK] Seq=2921 Ack=409 Win=6912 Len=0 SLE=1 SRE=409
20282    182.972008  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK  (text/html)

Although the server keeps ack'ing the clients packets, the client
keeps resubmitting.

Example #2 -- client sends an HTTP POST request. Server processes it,
and returns status code 200. Client never ack's, and server
will resubmit a few times before giving up. Funny: Both client and
server resubmit packets in the same time frame. Neither sees
the other's ACK.

TCP packet capture:

No.     Time         Source  Dest    Proto  Info
10782    105.461218  client  server  TCP    27549 > http [SYN] Seq=0
Win=5840 Len=0 MSS=1460 WS=2
10783    105.461281  server  client  TCP    http > 27549 [SYN, ACK]
Seq=0 Ack=1 Win=5840 Len=0 MSS=1460 WS=7
10784    105.477698  client  server  TCP    27549 > http [ACK] Seq=1
Ack=1 Win=5840 Len=0
10785    105.477723  client  server  HTTP   [TCP Previous segment
lost] Continuation or non-HTTP traffic
10786    105.477732  server  client  TCP    [TCP Window Update] http >
27549 [ACK] Seq=1 Ack=1 Win=5888 Len=0 SLE=1461 SRE=2024
10787    105.477740  client  server  HTTP   [TCP Out-Of-Order]
POST /... HTTP/1.1  (application/x-www-form-urlencoded)
10788    105.477745  server  client  TCP    http > 27549 [ACK] Seq=1
Ack=2024 Win=8832 Len=0
10801    105.497889  server  client  HTTP   HTTP/1.1 200 OK
10802    105.497899  server  client  TCP    http > 27549 [FIN, ACK]
Seq=502 Ack=2024 Win=8832 Len=0
11034    108.477864  client  server  HTTP   [TCP Retransmission]
POST /... HTTP/1.1  (application/x-www-form-urlencoded)
11035    108.477870  server  client  TCP    [TCP Dup ACK 10802#1] http
> 27549 [ACK] Seq=503 Ack=2024 Win=8832 Len=0 SLE=1 SRE=1461
11044    108.495758  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK
11792    114.477977  client  server  HTTP   [TCP Retransmission]
POST /... HTTP/1.1  (application/x-www-form-urlencoded)
11793    114.478018  server  client  TCP    [TCP Dup ACK 11044#1] http
> 27549 [ACK] Seq=503 Ack=2024 Win=8832 Len=0 SLE=1 SRE=1461
11794    114.496111  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK
12662    126.496788  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK
15787    150.498155  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK
22195    198.500891  server  client  HTTP   [TCP Retransmission] HTTP/
1.1 200 OK

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to