Issue #9525 has been updated by Naotoshi Seo.


Naotoshi Seo wrote:
> I applied following consecutive patches for ruby 2.1.1, and tried. 
> 
> https://github.com/ruby/ruby/commit/948ce9decb97e5ff0833e53a392aa9f1d42c9b0d
> https://github.com/ruby/ruby/commit/dd1c3a75096b97c1ebcb8597c001761ddfb3c1bf
> https://github.com/ruby/ruby/commit/2e6b97a45d077979121b29484a8831034d47ef50
> 
> Before (ruby 2.1.1): 
> 
> The stuck was able to be reproduced with ruby 2.1.1. 
> I restarted my entire fluentd cluster 12 times, and it occurred at 4th and 12th, that is, 2 times out of 12. 
> 
> After (ruby 2.1.1 + patch)
> 
> I restarted the fluentd cluster 36 times, and got stuck 0 time. 
> EDIT: In details, I met 3 times out of 36 times that process is stuck with this case too, but
> these processes were died after 300sec, 100sec, 300sec passed respectively. I am not sure what the second mean. 
> Actually, I sent CONT signal to get sigdump https://github.com/frsyuki/sigdump, and next tried to gcore. Then these processes were not lived any more. 
> 
> After all, it looks this patch fixed the issue.


----------------------------------------
Bug #9525: Stuck with Socket.pack_sockaddr_in
https://bugs.ruby-lang.org/issues/9525#change-45659

* Author: Naotoshi Seo
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
* ruby -v: 1.9.3p194
* Backport: 1.9.3: REQUIRED, 2.0.0: REQUIRED, 2.1: REQUIRED
----------------------------------------
We met this trouble with Fluentd https://github.com/fluent/fluentd. 

Fluentd is sometimes stuck at `Socket.pack_sockaddr_in` line on shutdown. 
Here is the gist https://gist.github.com/sonots/9047653 to explain details. 





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