Re: Ruby 2.0 Bad file descriptor (Errno::EBADF)

2013-09-04 Thread Eric Chapweske
Eric Wong normalperson at yhbt.net writes:

 OK, this is really strange; especially since you're only hitting this
 on your legacy app and not a new one.
 
 I certainly haven't hit this with Ruby 2.0.0 anywhere (neither unicorn
 nor Rainbows!).  I'm fairly certain enough folks are using Ruby 2.0.0 by
 now that we would have more reports if something were amiss.
 
 Let us know what you find, thanks!


We ran into the same issue. For us, it was because we were executing the 
process using bundle exec.  Bundler doesn't preserve the 1.9 behavior around
FD inheritance. https://github.com/bundler/bundler/issues/2628


___
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying


Re: Ruby 2.0 Bad file descriptor (Errno::EBADF)

2013-09-04 Thread Eric Wong
Eric Chapweske e...@zendesk.com wrote:
 We ran into the same issue. For us, it was because we were executing the 
 process using bundle exec.  Bundler doesn't preserve the 1.9 behavior around
 FD inheritance. https://github.com/bundler/bundler/issues/2628

Thanks Eric!  I just pushed out the following and updated the website.

Subject: [PATCH] Sandbox: document SIGUSR2 + bundler issue with 2.0.0

Thanks to Eric Chapweske for the heads up.

ref: http://mid.gmane.org/loom.20130904t205308-...@post.gmane.org
---
 Sandbox | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/Sandbox b/Sandbox
index 1df149b..3c7f226 100644
--- a/Sandbox
+++ b/Sandbox
@@ -60,6 +60,13 @@ If you're using an older Bundler version (0.9.x), you may 
need to set or
 reset GEM_HOME, GEM_PATH and PATH environment variables in the
 before_exec hook as illustrated by http://gist.github.com/534668
 
+=== Ruby 2.0.0 close-on-exec and SIGUSR2 incompatibility
+
+Ruby 2.0.0 enforces FD_CLOEXEC on file descriptors by default.  unicorn
+has been prepared for this behavior since unicorn 4.1.0, but we forgot
+to remind the Bundler developers.  This issue is being tracked here:
+https://github.com/bundler/bundler/issues/2628
+
 == Isolate
 
 === Running
-- 
Eric Wong
___
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying