LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

[lvs-users] BUG: (ldirectord) shutdown() in check_simpletcp closes conne

To: "lvs-users@xxxxxxxxxxxxxxxxxxxxxx" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [lvs-users] BUG: (ldirectord) shutdown() in check_simpletcp closes connection before reading response
From: Taylan Develioglu <tdevelioglu@xxxxxxxxxx>
Date: Tue, 15 Nov 2011 11:46:46 +0100
In ldirectord 1:3.9.2-3~bpo60+1 on debian "squeeze".

In check_simpletcp  there's a call to shutdown() to indicate that we've 
finished writing, but this closes the connection before waiting for a response.

This breaks negotiate when using simpletcp.

38.99.72.134 runs ldirectord, sends request and immediately after an end 
packet. ->

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:40:05.036552 IP 38.99.72.134.46363 > 38.99.73.40.110: Flags [S], seq 
1670860983, win 5840, options [mss 1460,sackOK,TS val 3019714281 ecr 
0,nop,wscale 7], length 0
E..<~^@.@...&cH.&cI(...nc.P....................
............
11:40:05.036645 IP 38.99.73.40.110 > 38.99.72.134.46363: Flags [S.], seq 
933473130, ack 1670860984, win 5792, options [mss 1460,sackOK,TS val 21252662 
ecr 3019714281,nop,wscale 7], length 0
E..<..@.?.]H&cI(&cH..n..7..jc.P................
.DJ6........
11:40:05.036666 IP 38.99.72.134.46363 > 38.99.73.40.110: Flags [.], ack 1, win 
46, options [nop,nop,TS val 3019714281 ecr 21252662], length 0
E..4~_@.@...&cH.&cI(...nc.P.7..k...........
.....DJ6
11:40:05.036749 IP 38.99.72.134.46363 > 38.99.73.40.110: Flags [P.], seq 1:16, 
ack 1, win 46, options [nop,nop,TS val 3019714281 ecr 21252662], length 15
E..C~`@.@...&cH.&cI(...nc.P.7..k...........
.....DJ6e_action=check

11:40:05.036767 IP 38.99.72.134.46363 > 38.99.73.40.110: Flags [F.], seq 16, 
ack 1, win 46, options [nop,nop,TS val 3019714281 ecr 21252662], length 0
E..4~a@.@...&cH.&cI(...nc.P.7..k...........
.....DJ6
11:40:05.036895 IP 38.99.73.40.110 > 38.99.72.134.46363: Flags [.], ack 16, win 
46, options [nop,nop,TS val 21252662 ecr 3019714281], length 0
E..4.]@.?.{.&cI(&cH..n..7..kc.P............
.DJ6....
11:40:05.037393 IP 38.99.73.40.110 > 38.99.72.134.46363: Flags [F.], seq 1, ack 
17, win 46, options [nop,nop,TS val 21252662 ecr 3019714281], length 0
E..4.^@.?.{.&cI(&cH..n..7..kc.P............
.DJ6....
11:40:05.037412 IP 38.99.72.134.46363 > 38.99.73.40.110: Flags [.], ack 2, win 
46, options [nop,nop,TS val 3019714281 ecr 21252662], length 0
E..4~b@.@...&cH.&cI(...nc.P.7..l...........
.....DJ6

Subsequent read naturally comes up empty.

Removing the call fixes it.

Maybe someone can explain to me why calling shutdown() is necessary as we flush 
after every write anyway.

Regards,

Taylan Develioglu

<insert  pretentious signature>
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

<Prev in Thread] Current Thread [Next in Thread>