Bug #9753
closedUNIX Socket doesn't handle multiple clients
Description
When a first client session is still active, a second client session starting then closing its connection causes the first session to hang.
This can be reproduced every time by using the included source files and these directions:
A. open three terminals, say T1,T2, and T3
1. in T1 start the server2
> ./simple_server2.rb
2. in T2 run the slow client and see that it works
> ./simple_client_slow.rb
3. in T3 run the regular client and see that it works too
> ./simple_client.rb
B. now go back to T2 and run simple_client_slow, then reasonably quickly
go to T3 and run simple_client
what you will see: simple_client finishes first, and simple_slow hangs
Note also the enclosed screen shots showing the hang.
Hanging sessions with no known workaround for Unixsockets is fairly serious so I'll set this to priority high. I didn't set it to urgent because the code can be rewritten to use TCP sockets, however it is unknown of the problem is there also.
Files
Updated by nobu (Nobuyoshi Nakada) over 10 years ago
- Status changed from Open to Rejected
data_sock
is overwritten by the next loop.
You have to pass it to worker threads as a block parameter too.