[lvs-users] BUG: (ldirectord) shutdown() in check_simpletcp closes connection before reading response

Taylan Develioglu tdevelioglu at ebuddy.com
Tue Nov 15 10:46:46 GMT 2011


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..<~^@. at ...&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..<.. at .?.]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~_ at .@...&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~`@. at ...&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 at .@...&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 at .@...&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>



More information about the lvs-users mailing list