Amir Yalon <[email protected]> wrote:
> Interesting.  With the testing patch applied, we’re now failing this
> test in thread_pthread.c:
> http://bogomips.org/mirrors/ruby.git/tree/thread_pthread.c#n1720
> Which then raises the following exception in io.c:
> http://bogomips.org/mirrors/ruby.git/tree/io.c#n7621
>  
> From the journal:
> app/vendor/bundle/ruby/2.0.0/gems/unicorn-5.0.1/lib/unicorn/http_server.rb:780:in
> `for_fd': The given fd is not accessible because RubyVM reserves it
> (ArgumentError)

That should not happen.  So I wonder if LISTEN_FDS is set to
the wrong number, somehow.

How many sockets are you activating? LISTEN_FDS should match
that number.

Can you dump out the inherited, and LISTEN_* env variables with
the following?

--- a/lib/unicorn/http_server.rb
+++ b/lib/unicorn/http_server.rb
@@ -776,6 +776,8 @@ def inherit_listeners!
     end
     # to ease debugging, we will not unset LISTEN_PID and LISTEN_FDS
 
+    $stderr.write("I=#{inherited.inspect} PID=#{sd_pid} FDS=#{sd_fds}\n")
+
     inherited.map! do |fd|
       io = Socket.for_fd(fd.to_i)
       io.autoclose = false


Thanks.

> > Also, can you verify the UNICORN_FD env is NOT set by systemd?
> > (It should not be)
> Verified, not set.
>  
> > Also, for reference, which version of systemd is this?
> Ubuntu Wily 15.10, systemd 225-1ubuntu9

I'll try to test with a newer version this week(*) if the above
can't figure it out.

* maybe Thursday/Friday, my connectivity is inconsistent
--
unsubscribe: [email protected]
archive: http://bogomips.org/unicorn-public/

Reply via email to