Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-puma for openSUSE:Factory 
checked in at 2021-06-01 10:39:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-puma (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-puma.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-puma"

Tue Jun  1 10:39:57 2021 rev:45 rq:896520 version:5.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-puma/rubygem-puma.changes        
2021-05-15 01:24:59.682854811 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-puma.new.1898/rubygem-puma.changes      
2021-06-01 10:41:34.105232548 +0200
@@ -1,0 +2,10 @@
+Tue Jun  1 03:39:59 UTC 2021 - Manuel Schnitzer <mschnit...@suse.com>
+
+- updated to version 5.3.2
+
+  * Bugfixes
+    * Gracefully handle Rack not accepting CLI options (#2630, #2626)
+    * Fix sigterm misbehavior (#2629)
+    * Improvements to keepalive-connection shedding (#2628)
+
+-------------------------------------------------------------------

Old:
----
  puma-5.3.1.gem

New:
----
  puma-5.3.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-puma.spec ++++++
--- /var/tmp/diff_new_pack.OzgNIN/_old  2021-06-01 10:41:34.509233236 +0200
+++ /var/tmp/diff_new_pack.OzgNIN/_new  2021-06-01 10:41:34.509233236 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-puma
-Version:        5.3.1
+Version:        5.3.2
 Release:        0
 %define mod_name puma
 %define mod_full_name %{mod_name}-%{version}

++++++ puma-5.3.1.gem -> puma-5.3.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/History.md new/History.md
--- old/History.md      2021-05-11 16:54:42.000000000 +0200
+++ new/History.md      2021-05-21 19:15:55.000000000 +0200
@@ -1,3 +1,10 @@
+## 5.3.2 / 2021-05-21
+
+* Bugfixes
+  * Gracefully handle Rack not accepting CLI options (#2630, #2626)
+  * Fix sigterm misbehavior (#2629)
+  * Improvements to keepalive-connection shedding (#2628)
+
 ## 5.3.1 / 2021-05-11
 
 * Security
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/binder.rb new/lib/puma/binder.rb
--- old/lib/puma/binder.rb      2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/binder.rb      2021-05-21 19:15:55.000000000 +0200
@@ -163,7 +163,7 @@
             ios_len = @ios.length
             params = Util.parse_query uri.query
 
-            opt = params.key?('low_latency')
+            opt = params.key?('low_latency') && params['low_latency'] != 
'false'
             bak = params.fetch('backlog', 1024).to_i
 
             io = add_tcp_listener uri.host, uri.port, opt, bak
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/client.rb new/lib/puma/client.rb
--- old/lib/puma/client.rb      2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/client.rb      2021-05-21 19:15:55.000000000 +0200
@@ -69,6 +69,7 @@
       @hijacked = false
 
       @peerip = nil
+      @listener = nil
       @remote_addr_header = nil
 
       @body_remain = 0
@@ -81,7 +82,7 @@
 
     attr_writer :peerip
 
-    attr_accessor :remote_addr_header
+    attr_accessor :remote_addr_header, :listener
 
     def_delegators :@io, :closed?
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/cluster/worker.rb 
new/lib/puma/cluster/worker.rb
--- old/lib/puma/cluster/worker.rb      2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/cluster/worker.rb      2021-05-21 19:15:55.000000000 +0200
@@ -33,7 +33,7 @@
         Signal.trap "SIGINT", "IGNORE"
         Signal.trap "SIGCHLD", "DEFAULT"
 
-        Thread.new do
+       Thread.new do
           Puma.set_thread_name "worker check pipe"
           IO.select [@check_pipe]
           log "! Detected parent died, dying"
@@ -54,7 +54,14 @@
         # things in shape before booting the app.
         @launcher.config.run_hooks :before_worker_boot, index, @launcher.events
 
+        begin
         server = @server ||= start_server
+        rescue Exception => e
+          log "! Unable to start worker"
+          log e.backtrace[0]
+          exit 1
+        end
+
         restart_server = Queue.new << true << false
 
         fork_worker = @options[:fork_worker] && index == 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/configuration.rb 
new/lib/puma/configuration.rb
--- old/lib/puma/configuration.rb       2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/configuration.rb       2021-05-21 19:15:55.000000000 +0200
@@ -343,6 +343,8 @@
       raise "Missing rackup file '#{rackup}'" unless File.exist?(rackup)
 
       rack_app, rack_options = rack_builder.parse_file(rackup)
+      rack_options = rack_options || {}
+
       @options.file_options.merge!(rack_options)
 
       config_ru_binds = []
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/const.rb new/lib/puma/const.rb
--- old/lib/puma/const.rb       2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/const.rb       2021-05-21 19:15:55.000000000 +0200
@@ -100,7 +100,7 @@
   # too taxing on performance.
   module Const
 
-    PUMA_VERSION = VERSION = "5.3.1".freeze
+    PUMA_VERSION = VERSION = "5.3.2".freeze
     CODE_NAME = "Sweetnighter".freeze
 
     PUMA_SERVER_STRING = ['puma', PUMA_VERSION, CODE_NAME].join(' ').freeze
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/dsl.rb new/lib/puma/dsl.rb
--- old/lib/puma/dsl.rb 2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/dsl.rb 2021-05-21 19:15:55.000000000 +0200
@@ -201,7 +201,7 @@
     # * Set the socket backlog depth with +backlog+, default is 1024.
     # * Set up an SSL certificate with +key+ & +cert+.
     # * Set whether to optimize for low latency instead of throughput with
-    #   +low_latency+, default is to optimize for low latency. This is done
+    #   +low_latency+, default is to not optimize for low latency. This is done
     #   via +Socket::TCP_NODELAY+.
     # * Set socket permissions with +umask+.
     #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/request.rb new/lib/puma/request.rb
--- old/lib/puma/request.rb     2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/request.rb     2021-05-21 19:15:55.000000000 +0200
@@ -26,9 +26,10 @@
     # Finally, it'll return +true+ on keep-alive connections.
     # @param client [Puma::Client]
     # @param lines [Puma::IOBuffer]
+    # @param requests [Integer]
     # @return [Boolean,:async]
     #
-    def handle_request(client, lines)
+    def handle_request(client, lines, requests)
       env = client.env
       io  = client.io   # io may be a MiniSSL::Socket
 
@@ -110,7 +111,7 @@
 
         cork_socket io
 
-        str_headers(env, status, headers, res_info, lines)
+        str_headers(env, status, headers, res_info, lines, requests, client)
 
         line_ending = LINE_END
 
@@ -367,9 +368,11 @@
     # @param headers [Hash] the headers returned by the Rack application
     # @param res_info [Hash] used to pass info between this method and 
#handle_request
     # @param lines [Puma::IOBuffer] modified inn place
+    # @param requests [Integer] number of inline requests handled
+    # @param client [Puma::Client]
     # @version 5.0.3
     #
-    def str_headers(env, status, headers, res_info, lines)
+    def str_headers(env, status, headers, res_info, lines, requests, client)
       line_ending = LINE_END
       colon = COLON
 
@@ -410,6 +413,14 @@
       # if running without request queueing
       res_info[:keep_alive] &&= @queue_requests
 
+      # Close the connection after a reasonable number of inline requests
+      # if the server is at capacity and the listener has a new connection 
ready.
+      # This allows Puma to service connections fairly when the number
+      # of concurrent connections exceeds the size of the threadpool.
+      res_info[:keep_alive] &&= requests < @max_fast_inline ||
+        @thread_pool.busy_threads < @max_threads ||
+        !IO.select([client.listener], nil, nil, 0)
+
       res_info[:response_hijack] = nil
 
       headers.each do |k, vs|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/puma/server.rb new/lib/puma/server.rb
--- old/lib/puma/server.rb      2021-05-11 16:54:42.000000000 +0200
+++ new/lib/puma/server.rb      2021-05-21 19:15:55.000000000 +0200
@@ -341,6 +341,7 @@
                 end
                 drain += 1 if shutting_down?
                 client = Client.new io, @binder.env(sock)
+                client.listener = sock
                 if remote_addr_value
                   client.peerip = remote_addr_value
                 elsif remote_addr_header
@@ -434,7 +435,7 @@
 
         while true
           @requests_count += 1
-          case handle_request(client, buffer)
+          case handle_request(client, buffer, requests + 1)
           when false
             break
           when :async
@@ -447,23 +448,17 @@
 
             requests += 1
 
-            # Closing keepalive sockets after they've made a reasonable
-            # number of requests allows Puma to service many connections
-            # fairly, even when the number of concurrent connections exceeds
-            # the size of the threadpool. It also allows cluster mode Pumas
-            # to keep load evenly distributed across workers, because clients
-            # are randomly assigned a new worker when opening a new connection.
-            #
-            # Previously, Puma would kick connections in this conditional back
-            # to the reactor. However, because this causes the todo set to 
increase
-            # in size, the wait_until_full mutex would never unlock, leaving
-            # any additional connections unserviced.
-            break if requests >= @max_fast_inline
-
-            check_for_more_data = @status == :run
+            # As an optimization, try to read the next request from the
+            # socket for a short time before returning to the reactor.
+            fast_check = @status == :run
+
+            # Always pass the client back to the reactor after a reasonable
+            # number of inline requests if there are other requests pending.
+            fast_check = false if requests >= @max_fast_inline &&
+              @thread_pool.backlog > 0
 
             next_request_ready = with_force_shutdown(client) do
-              client.reset(check_for_more_data)
+              client.reset(fast_check)
             end
 
             unless next_request_ready
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-05-11 16:54:42.000000000 +0200
+++ new/metadata        2021-05-21 19:15:55.000000000 +0200
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: puma
 version: !ruby/object:Gem::Version
-  version: 5.3.1
+  version: 5.3.2
 platform: ruby
 authors:
 - Evan Phoenix
 autorequire:
 bindir: bin
 cert_chain: []
-date: 2021-05-11 00:00:00.000000000 Z
+date: 2021-05-21 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: nio4r

Reply via email to