Issue #9753 has been reported by Thomas Lynch.

----------------------------------------
Bug #9753: UNIX Socket doesn't handle multiple clients
https://bugs.ruby-lang.org/issues/9753

* Author: Thomas Lynch
* Status: Open
* Priority: High
* Assignee: 
* Category: 
* Target version: 
* ruby -v: ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-linux]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
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--------------------------------
simple_server2.rb (482 Bytes)
simple_client_slow.rb (578 Bytes)
simple_client.rb (407 Bytes)
Screenshot from 2014-04-17 09_50_35.png (74 KB)
Screenshot from 2014-04-17 09_53_26.png (82 KB)


-- 
https://bugs.ruby-lang.org/